iup

How do I get access to GUI elements in a IUP dialog loaded from a LED file?

雨燕双飞 提交于 2019-12-31 05:11:28
问题 I’m in love with IUP! However I cannot figure out how to get programmatic access (in C) to GUI elements in a dialog loaded by IupLoad() from a LED file. One extremely laborious way would be to edit the LED file so as to manually give handle names to each single GUI element, then manually define corresponding variables for each element in C, then manually load handles into each variable by using IupGetHandle(). One comfortable way to do it would be to convert the LED file to a C header file

Read console output realtime in lua

回眸只為那壹抹淺笑 提交于 2019-12-23 12:52:35
问题 How can I manage to periodically read the output of a script while it is running? In the case of youtube-dl, it sends download information (progress/speed/eta) about the video being downloaded to the terminal. With the following code I am able to capture the total result of the scripts output (on linux) to a temporary file: tmpFile = io.open("/tmp/My_Temp.tmp", "w+") f = io.popen("youtube-dl http://www.youtube.com/watch?v=UIqwUx_0gJI", 'r') tmpFile:write(f:read("*all")) Instead of waiting for

A gap in IUP dropdown lists

早过忘川 提交于 2019-12-20 07:45:02
问题 Dropdown lists in IUP for Windows contain a superfluous gap after the last element if the number of elements is sufficient to warrant a scrollbar (which is five or more). Is this something I can change? Example dropdown = DIALOG[TITLE=dropdown.led]( HBOX[CMARGIN=10x10,CGAP=10]( LIST[VALUE=3, 1=я, 2=ты, 3=оно, 4=мы, 5=вы, 6=они, DROPDOWN=YES](do_nothing), LIST[VALUE=3, 1=ik, 2=je, 3=hij, 4=we, DROPDOWN=YES](do_nothing) ) ) All questions that pertain to this particular example: How do I get

(CHICKEN) Could not install iup Eggs via the terminal

与世无争的帅哥 提交于 2019-12-14 03:58:40
问题 I tried to compile a scheme file with CHICKEN and it says there that I need to install the iup port of CHICKEN. So I went to the website and tried to install the iup port but I got an error. Then I realized I need to get ffcall. I got that installed and tried to install the iup port again. And failed. I don't know if I got srfi-42 installed on my system. Even if I know it's not installed I still don't know how to install srfi-42 to get the iup port to work. This is the error that I get: ander

Getting input with IUP in Lua

扶醉桌前 提交于 2019-12-11 04:44:37
问题 I've been trying to get input with IUP to make a small pong game. I wanted to try some input, and tried some of the code that comes with the IUPGL examples, but the input doesn't seem to be working at all. Here's the code as it stands so far: require "iuplua" require "iupluagl" require "luagl" paddle = {x = -0.9, y = 0.2} function drawPaddle(x, y) gl.Begin(gl.QUADS) gl.Color(0.0, 0.5, 0.0) gl.Vertex(x, y) gl.Vertex(x + 0.1, y) gl.Vertex(x + 0.1, y - 0.4) gl.Vertex(x, y - 0.4) end canvas = iup

Go语言IUP GUI库的安装笔记

霸气de小男生 提交于 2019-12-05 10:22:20
步骤a 前往 https://github.com/grd/iup 查看说明,看到Quick installation guide for Windows这里 按说明前往下载3个dll库文件包 我自己下的是下面这3个 Im - im-3.9.1_Win32_dll10_lib.zip Cd - cd-5.8.2_Win32_dll10_lib.zip Iup - iup-3.14_Win32_dll10_lib.zip 按说明设置一个系统环境变量(右键计算机-属性-高级系统设置-环境变量) IUPHOME=C:\iup 把下载的3个压缩包都解压到c:\iup目录下 步骤b 复制c:\iup\下的include目录,到C:\TDM-GCC-32\下粘贴,(增量覆盖方式,这里我安装的gcc是tdm提供,如果你用mingW自己判断要放哪里) 把c:\iup\下除了include目录之外的所有文件复制,到C:\TDM-GCC-32\lib\gcc\下粘贴 步骤c 打开cmd窗口,按照说明输入 go get github.com/grd/iup 好了,到此iup环境已经搭建好,可以跑https://github.com/grd/iup/tree/master/examples里的例子了 其中一个例子运行结果如下图: 【完】 来源: oschina 链接: https://my.oschina

How can I make Russian letters visible in a IUP dialog loaded from a LED file?

我的梦境 提交于 2019-12-04 06:26:09
问题 How can I make Russian letters visible in a dialog loaded from a LED file? When the LED file is Unicode, IupLoad() returns an error. When the LED file is UTF-8, IUP believes it has loaded and shown the dialog but there is only vacuum. When the LED file is ANSI, we get the predictable result: (Ignore the red box, I’ve placed it there for another question.) C file: #include <stdlib.h> #include <iup.h> int main(int argc, char **argv) { IupSetGlobal("UTF8MODE", "YES"); // IupSetGlobal("UTF8MODE

How can I make an GUI Application in Lua

匿名 (未验证) 提交于 2019-12-03 02:49:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: First I'll show you an example of what I am talking about: GUI Example I've been studying Lua for around a week now, and I'm really curious of how I would do this. Basically (for now, and learning purposes), I just want to make a GUI with 2 buttons, 1 to start the specified (.exe), and one to exit the GUI. Is this possible? How would I go about doing this? Any information would be great! 回答1: I believe you may want to take a look: http://lua-users.org/wiki/GraphicalUserInterfaceToolkits If you want something well know and tested I would go

A gap in IUP dropdown lists

梦想与她 提交于 2019-12-02 13:14:12
Dropdown lists in IUP for Windows contain a superfluous gap after the last element if the number of elements is sufficient to warrant a scrollbar (which is five or more). Is this something I can change? Example dropdown = DIALOG[TITLE=dropdown.led]( HBOX[CMARGIN=10x10,CGAP=10]( LIST[VALUE=3, 1=я, 2=ты, 3=оно, 4=мы, 5=вы, 6=они, DROPDOWN=YES](do_nothing), LIST[VALUE=3, 1=ik, 2=je, 3=hij, 4=we, DROPDOWN=YES](do_nothing) ) ) All questions that pertain to this particular example: How do I get access to GUI elements in a IUP dialog loaded from a LED file? How can I make Russian letters visible in a

How can I make Russian letters visible in a IUP dialog loaded from a LED file?

血红的双手。 提交于 2019-12-02 09:32:26
How can I make Russian letters visible in a dialog loaded from a LED file? When the LED file is Unicode, IupLoad() returns an error. When the LED file is UTF-8, IUP believes it has loaded and shown the dialog but there is only vacuum. When the LED file is ANSI, we get the predictable result: (Ignore the red box, I’ve placed it there for another question.) C file: #include <stdlib.h> #include <iup.h> int main(int argc, char **argv) { IupSetGlobal("UTF8MODE", "YES"); // IupSetGlobal("UTF8MODE_FILE", "YES"); IupOpen(&argc, &argv); if(IupLoad("dropdown.led")) IupMessage("Error", "Failed to load