terça-feira, 10 de julho de 2007

wxWidgets prototype done

Making the window was easy until the sliding separator part. The best source to learn what objects are available is the "Classes by category" list, the alphabetical list is too messy to start.

The menu is a wxMenu object and the tool bar is a frame managed toolbar. What I call properties is a wxNotebook control and the tree list can be a standard tree control or a wxWidgets custom control with all directories. Having all dirs is not as I thought at first, and I see no way to override the filter, but to start the wxGenericDirCtrl is what I need.

I am still fighting with the best approach [?] to the sliding separator, the wxSplitterWindow. It is intended to show two views of the same document and the behaviour is not always as I want:
- it looses the handler when I drag it to the limits, the split action is to be done by other control like the menu; with minimum pane size = 1 the handler is always visible but that pixel is ugly.
- resizing is... ahuum... strange; I had to catch the handler [sash] position changed event and compute the sash gravity to get something near what I want; tests made with the box sizer show that can be better.

The splitter window is right to a prototype but I have to change that soon. Making reusable objects is always fun, and I'm thinking about a SlidingSeparator as I see it.

Etiquetas: ,

segunda-feira, 9 de julho de 2007

My wxWidgets learning project

I usually make a "not-so-minimal" project for every tool I evaluate. To keep focus it must have some realistic goal; right now I have one project with some key characteristics:

- read binary files, to evaluate the little-endian / big-endian solution and Linux utf-8 / Windows ucs-16 compatibility. With some platforms the bytes must be swapped after reading binary integers, with others there is no need (with Macs using Intel processors most desktop computers are now little-endian).

- use some "high-level control", like the tree or list controls, to evaluate the trust one may have to develop continually in one platform, minimizing the inevitable platform switch. Here I should use VMware Virtual Machines or run inside coLinux, but I doubt my hardware allows it. I will test one solution like that as a proof of concept, but a multi-platform development environment needs to run the platforms side by side; one easy solution is a computer for each platform.

- use sizers; well, any project would use it anyway.


Once I need a program to check fonts for unicode code points availability, like the infamous surrogated code points. Default font viewers are not very informative and the best program I found was Steve Hartwell's Font Inspector, a wxWidgets project by the way; the program had a date limit and Steve Hartwell's home page is no longer available, so my wxWidgets learning project is something around that - not the visual inspector that Steve's program was, maybe a little of that, but a tool that can filter fonts by unicode named range support and check for the existence of any code point.

Not very usefull, that's all right. Just a goal to keep me on the road.

Etiquetas: ,