Thread: xuni: a Graphical User Interface Widget Toolkit

  1. #31
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,057
    Weird. I got Sourceforge to replace my SVN repository again. They replaced my repository by adding each revision, one by one. I performed some SVN commands; each time I did so, the version number went up.

    The whole process took several minutes. I can see how replacing a large SVN repository might take some time.

    Anyway, the reason I was trying this was because I wanted to make sure this worked. I've uploaded SVN version 92, but again there aren't any binaries just yet. You can see the changelog like this.
    Code:
    svn log -r 92 https://xuni.svn.sourceforge.net/svnroot/xuni/xuni/trunk
    Note that version 92 isn't as stable as previous versions. Oh, it runs, but the new horizontal scrollbars look rather strange.
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  2. #32
    Woof, woof! zacs7's Avatar
    Join Date
    Mar 2007
    Location
    Australia
    Posts
    3,459
    Seriously, If you're willing to turn this into a full on project I'd love to help. I need team expirience and a project atm

    Mainly because there isn't a plain, simple, full-featured UI toolkit for OpenGL written in C

  3. #33
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,057
    Note: binaries for xuni-0.3.0-svn-92 released. http://sourceforge.net/project/showf...roup_id=223060

    While I have a project, I need team experience too. I'd love to have your help.

    Your first assignment: convert xuni to OpenGL.

    Just kidding. Like I said, it would be a pretty big job. xuni uses a lot of SDL-specific functions.
    Code:
    === SDL (note: includes SDL_framerate functions from SDL_gfx)
    SDL_CreateCursor SDL_CreateRGBSurface SDL_DisplayFormatAlpha SDL_EnableKeyRepeat
    SDL_EnableUNICODE SDL_EnableUNICODE SDL_FillRect SDL_FillRect SDL_framerateDelay
    SDL_FreeCursor SDL_FreeSurface SDL_FreeSurface SDL_FreeSurface SDL_GetAppState
    SDL_GetCursor SDL_GetError SDL_GetError SDL_GetMouseState SDL_GetMouseState
    SDL_GetMouseState SDL_GetRelativeMouseState SDL_GetRGBA SDL_Init
    SDL_initFramerate SDL_ListModes SDL_LoadFunction SDL_LoadObject SDL_LockSurface
    SDL_MapRGB SDL_MapRGB SDL_PollEvent SDL_Quit SDL_RWFromFile SDL_SaveBMP_RW
    SDL_SetColorKey SDL_SetCursor SDL_setFramerate SDL_SetVideoMode SDL_ShowCursor
    SDL_UnloadObject SDL_UnlockSurface SDL_UpdateRect SDL_UpperBlit SDL_WaitEvent
    SDL_WarpMouse SDL_WarpMouse SDL_WM_GrabInput SDL_WM_IconifyWindow
    SDL_WM_SetCaption SDL_WM_SetIcon SDL_WM_ToggleFullScreen 
    === SDL_gfx
    gfxPrimitivesSetFont gfxPrimitivesSetFont rotozoomSurface SDL_framerateDelay
    SDL_initFramerate SDL_setFramerate stringRGBA vlineRGBA zoomSurface 
    === SDL_image
    IMG_Load
    === SDL_ttf
    TTF_CloseFont TTF_CloseFont TTF_FontHeight TTF_Init TTF_OpenFont TTF_Quit
    TTF_RenderText_Blended TTF_SetFontStyle TTF_SizeText
    (I'm sorry for the duplicate functions. Blame ld, not me.)

    And then there's all of the SDL macros/constants used throughout the code, i.e. SDLK_ESCAPE and so on.

    I know very little about OpenGL, but I think it would be possible to convert all of xuni's SDL dependencies into OpenGL ones. A good start would be reviewing the prototypes in graphics.h (the names are reasonably descriptive) to see if OpenGL has an equivalent.

    You're right about there not being very many GUI toolkits for OpenGL, though. Agar is pretty nice, and there are others out there, but they are nearly all C++.

    By the way, do you have any experience with git or Mercurial or bzr? (I have very little experience with any VCSs outside of Subversion, and a bit of CVS.) If someone else were to help me with xuni, it would probably have to use a distributed version control system instead of SVN. The main reason for this is that I'm using a local SVN repository as the "master" one that I commit to and everything, because I so rarely get online. I then replace the SVN repository on Sourceforge with mine whenever I get around to it. So this wouldn't work very well with multiple developers.

    BTW, in a modified version of SVN 92, I made xuni only rescale images when they need to be painted. It just means it's a bit slow when you switch to a menu for the first time, for example. It helps xuni's memory consumption, assuming you don't visit all of the menus, and speeds up rescaling immensely.

    I'm considering keeping xuni this way. Or maybe make another thread to do rescaling, so that xuni is repainted at a reasonable rate. On slower computers xuni was taking several seconds (sometimes five or six) to rescale everything, especially since the addition of the new theme glowbox, which has very big images.

    You should see glowbox, by the way. I think it's quite neat, but not neat enough to make it xuni's default theme.
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  4. #34
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,412
    By the way, do you have any experience with git or Mercurial or bzr? (I have very little experience with any VCSs outside of Subversion, and a bit of CVS.) If someone else were to help me with xuni, it would probably have to use a distributed version control system instead of SVN. The main reason for this is that I'm using a local SVN repository as the "master" one that I commit to and everything, because I so rarely get online. I then replace the SVN repository on Sourceforge with mine whenever I get around to it. So this wouldn't work very well with multiple developers.
    I could help you out if you need help in bzr.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  5. #35
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,057
    I appreciate your offer. I'm sure I'd have a lot of questions about it, judging by how long it took me to figure out SVN . . . .

    Did you ever try out any other systems? What made you choose Bazaar?
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  6. #36
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,412
    Did you ever try out any other systems?
    Subversion, and to a lesser extent, CVS.

    What made you choose Bazaar?
    I wanted to keep a local SVN repository but also publish to a Sourceforge SVN repository. Sounds familiar?

    I did not choose git and Mercurial because I did not hear of them at the time. Ironically, I got to know of both after I subscribed to the Bazaar mailing list, but the poor Windows support of git discouraged me from switching even though Bazaar was slow then (and still is now, where projects the size of Linux or Mozilla are concerned).
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  7. #37
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,057
    Quote Originally Posted by laserlight View Post
    Subversion, and to a lesser extent, CVS.

    I wanted to keep a local SVN repository but also publish to a Sourceforge SVN repository. Sounds familiar?
    Yes, indeed.

    I did not choose git and Mercurial because I did not hear of them at the time. Ironically, I got to know of both after I subscribed to the Bazaar mailing list, but the poor Windows support of git discouraged me from switching even though Bazaar was slow then (and still is now, where projects the size of Linux or Mozilla are concerned).
    Windows support would be pretty important to me, I think. But I've heard that git's Windows support is better now. http://en.wikipedia.org/wiki/Git_%28...29#Portability
    Of course, I've never actually tried it.

    I'm pretty sure that speed wouldn't be too much of a problem for quite a while in this case.

    So you would recommend Bazaar then? How well do SVN repositories tend to convert to bzr ones? (I see there's something called svn2bzr, but I wouldn't know how well it works.)

    [edit] Do you need a "master" repository with distributed version control systems? If so, do Sourceforge or Google Code support git or bzr or anything? [/edit]
    Last edited by dwks; 04-16-2008 at 11:52 AM.
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  8. #38
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,412
    So you would recommend Bazaar then?
    Yes, I have been pretty happy with Bazaar so far

    However, note that I am biased since I cannot honestly recommend git or Mercurial because I lack experience with them, e.g., the only reason I installed Mercurial was to figure out how the Netbeans Mercurial plugin worked.

    How well do SVN repositories tend to convert to bzr ones?
    Quite well, apparently. For some reason, bzr-svn, a plugin that allows bzr to interoperate with a SVN repository is all the rage at the moment.

    I see there's something called svn2bzr, but I wouldn't know how well it works.)
    Unfortunately, neither do I as I now entirely work with Bazaar branches. However, as long as you keep your original SVN repository backed up, it should be safe to just give an import a try.

    A good workflow that I recommend for a team is to keep a branch online and treat it as the trunk (or mainline, or whatever you want to call it), and then have a mirror of the trunk in the form of a checkout (or a branch). The development would occur with one or more working branches, each of which is for the development of a particular feature. The checkout of the trunk and the working branches would all reside in a shared repository in order to save space. If multiple developers work on the same feature, they could publish the feature branch online, and then either adopt the same workflow (keep a mirror of the feature branch and have a working branch), or use a centralised workflow with checkouts.

    Oh, and concerning Bazaar terminology:
    branch => akin to a SVN repository
    checkout => akin to a SVN checkout
    repository => storage area for branch/checkout history
    shared repository => shared storage area for history of related branches/checkouts

    Do you need a "master" repository with distributed version control systems? If so, do Sourceforge or Google Code support git or bzr or anything?
    Yes, but there is nothing special about it other than that everyone agrees that a particular repository/branch is The One. As far as I know, neither Sourceforge nor Google Code explicitly support any of the three distributed VCS mentioned in this thread, but you can publish a branch online without installing software on the server, though with the version control software installed operations would be faster. Launchpad explicitly supports Bazaar (they are both funded by Canonical, which also sponsors Ubuntu Linux), but I prefer to use my own VPS.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  9. #39
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,057
    I meant to reply to this earlier. Sorry for the delay, I got started reading some tutorials.

    I just mentioned git, Mercurial, and bazaar because those are the three I gather are the most common. I would prefer to use a reasonably common VCS.

    I think I will experiment with all three of them. Create some new repositories, try exporting xuni from SVN to them, and so on.

    Thanks for the information about bzr. I'll save this page and read it in more detail.

    BTW, you can apparently get the latest source code for the Linux kernel like this:
    Code:
    git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git linux-2.6
    Just thought someone might be interested.
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  10. #40
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,057
    I've decided to try git, because I hear that its Windows support is not bad, and because tracking content rather than files strikes me as an interesting idea . . . I'll let you know how it works. git's index is really nice, for an SVN user like myself.

    I'm trying to upload xuni SVN 93 right now, which should be the last SVN version.

    [edit] It should have worked. Note that I didn't test the binary archives, which was probably a bad idea. [/edit]
    Last edited by dwks; 04-25-2008 at 04:13 PM.
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  11. #41
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,057
    GNU autotools are annoying me. They're much better than my custom Makefiles, it's true, but they don't work on Windows and they're pretty slow. What other build systems are there out there?

    I've heard of SCons, and cons looks similar except for Perl instead of Python (which would be good for me, because I know more Perl than Python). I've never tried either, however. zacs7 mentioned cmake. I did look at it, and it looks pretty complete, with rather similar syntax to autotools.

    What else is out there?
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  12. #42
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,057
    I should probably just leave this thread alone, but I thought I'd just mention one last thing: I've uploaded yet another version of xuni. http://sourceforge.net/project/showf...kage_id=269611

    I called it version git-1, because it's the first time I've made a binary release of xuni since I started using git.

    Which went okay, by the way. I like git better than SVN, for sure. On the other hand, I haven't set up an online repository yet, which was sort of the whole point of using git.
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  13. #43
    Registered User
    Join Date
    Aug 2005
    Posts
    96
    Quote Originally Posted by dwks View Post
    GNU autotools are annoying me. They're much better than my custom Makefiles, it's true, but they don't work on Windows and they're pretty slow. What other build systems are there out there?

    I've heard of SCons, and cons looks similar except for Perl instead of Python (which would be good for me, because I know more Perl than Python). I've never tried either, however. zacs7 mentioned cmake. I did look at it, and it looks pretty complete, with rather similar syntax to autotools.

    What else is out there?
    Bakefile!!!

    http://www.bakefile.org/

    I love it.

  14. #44
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,057
    Bakefile, hmm? It looks interesting. But how is it different from/better than other systems?
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  15. #45
    Registered User
    Join Date
    Aug 2005
    Posts
    96
    Quote Originally Posted by dwks View Post
    Bakefile, hmm? It looks interesting. But how is it different from/better than other systems?
    Well it uses XML for one, and it is more akin to Makefiles than other systems IMO....
    I can't tell you if it is "better" than other systems, but I do know that it is simple, and easy to use (for me at least).

    I'm not really versed in other systems, although I've heard of them (Scons, CMake, etc.)
    Anyways, you could always try it out.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 1
    Last Post: 05-31-2003, 09:07 AM
  2. Contest Results - May 27, 2002
    By ygfperson in forum A Brief History of Cprogramming.com
    Replies: 18
    Last Post: 06-18-2002, 01:27 PM
  3. Creating a User Friendly Interface.
    By jeeva in forum Linux Programming
    Replies: 5
    Last Post: 12-07-2001, 03:14 AM
  4. GUI (Graphical User Interface) Help Needed
    By Unregistered in forum C++ Programming
    Replies: 1
    Last Post: 10-11-2001, 10:35 AM
  5. Non-Standard User Interface
    By Eugene in forum Windows Programming
    Replies: 1
    Last Post: 08-29-2001, 09:43 AM