Skip navigation.

Software Development

Correcting The Future

Project V GUI Update

As an earlier blog entry indicated, I added ICU to handle Unicode. I'm going to update all of Project V to use Unicode. I was using a built-in String class that comes with Borland compilers because it's the default in that environment and is extremely easy to use. But ICU has a UnicodeString class with much more power. So UnicodeString it is.

Another thing was that D3D has no GUI libraries available that work the way I want it. Maybe they do exist. I haven’t encountered it yet. Anyways, I now have almost everything I need except for a full multiline editbox, but I have buttons, image buttons, text display, font handling, edit box, panels, containers, scrollbars and treeviews (simple ones with static sized headers). I'm missing checkboxes, listboxes and dropdown boxes. Those should be easy though compared to editboxes and treeviews.

What started out as something simple is getting awfully involved. It's still easy to use, but there's a LOT there. It supports full transparencies for anything displayed on screen. I still haven't added the code for the speedup, but it is drawing front to back right now. There are two checks I can tell the video card to use for that speedup, but I need to write a pixel shader for one of them. I'll do that later. The GUI is extremely quick the way it is now and offloads most of the work to the video card. The CPU is mostly free even if the screen is fully animated at 60 FPS.

I don't think I would have fully learned about many of these topics if I did not create Project V. I learned the following so far.

  • OpenGL
  • D3D
  • pixel shaders
  • vertex shaders
  • fixed function pipeline
  • Font properties like ppem, FUnits, ascent, descent, height vs. points, etc.
  • Unicode manipulation
  • Glyph Layout and rasterization
  • GUI systems and all its components (editboxes, buttons, etc.)
  • GUI event handling (keyboard and mouse, plus custom events produced by the GUI components)
  • How to handle 4th and 5th mouse buttons (X1 and X2).
  • Plenty of practice using STL in areas I never did before.
  • Type Systems
  • Set theory (ZFC)
  • Data Flow network manipulations


There's probably more, but I can't remember them all. As you can see, all but the last three really have to do with Data Flow Networks. But all the graphical stuff is necessary. Data Flow is visual and I really like to code this stuff up. I wish there were better tools available, but for some reason there isn't much out there for fast graphic manipulation. What I like is that the GUI is portable. It can use any graphical back end quite easily. All the platform dependent stuff is in two or three classes. There's one for textures, another for things the GUI needs like events (keyboard and mouse) and native fonts, and the rest is in initialisation.

Once I'm done those last three GUI components, I'll finally be able to finish the graphical network editing functionality. Network Components are already displayed. I just need to finish up the part that lets you connect components together. And as some of you may recall, I already have my hardware spline code ready to go for this purpose. I still wish I could get the code for these kinds of cubic curves instead of interpolations like I'm doing now.

Here's what's on my TODO list right now.

  • CheckBoxes
  • RadioButtons (and groups) // Low priority
  • ListBox // Low priority
  • DropdownBox
  • StaticText (would take literally 10 minutes to write up)
  • Editing values in type system from GUI (mostly done).
  • Notifications from type system when something changes (not hard, just tedious).
  • Component navigation (boxing, level up, level down)
  • Connections
  • Runtime engine (single core, mostly done)
  • Runtime engine (multicore)
  • Runtime engine (distributed)


Still a lot left to do, but all the hard stuff is done now. The only problem I see is with notifications. I have to write wrappers for GUI components. Basically, I create Project V network components with built in functionality for the GUI components. I'm essentially fooling the type system into thinking that the GUI components are actually Project V network components. If I can get that working, the entire GUI system will be self updating. Sets come to the rescue here again. Anything that wants to be notified simply drops a component in the right set for that object. The difficulty here is that many things can update. Changes for the value are easy. Changes in members and properties are a little less easy. Changes in the type hierarchy are a lot tougher to handle. I already know how to do all of this. It's just a pain that I can't have the sets themselves do the notifications. I have to make sure the GUI goes through a third party to manipulate anything from the type system. This third party will handle all notifications. This is yet another instance where I really wish I already had a data flow system up and running. Then again, if data flow notifications already worked, I wouldn't need to implement it.

I should be done the GUI components this week. Editing of the type system I'll do next week. And the week after that is notifications. After that, it's connections and component navigation. The runtime engine will only take a day or two. I've already got most of it written.

Project V is already WAY off time wise, so I'll just say I have at least another month of work to do before anything is available. I'll try and keep a todo list and update it as I go along. This usually helps my motivation. And now that I'm dealing with graphical stuff, it's a lot more fun than it used to be. I'll keep my fingers crossed that nothing else pops up that will slow me down (like the GUI, Fonts and Type System did).

UnicodeD3D Variable Width Line Drawing in Hardware (w/ screenshot)

How to use Quote function:

  1. Select some text
  2. Click on the Quote link

Write a comment

Comment
(BBcode and HTML is turned off for anonymous user comments.)

If you can't read the words, press the small reload icon.


Smilies

December 2009
S M T W T F S
November 2009January 2010
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31