digitalmars.D - The GUI to end all GUI libraries (Let's Dream!)
- Bill Baxter (36/36) Nov 26 2007 (with a nod to Don ;)
- 0ffh (6/11) Nov 26 2007 I recently met someone [1] on IRC asking nearly exactly the same
- Lutger (7/7) Nov 26 2007 Another interesting idea is immediate mode gui. It basically means that
- 0ffh (9/18) Nov 26 2007 Recently on IRC:
- Bill Baxter (7/24) Nov 26 2007 Sounds quite feature-full. But noticeably lacking is any mention of how...
- 0ffh (9/14) Nov 28 2007 Seems like "event processing will be done like in harmonia, that is, thr...
- Bill Baxter (17/35) Nov 28 2007 Harmonia was in its death throes when I came on the scene, so I don't
- Tom S (30/60) Nov 28 2007 It used/uses an event processing system called 'sinking and bubbling'
- Bill Baxter (22/71) Nov 28 2007 Gee thanks, that really clears it up for me. :-P
- Tom S (19/41) Nov 28 2007 LOL :D Well, the concept was explained here:
- Bill Baxter (19/41) Nov 28 2007 Ah, ok. Makes sense now. Yes that is nice. It drives me mad in
- Bastiaan Veelo (10/28) Nov 29 2007 I can't either, but the sinking/bubling reminds me of how GTK+ handles
- Bill Baxter (10/40) Nov 29 2007 Yeh, actually this is the first I've heard of a toolkit that percolates
- Jan Claeys (6/9) Nov 29 2007 Gtk also has grid/table layouts, and some programmes and libraries migh
- Bill Baxter (6/7) Nov 28 2007 By the way, if you have big plans for your GUI you may want to consider
- =?ISO-8859-1?Q?Julio_C=E9sar_Carrascal_Urquijo?= (10/19) Nov 26 2007 What worries me about immediate mode guis is performance. I suppose they...
- Bill Baxter (5/24) Nov 26 2007 My guess is that, like OpenGL programs, you don't have to refresh
- =?ISO-8859-1?Q?Julio_C=E9sar_Carrascal_Urquijo?= (7/12) Nov 26 2007 Well, from what I've seen before they refresh the screen each frame.
- Lutger (3/15) Nov 27 2007 That's because it's discussed in the context of games, but such a frame
- Lutger (9/18) Nov 27 2007 You can, instead of using a frame-based approach, repaint as needed. The...
- =?ISO-8859-1?Q?Julio_C=E9sar_Carrascal_Urquijo?= (7/17) Nov 28 2007 All the implementations I've seen use real-time redrawing which is
- Bill Baxter (8/23) Nov 28 2007 Casey does mention it as a drawback of immediate mode GUI in the video.
- Bill Baxter (5/14) Nov 26 2007 Very interesting. I watched the first few minutes and read some of the
- 0ffh (3/3) Nov 26 2007 Also, I've been quite satisfied with DFL, which is a
- Bill Baxter (8/11) Nov 26 2007 I've started using DFL too. It seems to be the easiest thing to use
- Clay Smith (5/10) Nov 26 2007 X-platform DFL/Entice would be enough to satisfy me GUI wise. I don't
- Christopher Wright (17/36) Nov 26 2007 So a largely functional GUI framework. I think that could work decently,...
- Dan (2/2) Nov 26 2007 /me shakes his head.
- Bruce Adams (5/22) Nov 27 2007 All you need is an updateWindow function.
- =?ISO-8859-1?Q?Ma=ebl?= (1/1) Nov 27 2007 I would like a versatile GUI with many rendering back-ends (X/SDL/OpenGL...
- Knud Soerensen (3/9) Nov 27 2007 There is a few good ideas in this video
- Ary Borenszweig (3/9) Nov 27 2007 I like lots of ideas from WPF:
- Bastiaan Veelo (3/13) Nov 29 2007 Could you sum them up here, the ones you like most?
- Knud Soerensen (29/36) Nov 29 2007 I was thinking maybe we can learn something from Ruby on rails !
- Jascha Wetzel (7/7) Nov 30 2007 not that it might end all GUI libs, but i was starting to write a Qt-ish...
(with a nod to Don ;) No, I don't have the perfect GUI. I'm just throwing this out as a topic for discussion. I've yet to find a GUI that isn't tedious to use. With 2.0 const hopefully nearing completion, and the new closure support in 2.0, maybe it's a good time to dream again about what the ultimate D GUI would look like. I don't have anything concrete, but I was thinking a bit about some interesting GUI-ish things from Python recently and thought I'd mention them here. There's a library called "Trellis" [1] that I think has an interesting idea for how to maintain GUI state. The basic idea is that you define rules rather than explicit event handlers, and execution of those rules is triggered by built-in dependency analysis. The analogy made on the web page is to a spreadsheet. When you use a spreadsheet you just say how the values in this cell depend on all the others and then it all gets automagically updated for you recursively whenever any dependency changes. So I wonder if something like this could be done in D. Or is there something about the dynamic nature of Python which allows this sort of idea, but makes it unworkable in a static language like D? Anyway it's a neat idea that seems to me to have potential to take us beyond the same old event-driven paradigm that's been rehashed for years and starts to get quite cumbersome beyond a certain point. Another interesting GUI-related lib from Python-land that I have my eye on is Traits from Enthought [2]. Traits are sort of objects that wrap a state value and automatically generate callbacks. So the core actually doesn't have anything to do with GUI-ness. More like a mechanism for state managment + signals. But Traits also work with TraitsUI to create GUIs automatically from your Traits with very little extra coding. That part seems quite useful for creating quick GUI scripts and mockups, but less useful for creating a big app like an IDE. I haven't worked with Traits much, though, so maybe it scales up better than I think. --bb Links: [1] http://cheeseshop.python.org/pypi/Trellis/0.5b1 [2] http://code.enthought.com/traits/
Nov 26 2007
Bill Baxter wrote:(with a nod to Don ;) No, I don't have the perfect GUI. I'm just throwing this out as a topic for discussion. I've yet to find a GUI that isn't tedious to use. With 2.0 const hopefully nearing completion, and the new closure support in 2.0, maybe it's a good time to dream again about what the ultimate D GUI would look like. [...]I recently met someone [1] on IRC asking nearly exactly the same question, who is working one something. I suppose this is going to be an interesting discussion... regards, frank [1] I won't disclose his identity, but I suppose he'll word up... =)
Nov 26 2007
Another interesting idea is immediate mode gui. It basically means that no or almost no state is maintained, at least as far as the user is concerned. Instead, the gui is recreated as needed. I've been playing a bit with it and it works nicely, but somehow I had some trouble with more complex gui's. Here's a link, the video is worth it imo: https://mollyrocket.com/forums/viewtopic.php?t=134
Nov 26 2007
Lutger wrote:Another interesting idea is immediate mode gui. It basically means that no or almost no state is maintained, at least as far as the user is concerned. Instead, the gui is recreated as needed. I've been playing a bit with it and it works nicely, but somehow I had some trouble with more complex gui's. Here's a link, the video is worth it imo: https://mollyrocket.com/forums/viewtopic.php?t=134Recently on IRC: [02:17] <*******> it will have arbitrary theming, backends/rendering engines, probably arbitrary shapes for windows and widgets, easy new widget creation, immediate mode interface, will be extremely configurable, etc, etc :P Whoa, I hope ******* will forgive me this... The GUI is a work in progress, and I don't want to bugger up his timing. Therefore I'll mention it no more. =) regards, frank
Nov 26 2007
0ffh wrote:Lutger wrote:Sounds quite feature-full. But noticeably lacking is any mention of how messaging and state management will work. To me that's the real heart of it. You can always gussy up a GUI with pretty themes later, but if the notification and state management mechanisms aren't solid, then actually coding with it will always be painful. --bbAnother interesting idea is immediate mode gui. It basically means that no or almost no state is maintained, at least as far as the user is concerned. Instead, the gui is recreated as needed. I've been playing a bit with it and it works nicely, but somehow I had some trouble with more complex gui's. Here's a link, the video is worth it imo: https://mollyrocket.com/forums/viewtopic.php?t=134Recently on IRC: [02:17] <*******> it will have arbitrary theming, backends/rendering engines, probably arbitrary shapes for windows and widgets, easy new widget creation, immediate mode interface, will be extremely configurable, etc, etc :P
Nov 26 2007
Bill Baxter wrote:Sounds quite feature-full. But noticeably lacking is any mention of how messaging and state management will work. To me that's the real heart of it. You can always gussy up a GUI with pretty themes later, but if the notification and state management mechanisms aren't solid, then actually coding with it will always be painful.Seems like "event processing will be done like in harmonia, that is, thru sinking and bubbling. the default rendering engine will be OpenGL + FreeType2. themes will be defined using css-alike configs, but they will be able to completely redefine what compound widgets (like buttons) are. /the api will be insane/". [my italics] We can confirm that here: http://paste.dprogramming.com/dphz72yh Is a sample of approximately how it will look like to use it... =) regards, frank
Nov 28 2007
0ffh wrote:Bill Baxter wrote:Harmonia was in its death throes when I came on the scene, so I don't know much about it.Sounds quite feature-full. But noticeably lacking is any mention of how messaging and state management will work. To me that's the real heart of it. You can always gussy up a GUI with pretty themes later, but if the notification and state management mechanisms aren't solid, then actually coding with it will always be painful.Seems like "event processing will be done like in harmonia, that is, thru sinking and bubbling.the default rendering engine will be OpenGL + FreeType2.Ok, so it's a game GUI then. Not too likely to become the "GUI to end all GUI libraries" then, but maybe the game GUI to end all game GUI libraries. I'm interested int that, but I'd also like to have something with at least real native menus, popup windows, text widgets (for I18N text), and dialog boxes. Maybe they have some plan for that, though. themes will be defined using css-alike configs, but they willbe able to completely redefine what compound widgets (like buttons) are. /the api will be insane/". [my italics]I'm not sure insanity is something to strive for in an API... unless you are a Perl coder, maybe.We can confirm that here: http://paste.dprogramming.com/dphz72yh Is a sample of approximately how it will look like to use it... =) regards, frankIt looks like the code from those Polish game guys' GUI. I never can remember the name -- team Decad3nce or something. It also looks to be an immediate mode GUI. Very interesting, anyway. Should be good for game GUIs. Looking forward to a more formal announcement. --bb
Nov 28 2007
Bill Baxter wrote:0ffh wrote:It used/uses an event processing system called 'sinking and bubbling' which is superior to anything in existence ;)Seems like "event processing will be done like in harmonia, that is, thru sinking and bubbling.Harmonia was in its death throes when I came on the scene, so I don't know much about it.Other rendering engines will be possible, yet native backends (thus native widgets) are not planned. Unicode text rendering will be supported :)the default rendering engine will be OpenGL + FreeType2.Ok, so it's a game GUI then. Not too likely to become the "GUI to end all GUI libraries" then, but maybe the game GUI to end all game GUI libraries. I'm interested int that, but I'd also like to have something with at least real native menus, popup windows, text widgets (for I18N text), and dialog boxes. Maybe they have some plan for that, though.themes will be defined using css-alike configs, but they willInsanity is not the goal, it's the side effect of the design and D's features / limitations. It would be nicer if D had 'trailing delegates', then the 'insane' opIndex would not be needed.be able to completely redefine what compound widgets (like buttons) are. /the api will be insane/". [my italics]I'm not sure insanity is something to strive for in an API... unless you are a Perl coder, maybe.LOL :D Team0xf :> We used an early version of the GUI in Deadlock. The GUI is a hybrid between IMGUIs and RMGUIs (it's called Hybrid, too). It does background caching and matching of widgets between frames for performance and state retaining reasonsWe can confirm that here: http://paste.dprogramming.com/dphz72yh Is a sample of approximately how it will look like to use it... =) regards, frankIt looks like the code from those Polish game guys' GUI. I never can remember the name -- team Decad3nce or something. It also looks to be an immediate mode GUI.Very interesting, anyway. Should be good for game GUIs. Looking forward to a more formal announcement.Thanks :) Well, you can take a look at the prototype at http://h3r3tic.googlecode.com/svn/trunk/HybridGUI/ Rather oldish screenies: http://h3.team0xf.com/proj/hybrid/1.png http://h3.team0xf.com/proj/hybrid/2.png http://h3.team0xf.com/proj/hybrid/3.png http://h3.team0xf.com/proj/hybrid/4.png (text rendering got better) Also, old demos at: http://code.google.com/p/h3r3tic/downloads/list I'm not going to post a more formal announcement very soon, as I'm currently rewriting Hybrid to use Tango and support more features, like the extremely flexible theming. When that's done, there will definitely be an .announce post :) Frank: Thanks for posting and letting me know about this thread :) -- Tomasz Stachowiak http://h3.team0xf.com/ h3/h3r3tic on #D freenode
Nov 28 2007
Tom S wrote:Bill Baxter wrote:Gee thanks, that really clears it up for me. :-P But you're wrong anyway. Few people know it, but the most superior event processing system ever was the 'skulking and babbling' system invented at Xerox Parc, and promptly forgotten. By everyone. :-P0ffh wrote:It used/uses an event processing system called 'sinking and bubbling' which is superior to anything in existence ;)Seems like "event processing will be done like in harmonia, that is, thru sinking and bubbling.Harmonia was in its death throes when I came on the scene, so I don't know much about it.Yeh, I'm not so concerned about rendering text as input. Rendering is pretty easy with FreeType. But Asian languages tend to require special input methods that guess which word you mean from the phonetics you type. And you just ain't gonna re-invent that.Other rendering engines will be possible, yet native backends (thus native widgets) are not planned. Unicode text rendering will be supported :)the default rendering engine will be OpenGL + FreeType2.Ok, so it's a game GUI then. Not too likely to become the "GUI to end all GUI libraries" then, but maybe the game GUI to end all game GUI libraries. I'm interested int that, but I'd also like to have something with at least real native menus, popup windows, text widgets (for I18N text), and dialog boxes. Maybe they have some plan for that, though.Still, that's a pretty clever and fairly clean work-around.themes will be defined using css-alike configs, but they willInsanity is not the goal, it's the side effect of the design and D's features / limitations. It would be nicer if D had 'trailing delegates', then the 'insane' opIndex would not be needed.be able to completely redefine what compound widgets (like buttons) are. /the api will be insane/". [my italics]I'm not sure insanity is something to strive for in an API... unless you are a Perl coder, maybe.Interesting. I do remember the name "hybrid" from before, but I had no idea what it meant at the time (or what "immediate mode gui" meant for that matter -- now I do thanks to Lutger's MollyRocket link.)LOL :D Team0xf :> We used an early version of the GUI in Deadlock. The GUI is a hybrid between IMGUIs and RMGUIs (it's called Hybrid, too). It does background caching and matching of widgets between frames for performance and state retaining reasonsWe can confirm that here: http://paste.dprogramming.com/dphz72yh Is a sample of approximately how it will look like to use it... =) regards, frankIt looks like the code from those Polish game guys' GUI. I never can remember the name -- team Decad3nce or something. It also looks to be an immediate mode GUI.Frank: Thanks for posting and letting me know about this thread :)Thanks for 'outing' yourself ;-). One thing I noticed last time you posted something about this library was that the code for a gui is nested like 12 levels deep. I'm guessing it's possible to call out to actual separate functions for panels rather than using an in-line delegate for everything? That would make it easier to see the high-level organization of a big GUI I think. And maybe allow you to re-use a common panel on multiple screens, etc. It's just all in one honking huge function for demo purposes, I guess? --bb
Nov 28 2007
Bill Baxter wrote:LOL :D Well, the concept was explained here: http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.dwt&artnum=61 As for event handling itself, most of it will happen in immediate mode, e.g. if (Button().stuff().clicked) { ... }It used/uses an event processing system called 'sinking and bubbling' which is superior to anything in existence ;)Gee thanks, that really clears it up for me. :-P But you're wrong anyway. Few people know it, but the most superior event processing system ever was the 'skulking and babbling' system invented at Xerox Parc, and promptly forgotten. By everyone. :-PYeh, I'm not so concerned about rendering text as input. Rendering is pretty easy with FreeType. But Asian languages tend to require special input methods that guess which word you mean from the phonetics you type. And you just ain't gonna re-invent that.Can't OS APIs do that? :o Sorry, I'm not an Asian ;DStill, that's a pretty clever and fairly clean work-around.Thanks :)Thanks for 'outing' yourself ;-). One thing I noticed last time you posted something about this library was that the code for a gui is nested like 12 levels deep. I'm guessing it's possible to call out to actual separate functions for panels rather than using an in-line delegate for everything?Sure thing! I used that in Deadlock. The nesting is mainly due to use of many VBoxes and HBoxes (like in GTK) for layout. If I figure out how to do layout better, that might as well get pretty flat.That would make it easier to see the high-level organization of a big GUI I think. And maybe allow you to re-use a common panel on multiple screens, etc. It's just all in one honking huge function for demo purposes, I guess?Yup, that's just a simple test. There's nothing magical about the code that may be used there. On an additional note, the delegates passed to the overloaded opIndex are executed in the same context, so there are no worries about escaping references / lack of 'full' closures in D1.0. -- Tomasz Stachowiak http://h3.team0xf.com/ h3/h3r3tic on #D freenode
Nov 28 2007
Tom S wrote:Bill Baxter wrote:Ah, ok. Makes sense now. Yes that is nice. It drives me mad in wxWidgets that only that *one* widget gets the event, except . I can't remember what Qt does there. But that percolation is great, and very nice to have it both ways. I think it's less popular in things like wx because they go way back to the days when we didn't have two spare cycles to rub together. These days there's not much reason to do the whole chain of responsibility thing for every event. We have the cycles.LOL :D Well, the concept was explained here: http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digital ars.D.dwt&artnum=61It used/uses an event processing system called 'sinking and bubbling' which is superior to anything in existence ;)Gee thanks, that really clears it up for me. :-P But you're wrong anyway. Few people know it, but the most superior event processing system ever was the 'skulking and babbling' system invented at Xerox Parc, and promptly forgotten. By everyone. :-PAs for event handling itself, most of it will happen in immediate mode, e.g. if (Button().stuff().clicked) { ... }Yes, every OS has it's own APIs to do it that work with varying degrees of success. I don't want to have to write the code to interface with every platform's particular way of doing it. There are also things like accessibility that come into play. Screen readers and such don't know that the little rectangle on the screen you're drawing is a text box. There are probably OS hooks for that too, on OS'es that have such things, but again, I want the GUI library to handle that for me so I don't have to worry about it and it Just Works (TM). Both of those are fairly small issues in the grand scheme, but they are roadblocks on the way to being the gui to end all guis. --bbYeh, I'm not so concerned about rendering text as input. Rendering is pretty easy with FreeType. But Asian languages tend to require special input methods that guess which word you mean from the phonetics you type. And you just ain't gonna re-invent that.Can't OS APIs do that? :o Sorry, I'm not an Asian ;D
Nov 28 2007
Bill Baxter wrote:Tom S wrote:I can't either, but the sinking/bubling reminds me of how GTK+ handles events -- although I think that there the traversal is only unidirectional. Every widget in the chain can act on an event, and either stop the traversal (handled) or let it bubble further up the chain. There is also a filtering mechanism, so widgets can be configured to never receive events that they are not interested in. Good to know that wxWidgets has that limitation. We have considered using it, but went for GTK+ instead. Bastiaan.Bill Baxter wrote:Ah, ok. Makes sense now. Yes that is nice. It drives me mad in wxWidgets that only that *one* widget gets the event, except . I can't remember what Qt does there.LOL :D Well, the concept was explained here: http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digital ars.D.dwt&artnum=61It used/uses an event processing system called 'sinking and bubbling' which is superior to anything in existence ;)Gee thanks, that really clears it up for me. :-P But you're wrong anyway. Few people know it, but the most superior event processing system ever was the 'skulking and babbling' system invented at Xerox Parc, and promptly forgotten. By everyone. :-P
Nov 29 2007
Bastiaan Veelo wrote:Bill Baxter wrote:Yeh, actually this is the first I've heard of a toolkit that percolates both down and then up. But I'd guess percolating up starting with the deepest widget probably covers 90% of practical cases.Tom S wrote:I can't either, but the sinking/bubling reminds me of how GTK+ handles events -- although I think that there the traversal is only unidirectional. Every widget in the chain can act on an event, and either stop the traversal (handled) or let it bubble further up the chain. There is also a filtering mechanism, so widgets can be configured to never receive events that they are not interested in.Bill Baxter wrote:Ah, ok. Makes sense now. Yes that is nice. It drives me mad in wxWidgets that only that *one* widget gets the event, except . I can't remember what Qt does there.LOL :D Well, the concept was explained here: http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digital ars.D.dwt&artnum=61It used/uses an event processing system called 'sinking and bubbling' which is superior to anything in existence ;)Gee thanks, that really clears it up for me. :-P But you're wrong anyway. Few people know it, but the most superior event processing system ever was the 'skulking and babbling' system invented at Xerox Parc, and promptly forgotten. By everyone. :-PGood to know that wxWidgets has that limitation. We have considered using it, but went for GTK+ instead.wxWidgets does percolate some kinds of events up the chain like command events. Like if you click on a button you get that event at the button, at the parent, and on up until someone says they handled it. But if it makes sense to do it for those kinds of things then it makes sense to do it for everything. --bb
Nov 29 2007
Op Thu, 29 Nov 2007 02:27:52 +0100, schreef Tom S:Sure thing! I used that in Deadlock. The nesting is mainly due to use of many VBoxes and HBoxes (like in GTK) for layout. If I figure out how to do layout better, that might as well get pretty flat.Gtk also has grid/table layouts, and some programmes and libraries migh have additional layout containers (e.g. column containers that balance their subitems over a number of columns). -- JanC
Nov 29 2007
Tom S wrote:The GUI is a hybrid between IMGUIs and RMGUIs (it's called Hybrid, too).By the way, if you have big plans for your GUI you may want to consider altering the name slightly so as not to raise the eybrows of the the lawyers from the Hybrid graphics/game tools company, http://www.hybrid.fi/ -- whoops make that the NVIDIA laywers! --bb
Nov 28 2007
Bill Baxter wrote:Tom S wrote:I say, sometimes it's very useful to have a graphics specialist at hand! :) regards, frankThe GUI is a hybrid between IMGUIs and RMGUIs (it's called Hybrid, too).By the way, if you have big plans for your GUI you may want to consider altering the name slightly so as not to raise the eybrows of the the lawyers from the Hybrid graphics/game tools company, http://www.hybrid.fi/ -- whoops make that the NVIDIA laywers!
Nov 28 2007
Bill Baxter wrote:Tom S wrote:Hah! It may be called HybridGUI :P Thanks for the hint ;) -- Tomasz Stachowiak http://h3.team0xf.com/ h3/h3r3tic on #D freenodeThe GUI is a hybrid between IMGUIs and RMGUIs (it's called Hybrid, too).By the way, if you have big plans for your GUI you may want to consider altering the name slightly so as not to raise the eybrows of the the lawyers from the Hybrid graphics/game tools company, http://www.hybrid.fi/ -- whoops make that the NVIDIA laywers!
Nov 28 2007
Lutger wrote:Another interesting idea is immediate mode gui. It basically means that no or almost no state is maintained, at least as far as the user is concerned. Instead, the gui is recreated as needed. I've been playing a bit with it and it works nicely, but somehow I had some trouble with more complex gui's. Here's a link, the video is worth it imo: https://mollyrocket.com/forums/viewtopic.php?t=134What worries me about immediate mode guis is performance. I suppose they are great for building the gui portion of a game or some really flashy app but I don't see an improvement for typical applications where the gui doesn't change unless until it receives some input from the user. Just picture a dumb +30 fields form that's using 100% CPU because it is repainting it self every frame. -- Julio César Carrascal Urquijo http://jcesar.artelogico.com/
Nov 26 2007
Julio César Carrascal Urquijo wrote:Lutger wrote:My guess is that, like OpenGL programs, you don't have to refresh regularly if nothing is happening. But if something does happen then, yes, you do need to repaint everything. --bbAnother interesting idea is immediate mode gui. It basically means that no or almost no state is maintained, at least as far as the user is concerned. Instead, the gui is recreated as needed. I've been playing a bit with it and it works nicely, but somehow I had some trouble with more complex gui's. Here's a link, the video is worth it imo: https://mollyrocket.com/forums/viewtopic.php?t=134What worries me about immediate mode guis is performance. I suppose they are great for building the gui portion of a game or some really flashy app but I don't see an improvement for typical applications where the gui doesn't change unless until it receives some input from the user. Just picture a dumb +30 fields form that's using 100% CPU because it is repainting it self every frame.
Nov 26 2007
Bill Baxter wrote:My guess is that, like OpenGL programs, you don't have to refresh regularly if nothing is happening. But if something does happen then, yes, you do need to repaint everything. --bbWell, from what I've seen before they refresh the screen each frame. Even in the video in the OP, the guy says something like: If you don't want some widget painted you just don't paint it. -- Julio César Carrascal Urquijo http://jcesar.artelogico.com/
Nov 26 2007
Julio César Carrascal Urquijo wrote:Bill Baxter wrote:That's because it's discussed in the context of games, but such a frame based approach is not neccessary.My guess is that, like OpenGL programs, you don't have to refresh regularly if nothing is happening. But if something does happen then, yes, you do need to repaint everything. --bbWell, from what I've seen before they refresh the screen each frame. Even in the video in the OP, the guy says something like: If you don't want some widget painted you just don't paint it.
Nov 27 2007
Julio César Carrascal Urquijo wrote:What worries me about immediate mode guis is performance. I suppose they are great for building the gui portion of a game or some really flashy app but I don't see an improvement for typical applications where the gui doesn't change unless until it receives some input from the user. Just picture a dumb +30 fields form that's using 100% CPU because it is repainting it self every frame.You can, instead of using a frame-based approach, repaint as needed. The lack of state is in the interface, behind the scenes a library can do caching. I don't remember the link, but there was some guy who rewrote his traditional gui for a cellphone to an imgui one, and stated that performance was about the same. One benefit though is that in normal gui's, a whole lot a state is retained and duplicated between the application and the gui library. In complex application, that sucks performance.
Nov 27 2007
Lutger wrote:You can, instead of using a frame-based approach, repaint as needed. The lack of state is in the interface, behind the scenes a library can do caching. I don't remember the link, but there was some guy who rewrote his traditional gui for a cellphone to an imgui one, and stated that performance was about the same. One benefit though is that in normal gui's, a whole lot a state is retained and duplicated between the application and the gui library. In complex application, that sucks performance.All the implementations I've seen use real-time redrawing which is obviously overkill for this type of application. But you are right, it is certainly possible. -- Julio César Carrascal Urquijo http://jcesar.artelogico.com/
Nov 28 2007
Julio César Carrascal Urquijo wrote:Lutger wrote:Casey does mention it as a drawback of immediate mode GUI in the video. If you want lazy updates, the burden of implementing it is on the application as opposed to retained mode GUIs where the toolkit can handle it for you. But even then a lot of GUI systems have some sort of update() or refresh() call that you have to remember to call to tell it that something changed. So it's not that different I don't think. --bbYou can, instead of using a frame-based approach, repaint as needed. The lack of state is in the interface, behind the scenes a library can do caching. I don't remember the link, but there was some guy who rewrote his traditional gui for a cellphone to an imgui one, and stated that performance was about the same. One benefit though is that in normal gui's, a whole lot a state is retained and duplicated between the application and the gui library. In complex application, that sucks performance.All the implementations I've seen use real-time redrawing which is obviously overkill for this type of application. But you are right, it is certainly possible.
Nov 28 2007
Bill Baxter wrote:Julio César Carrascal Urquijo wrote:In my toy imgui, I only update when there are events, and even then only when some state has changed the thing need to be rendered again. This is all behind the scenes though, so the user doesn't have to do anything. This is lazy enough in practice, I guess it's a trade between executing the gui logic on every event in the imgui case and retaining state in rmgui.Lutger wrote:Casey does mention it as a drawback of immediate mode GUI in the video. If you want lazy updates, the burden of implementing it is on the application as opposed to retained mode GUIs where the toolkit can handle it for you. But even then a lot of GUI systems have some sort of update() or refresh() call that you have to remember to call to tell it that something changed. So it's not that different I don't think. --bbYou can, instead of using a frame-based approach, repaint as needed. The lack of state is in the interface, behind the scenes a library can do caching. I don't remember the link, but there was some guy who rewrote his traditional gui for a cellphone to an imgui one, and stated that performance was about the same. One benefit though is that in normal gui's, a whole lot a state is retained and duplicated between the application and the gui library. In complex application, that sucks performance.All the implementations I've seen use real-time redrawing which is obviously overkill for this type of application. But you are right, it is certainly possible.
Nov 29 2007
Lutger wrote: ...In my toy imgui, I only update when there are events, and even then only when some state has changed the thing need to be rendered again. This is all behind the scenes though, so the user doesn't have to do anything. This is lazy enough in practice, I guess it's a trade between executing the gui logic on every event in the imgui case and retaining state in rmgui.To clarify, state in imgui is handled mostly implicitly by the library and is usually a small constant, while with rmgui the user has to do bookkeeping herself and the state involved grows proportionally with the size of the gui.
Nov 29 2007
Lutger wrote:Another interesting idea is immediate mode gui. It basically means that no or almost no state is maintained, at least as far as the user is concerned. Instead, the gui is recreated as needed. I've been playing a bit with it and it works nicely, but somehow I had some trouble with more complex gui's. Here's a link, the video is worth it imo: https://mollyrocket.com/forums/viewtopic.php?t=134Very interesting. I watched the first few minutes and read some of the comments on the web page. Looking forward to checking out the whole video when I have the time. --bb
Nov 26 2007
Also, I've been quite satisfied with DFL, which is a mature solution for Windows and moving towards the Xes. regards, frank
Nov 26 2007
0ffh wrote:Also, I've been quite satisfied with DFL, which is a mature solution for Windows and moving towards the Xes.I've started using DFL too. It seems to be the easiest thing to use right now. But it's still pretty typical in its event driven design, and lacks many convenience features I've become accustom to in other toolkits. Things like managing tooltips, status messages, and gui state updates (e.g. whether a menu item should show checked/unchecked based on current state). --bb
Nov 26 2007
0ffh wrote:Also, I've been quite satisfied with DFL, which is a mature solution for Windows and moving towards the Xes. regards, frankX-platform DFL/Entice would be enough to satisfy me GUI wise. I don't need any fancy new features that will be obsolete in a couple years, just a solid, functioning easy to use GUI. :-P ~ Clay
Nov 26 2007
Bill Baxter wrote:The basic idea is that you define rules rather than explicit event handlers, and execution of those rules is triggered by built-in dependency analysis. The analogy made on the web page is to a spreadsheet. When you use a spreadsheet you just say how the values in this cell depend on all the others and then it all gets automagically updated for you recursively whenever any dependency changes.So a largely functional GUI framework. I think that could work decently, though you'd need to define multiple input sources, one of them being the non-GUI portion of your application.So I wonder if something like this could be done in D. Or is there something about the dynamic nature of Python which allows this sort of idea, but makes it unworkable in a static language like D?Anyway it's a neat idea that seems to me to have potential to take us beyond the same old event-driven paradigm that's been rehashed for years and starts to get quite cumbersome beyond a certain point.One complex part is ordering event handlers. I have an event that five things listen to, but one handler has to fire before another, which has to fire before a third. I haven't seen much else cumbersome with it yet, but I'm still young :) What problems have you encountered?Another interesting GUI-related lib from Python-land that I have my eye on is Traits from Enthought [2].I don't see how this would work. Do you register an event handler, essentially, and that is used to determine which GUI components to show? For me, I want codegen for my GUI stuff, and as little code as possible interacting directly with that generated code as possible. I also want something that makes model/view/presenter easy to use, or at least that lets me use mock objects with minimal fuss. And I want a dependency injection framework.--bb Links: [1] http://cheeseshop.python.org/pypi/Trellis/0.5b1 [2] http://code.enthought.com/traits/
Nov 26 2007
/me shakes his head. A black screen is the perfect GUI. The machine must interpret my intentions and perform my every wish. I shall be at the beach enjoying iced tea.
Nov 26 2007
On Tue, 27 Nov 2007 01:44:38 -0000, Bill Baxter <dnewsgroup billbaxter.com> wrote:(with a nod to Don ;) No, I don't have the perfect GUI. I'm just throwing this out as a topic for discussion. I've yet to find a GUI that isn't tedious to use. With 2.0 const hopefully nearing completion, and the new closure support in 2.0, maybe it's a good time to dream again about what the ultimate D GUI would look like. I don't have anything concrete, but I was thinking a bit about some interesting GUI-ish things from Python recently and thought I'd mention them here. There's a library called "Trellis" [1] that I think has an interesting idea for how to maintain GUI state. The basic idea is that you define rules rather than explicit event handlers, and execution of those rules is triggered by built-in dependency analysis. The analogy made on the web page is to a spreadsheet. When you use a spreadsheet you just say how the values in this cell depend on all the others and then it all gets automagically updated for you recursively whenever any dependency changes.All you need is an updateWindow function. Perhaps instead of D a suitably enhanced version of make is what we require. ;)
Nov 27 2007
I would like a versatile GUI with many rendering back-ends (X/SDL/OpenGL) because I'd like to start working on an equivalent of openFrameworks (openframeworks.cc/forum) in D (this is a bit like processing, but written in C++ to be more efficient although it cannot be shown on the web like Java/Flash -- how about a VM for D with a firefox plug-in =) ?), this would be the equivalent of the 'Element' project that seems to have stalled, somehow ...
Nov 27 2007
Bill Baxter wrote:(with a nod to Don ;) No, I don't have the perfect GUI. I'm just throwing this out as a topic for discussion. I've yet to find a GUI that isn't tedious to use. With 2.0 const hopefully nearing completion, and the new closure support in 2.0, maybe it's a good time to dream again about what the ultimate D GUI would look like.There is a few good ideas in this video http://video.google.com/videoplay?docid=9052934777843395388
Nov 27 2007
Bill Baxter wrote:(with a nod to Don ;) No, I don't have the perfect GUI. I'm just throwing this out as a topic for discussion. I've yet to find a GUI that isn't tedious to use. With 2.0 const hopefully nearing completion, and the new closure support in 2.0, maybe it's a good time to dream again about what the ultimate D GUI would look like.I like lots of ideas from WPF: http://en.wikipedia.org/wiki/Windows_Presentation_Foundation
Nov 27 2007
Ary Borenszweig wrote:Bill Baxter wrote:Could you sum them up here, the ones you like most? Bastiaan.(with a nod to Don ;) No, I don't have the perfect GUI. I'm just throwing this out as a topic for discussion. I've yet to find a GUI that isn't tedious to use. With 2.0 const hopefully nearing completion, and the new closure support in 2.0, maybe it's a good time to dream again about what the ultimate D GUI would look like.I like lots of ideas from WPF: http://en.wikipedia.org/wiki/Windows_Presentation_Foundation
Nov 29 2007
Bill Baxter wrote:(with a nod to Don ;) No, I don't have the perfect GUI. I'm just throwing this out as a topic for discussion. I've yet to find a GUI that isn't tedious to use. With 2.0 const hopefully nearing completion, and the new closure support in 2.0, maybe it's a good time to dream again about what the ultimate D GUI would look like.I was thinking maybe we can learn something from Ruby on rails ! All the app needs to define is the model, then the framework define the control and the view. First the apps menues is just a way to call functions. new appdata file_new(); void file_save(const appdata , filename afilename); void file_save_as(const appdata , const filename afilename); new (appdata,filename afilename) file_open(filename); Would define the file menu with new,save, save_as and open, the app. should only specify the apps functionality every thing else should be themed an styled via the gui framework or by the desktop or window manager. The first line: new appdata file_new(); tell the framework that selecting the menu file->new create a new container of type appdata, the styling of the gui framework decide if this is done in a new window or tab. The next line: void file_save(const appdata , filename afilename); tells the gui to open at dialog which allow a filename to be chosen and use the content of afilename as a default. const appdata tells the gui that the dialog should not edit appdata. The line: new (appdata, filename afilename) file_open(filename); tells the gui to open the file dialog and then load the file into a new container. Hope this is understandably. Knud
Nov 29 2007
not that it might end all GUI libs, but i was starting to write a Qt-ish GUI framework (i.e. signals&slots) that can load widget layouts from e.g. XML files at runtime (signal connection at runtime using runtime reflection). rendering will be done with OpenGL, but is abstracted s.t. any renderer can be added. i ran out of time, but i'll need it in a future not too far away and continue work on it then.
Nov 30 2007