3 ms·
I'll use a C example, GUI toolkits. Look at the code example for GTK+ at: http://zetcode.com/tutorials/gtktutorial/gtklayoutmanagement/ http://zetcode.com/tut
by cgore 13y ago
I'll use a C example, GUI toolkits. Look at the code example for GTK+ at:
http://zetcode.com/tutorials/gtktutorial/gtklayoutmanagement/ http://zetcode.com/tutorials/gtktutorial/gtklayoutmanagement...
All of the calls to gtk_fixed_put are of the form:
gtk_fixed_put(GTK_FIXED(fixed), button1, 150, 50);
For most applications, the leftmost argument is going to be exactly the same window/buffer/menu/etc. for several calls in a row. A shortcut version like this is nice if you are going to add 25 buttons to the same widget:
curried_put(button1, 150, 50);
You can do this sort of thing with curry, making a shortcut function.