Boost logo

Boost :

From: John Torjo (john.lists_at_[hidden])
Date: 2005-10-04 06:55:52


>
> (Sincerely to John Torjo - I have only skimmed the surface in win32gui. I may
> have a lot wrong. There may be a lot I have missed.)
>
> There is a lot of mention of Windows stuff in the implementation. There is even

Right, on the *implementation* ;)

> sdi_frame(CFrameWnd), mdi_frame(CMDIFrameWnd), WM_SIZE (et al) message etc.

The thing is that until I could provide for platform-independent events,
I had to use existing windows events.

If you take a look at event_ex class, you'll see that you can say things
like:

event_ex<wm::size>() (which can map to the underlying OS's SIZE event)

> (IIRC using FrameWnd it was difficult to try to make switchable views). Anyway,
> in win32gui that I have looked at there is very little abstraction away from
> Win32 API. For example in win32gui/examples program entry is:
> int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE, LPSTR lpCmdLine, int
> nCmdShow)

Is that so important? It's quite easy to abstract away, IMO.

>
> AFAIK the common view on this list is not to subvert main. (VCF scores again It
> uses main for GUI on Windows. Despite templates win32gui seems to use much of
> the *patterns* in MFC like GDI , though even Microsoft has moved on with eg
> GDI+. There are alternatives to DeviceContext approach too but are they explored
> here?

I guess that's why I invented surfaces. They're in alpha-stage, but I
think they're quire the way to go.

> IMO To make win32gui cross-platform will require a higher level of abstraction
> than is there currently. For instance repeatedly the look and feel issue has
> come up on this list. win32gui looks to be similar to Java.awt in that it is a
> thin wrapper over the underlying API. However Java have now rejected that model
> with Swing, which does much more low level work. It would be interesting to find

Again, take a short look at surfaces. Also, we can discuss things
privately, if you have more questions :)

> out why the java designers felt they needed to change and made this choice.
> Maybe it is even possible to have both ways
>
> On the plus side win32gui has various units for length which is commendable! I
> like that! In my experience units seriously do give device independence!

:) that's for surfaces

> 5 Must use main as an entry point. Seems trivial but affects how lightweight a
> GUI application is. Lightweight is good!
>

Again, I think that's not so complex to implement IMO.
A lot of concepts I've developed for win32gui can be
platform-independent. That's why I want to port this to other platforms.
But I need your help. Volunteers needed :)

Best,
John

-- 
John Torjo,    Contributing editor, C/C++ Users Journal
-- "Win32 GUI Generics" -- generics & GUI do mix, after all
-- http://www.torjo.com/win32gui/surfaces.html - Sky's the limit!
-- http://www.torjo.com/cb/ - Click, Build, Run!

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk