[Iup-users] Calling Icallback function
How can I call a function I receive from iupGetCallBack i.e. function of the type Icallback? -- Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/___ Iup-users mailing list Iup-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/iup-users
Re: [Iup-users] iuplua_checkihandle
It works good. I modified it a little to balance the stack: int iuplua_isihandle(lua_State *L, int pos) { int x = lua_getmetatable(L, pos); /* t2 = metatable(stack(pos)) */ lua_pushstring(L, "iupHandle"); lua_gettable(L, LUA_REGISTRYINDEX); /* t = registry["iupHandle"] */ if (lua_rawequal(L, -2, -1)) /* check (t2==t)? */ { lua_pop(L, 2); return 1; } else { if (x) lua_pop(L,2); // Pop registry["iuphandle"] and the metatable else lua_pop(L,1); // Pop registry["iuphandle"] return 0; } } On Fri, Jul 10, 2015 at 4:50 PM, Milind Gupta wrote: > Thanks, > I will try it out tonight. > > Milind > > > On Fri, Jul 10, 2015 at 11:41 AM, Antonio Scuri > wrote: > >> Try this: >> >> int iuplua_isihandle(lua_State *L, int pos) >> { >> lua_getmetatable(L, pos); /* t2 = metatable(stack(pos)) */ >> lua_pushstring(L, "iupHandle"); >> lua_gettable(L, LUA_REGISTRYINDEX); /* t = registry["iupHandle"] */ >> if (lua_rawequal(L, -2, -1)) /* check (t2==t)? */ >> { >> lua_pop(L, 2); >> return 1; >> } >> else >> return 0; >> } >> >> Just commit to the SVN. >> >> Best, >> Scuri >> >> >> On Fri, Jul 10, 2015 at 12:57 PM, Milind Gupta >> wrote: >> >>> Hi, >>> I wanted to pass a ihandle to C but I don't want it to throw an >>> error if it is not a ihandle but return nil and a error message. How can I >>> do that? Do I have to use the lua_touserdata function? How can I then check >>> whether I have received a ihandle without throwing an error? >>> >>> Thanks, >>> Milind >>> >>> >>> >>> -- >>> Don't Limit Your Business. Reach for the Cloud. >>> GigeNET's Cloud Solutions provide you with the tools and support that >>> you need to offload your IT needs and focus on growing your business. >>> Configured For All Businesses. Start Your Cloud Today. >>> https://www.gigenetcloud.com/ >>> ___ >>> Iup-users mailing list >>> Iup-users@lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/iup-users >>> >>> >> >> >> -- >> Don't Limit Your Business. Reach for the Cloud. >> GigeNET's Cloud Solutions provide you with the tools and support that >> you need to offload your IT needs and focus on growing your business. >> Configured For All Businesses. Start Your Cloud Today. >> https://www.gigenetcloud.com/ >> ___ >> Iup-users mailing list >> Iup-users@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/iup-users >> >> > -- Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/___ Iup-users mailing list Iup-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/iup-users
[Iup-users] How do I prevent my initial window from filling the full screen?
I may have written myself into a hole since I'm looking at this last instead of first. I am trying to use IupConfigDialogShow. On the very first ever launch of my program, it always creates a window that is the full screen of the desktop. I don't want that. I would like something that is 'natural' sized. My app is a little complicated at this point. The dialog in question contains a zBox. That zBox contains 4 different views I can switch between. Ultimately, each one of those is wrapped in a vbox. (Usually several levels of nested hbox/vbox.) I've tried setting the SIZE on the zbox and dialog, but it doesn't seem to help. MAXSIZE will prevent this problem, but I do want to allow the user to expand the window. I just don't want it to be the default. What's also strange is that if I hit the maximize button on the window, it does reduce it down to the 'natural' size. It is as if the program is being launched in maximized. But I checked the the .config file and Maximized=0, I also tried asserting PLACEMENT to NORMAL just to make sure the MAXIMIZE flag wasn't set. Any recommendations? Thanks, Eric -- Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/ ___ Iup-users mailing list Iup-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/iup-users
Re: [Iup-users] Can I get my labels and fields to vertically ACENTER in an hBox?
On 7/10/15, Antonio Scuri wrote: > Hi Jörg, > > Please start a new thread, instead of replying an existing one to ask > different questions. Or the answers will get mix up, and it will be harder > from me to process them all. > > About the original thread, sorry Eric but I didn't have time to take a > deeper look at your problem here. I'm in a rush to get the Lua examples of > the Tutorial done for this week. Just give me a couple of days. > That's okay. I still have plenty of other challenges to figure out. And I'm actually kind of interested in the performance question since I'm also going to be running on ARMv7. Still, to my original question, I kind of wish the ACENTER alignment would just work in this case. It would simplify this a great deal. I have a case where two labels are next to each other, and yet they don't line up. Thanks, Eric -- Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/ ___ Iup-users mailing list Iup-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/iup-users
Re: [Iup-users] iuplua_checkihandle
Thanks, I will try it out tonight. Milind On Fri, Jul 10, 2015 at 11:41 AM, Antonio Scuri wrote: > Try this: > > int iuplua_isihandle(lua_State *L, int pos) > { > lua_getmetatable(L, pos); /* t2 = metatable(stack(pos)) */ > lua_pushstring(L, "iupHandle"); > lua_gettable(L, LUA_REGISTRYINDEX); /* t = registry["iupHandle"] */ > if (lua_rawequal(L, -2, -1)) /* check (t2==t)? */ > { > lua_pop(L, 2); > return 1; > } > else > return 0; > } > > Just commit to the SVN. > > Best, > Scuri > > > On Fri, Jul 10, 2015 at 12:57 PM, Milind Gupta > wrote: > >> Hi, >> I wanted to pass a ihandle to C but I don't want it to throw an >> error if it is not a ihandle but return nil and a error message. How can I >> do that? Do I have to use the lua_touserdata function? How can I then check >> whether I have received a ihandle without throwing an error? >> >> Thanks, >> Milind >> >> >> >> -- >> Don't Limit Your Business. Reach for the Cloud. >> GigeNET's Cloud Solutions provide you with the tools and support that >> you need to offload your IT needs and focus on growing your business. >> Configured For All Businesses. Start Your Cloud Today. >> https://www.gigenetcloud.com/ >> ___ >> Iup-users mailing list >> Iup-users@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/iup-users >> >> > > > -- > Don't Limit Your Business. Reach for the Cloud. > GigeNET's Cloud Solutions provide you with the tools and support that > you need to offload your IT needs and focus on growing your business. > Configured For All Businesses. Start Your Cloud Today. > https://www.gigenetcloud.com/ > ___ > Iup-users mailing list > Iup-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/iup-users > > -- Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/___ Iup-users mailing list Iup-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/iup-users
Re: [Iup-users] iuplua_checkihandle
Try this: int iuplua_isihandle(lua_State *L, int pos) { lua_getmetatable(L, pos); /* t2 = metatable(stack(pos)) */ lua_pushstring(L, "iupHandle"); lua_gettable(L, LUA_REGISTRYINDEX); /* t = registry["iupHandle"] */ if (lua_rawequal(L, -2, -1)) /* check (t2==t)? */ { lua_pop(L, 2); return 1; } else return 0; } Just commit to the SVN. Best, Scuri On Fri, Jul 10, 2015 at 12:57 PM, Milind Gupta wrote: > Hi, > I wanted to pass a ihandle to C but I don't want it to throw an > error if it is not a ihandle but return nil and a error message. How can I > do that? Do I have to use the lua_touserdata function? How can I then check > whether I have received a ihandle without throwing an error? > > Thanks, > Milind > > > > -- > Don't Limit Your Business. Reach for the Cloud. > GigeNET's Cloud Solutions provide you with the tools and support that > you need to offload your IT needs and focus on growing your business. > Configured For All Businesses. Start Your Cloud Today. > https://www.gigenetcloud.com/ > ___ > Iup-users mailing list > Iup-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/iup-users > > -- Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/___ Iup-users mailing list Iup-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/iup-users
Re: [Iup-users] GridBox slowness and more - Was: Re: Can I get my labels and fields to vertically ACENTER in an hBox?
Hi, We have here dialogs with literally hundreds of controls with many vbox and hbox. And it is amazingly fast, so it does not make sense gridbox being slow and vbox or hbox not. This could be really a bug. Can you do a simple test? Simply rename the IupGridBox to IupVbox on your code. It will look odd but all the controls will be here and it will be almost the same computational work for both cases. If this configuration turns out to be slow too then it is something else. If works ok (despite visual arrange) then there is something wrong in gridbox and I should investigate further. Best, Scuri On Fri, Jul 10, 2015 at 2:24 PM, "Jörg F. Wittenberger" < joerg.wittenber...@softeyes.net> wrote: > Am 10.07.2015 um 14:52 schrieb Antonio Scuri: > > Hi Jörg, > > > > Please start a new thread, instead of replying an existing one to ask > > different questions. Or the answers will get mix up, and it will be > harder > > from me to process them all. > > Sorry. Done. I felt it being related. > > > About the original thread > > ... > > About the GridBox, that is not normal. GridBox is just a combination of > > Vbox and Hbox algorithms. But it is a relatively new control, so maybe > > there is a bug that I didn't know of. > > Ah, OK. That explains it. After I sent the message I learned that > "matrixex" != "matrix" ;-) and tried the same thing as a matrix. > Reasonably responsive. So maybe that's showing that LaTeX alike > algorithms have their cost. I shall be careful when feeding many cells > into GridBox. (Maybe it's worth to note this in the docs. GridBox > looks simple - that's cool - but may be computationally expensive.) > > > Have you used other boxes to check if they have the same behavior? > > Sort of. I'm new. Everything else I tried so far is about as > responsive as I'd expect it to be from experience. > > > Is it Lua or C? Can you send me a sample code? > > Assume C. That's what it boils down to eventually. A single pthread > running C code. > > For the pedantic, that's a bit superficial. It's neither C or Lua what > I actually wrote. It's Chicken Scheme. I started here: > http://wiki.call-cc.org/iup-tutor > and ended up calling iup the second best thing since sliced bread (or > something alike). > > > About MatrixEx I notice that I forgot to add it to the Makefile in the > > iup root folder. Just go to the srcmatrixex folder and type make. > > Thanks. Will do. > > First let me see why the hell those non-modal dialogs appear to be > problematic. (But I wouldn't be surprised if the problem's reason turns > out to be looking at my screen.) > > Best > > /Jörg > > > > -- > Don't Limit Your Business. Reach for the Cloud. > GigeNET's Cloud Solutions provide you with the tools and support that > you need to offload your IT needs and focus on growing your business. > Configured For All Businesses. Start Your Cloud Today. > https://www.gigenetcloud.com/ > ___ > Iup-users mailing list > Iup-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/iup-users > > -- Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/___ Iup-users mailing list Iup-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/iup-users
[Iup-users] GridBox slowness and more - Was: Re: Can I get my labels and fields to vertically ACENTER in an hBox?
Am 10.07.2015 um 14:52 schrieb Antonio Scuri: > Hi Jörg, > > Please start a new thread, instead of replying an existing one to ask > different questions. Or the answers will get mix up, and it will be harder > from me to process them all. Sorry. Done. I felt it being related. > About the original thread > ... > About the GridBox, that is not normal. GridBox is just a combination of > Vbox and Hbox algorithms. But it is a relatively new control, so maybe > there is a bug that I didn't know of. Ah, OK. That explains it. After I sent the message I learned that "matrixex" != "matrix" ;-) and tried the same thing as a matrix. Reasonably responsive. So maybe that's showing that LaTeX alike algorithms have their cost. I shall be careful when feeding many cells into GridBox. (Maybe it's worth to note this in the docs. GridBox looks simple - that's cool - but may be computationally expensive.) > Have you used other boxes to check if they have the same behavior? Sort of. I'm new. Everything else I tried so far is about as responsive as I'd expect it to be from experience. > Is it Lua or C? Can you send me a sample code? Assume C. That's what it boils down to eventually. A single pthread running C code. For the pedantic, that's a bit superficial. It's neither C or Lua what I actually wrote. It's Chicken Scheme. I started here: http://wiki.call-cc.org/iup-tutor and ended up calling iup the second best thing since sliced bread (or something alike). > About MatrixEx I notice that I forgot to add it to the Makefile in the > iup root folder. Just go to the srcmatrixex folder and type make. Thanks. Will do. First let me see why the hell those non-modal dialogs appear to be problematic. (But I wouldn't be surprised if the problem's reason turns out to be looking at my screen.) Best /Jörg -- Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/ ___ Iup-users mailing list Iup-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/iup-users
[Iup-users] iuplua_checkihandle
Hi, I wanted to pass a ihandle to C but I don't want it to throw an error if it is not a ihandle but return nil and a error message. How can I do that? Do I have to use the lua_touserdata function? How can I then check whether I have received a ihandle without throwing an error? Thanks, Milind -- Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/___ Iup-users mailing list Iup-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/iup-users
Re: [Iup-users] IupGetClassName
Thanks. On Fri, Jul 10, 2015 at 5:36 AM, Antonio Scuri wrote: > Hi, > > Just iup.h. The declaration is right there, line 166. > > Best, > Scuri > > > On Fri, Jul 10, 2015 at 3:15 AM, Milind Gupta > wrote: > >> I am trying to use IupGetClassName in my C module but it cannot find the >> definition. I have included iup.h and iuplua.h. Which include file do I >> have to use to get that function? >> >> Thanks, >> Milind >> >> >> >> -- >> Don't Limit Your Business. Reach for the Cloud. >> GigeNET's Cloud Solutions provide you with the tools and support that >> you need to offload your IT needs and focus on growing your business. >> Configured For All Businesses. Start Your Cloud Today. >> https://www.gigenetcloud.com/ >> ___ >> Iup-users mailing list >> Iup-users@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/iup-users >> >> > > > -- > Don't Limit Your Business. Reach for the Cloud. > GigeNET's Cloud Solutions provide you with the tools and support that > you need to offload your IT needs and focus on growing your business. > Configured For All Businesses. Start Your Cloud Today. > https://www.gigenetcloud.com/ > ___ > Iup-users mailing list > Iup-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/iup-users > > -- Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/___ Iup-users mailing list Iup-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/iup-users
Re: [Iup-users] Can I get my labels and fields to vertically ACENTER in an hBox?
Hi Jörg, Please start a new thread, instead of replying an existing one to ask different questions. Or the answers will get mix up, and it will be harder from me to process them all. About the original thread, sorry Eric but I didn't have time to take a deeper look at your problem here. I'm in a rush to get the Lua examples of the Tutorial done for this week. Just give me a couple of days. About the GridBox, that is not normal. GridBox is just a combination of Vbox and Hbox algorithms. But it is a relatively new control, so maybe there is a bug that I didn't know of. Have you used other boxes to check if they have the same behavior? Is it Lua or C? Can you send me a sample code? About MatrixEx I notice that I forgot to add it to the Makefile in the iup root folder. Just go to the srcmatrixex folder and type make. Just fixed and committed to the SVN. Thanks for reporting. Best Regards, Antonio Scuri On Fri, Jul 10, 2015 at 5:39 AM, "Jörg F. Wittenberger" < joerg.wittenber...@softeyes.net> wrote: > Hi all, > > I'm new here and to iup - which I think is great. > > Though I've been about to ask a couple of newbe questions. One related > here: > > Am 09.07.2015 um 23:24 schrieb Ariset: > > solution with iupFill and h/v boxes are only for smaller forms. For > larger > > ones you should use GridBox. Attached example. > > Maybe I'm doing something weird, but GridBox on my machine (ARMv7) is > extremely slow. I made a gribox with 11 columns holding mostly numbers > or other short text. The table holds about 10-15 lines. This takes > roughly one second to format. Is this expected behavior? Am I missing > something? > > On a related note: as an alternative I thought maybe the matrixex stuff > might be helpful. But this is not enabled by default in the build. Is > there a reason for this? Deprecation or something? Possibly even > slower thank gridbox? Or should I simply try to enable it and recompile? > > Best > > /Jörg > > > -- > Don't Limit Your Business. Reach for the Cloud. > GigeNET's Cloud Solutions provide you with the tools and support that > you need to offload your IT needs and focus on growing your business. > Configured For All Businesses. Start Your Cloud Today. > https://www.gigenetcloud.com/ > ___ > Iup-users mailing list > Iup-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/iup-users > > -- Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/___ Iup-users mailing list Iup-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/iup-users
Re: [Iup-users] IupGetClassName
Hi, Just iup.h. The declaration is right there, line 166. Best, Scuri On Fri, Jul 10, 2015 at 3:15 AM, Milind Gupta wrote: > I am trying to use IupGetClassName in my C module but it cannot find the > definition. I have included iup.h and iuplua.h. Which include file do I > have to use to get that function? > > Thanks, > Milind > > > > -- > Don't Limit Your Business. Reach for the Cloud. > GigeNET's Cloud Solutions provide you with the tools and support that > you need to offload your IT needs and focus on growing your business. > Configured For All Businesses. Start Your Cloud Today. > https://www.gigenetcloud.com/ > ___ > Iup-users mailing list > Iup-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/iup-users > > -- Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/___ Iup-users mailing list Iup-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/iup-users
Re: [Iup-users] Can I get my labels and fields to vertically ACENTER in an hBox?
Hi all, I'm new here and to iup - which I think is great. Though I've been about to ask a couple of newbe questions. One related here: Am 09.07.2015 um 23:24 schrieb Ariset: > solution with iupFill and h/v boxes are only for smaller forms. For larger > ones you should use GridBox. Attached example. Maybe I'm doing something weird, but GridBox on my machine (ARMv7) is extremely slow. I made a gribox with 11 columns holding mostly numbers or other short text. The table holds about 10-15 lines. This takes roughly one second to format. Is this expected behavior? Am I missing something? On a related note: as an alternative I thought maybe the matrixex stuff might be helpful. But this is not enabled by default in the build. Is there a reason for this? Deprecation or something? Possibly even slower thank gridbox? Or should I simply try to enable it and recompile? Best /Jörg -- Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/ ___ Iup-users mailing list Iup-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/iup-users