New Window style ? How ?

VA Smalltalk is a "100% VisualAge compatible" IDE that includes the original VisualAge technology and the popular VA Assist and WidgetKit add-ons.

Moderators: Eric Clayberg, wembley, tc, Diane Engles, solveig

New Window style ? How ?

Postby marten » Tue Jul 01, 2008 10:15 pm

I've been working on the OpenGL code for some days now and still have problems with the correct initialization of Smalltalk windows and rendering contexts etc.

I created a new subclass of CwDrawingArea. The idea was, that the content of the OpenGL output should be rendered into instances of this subclass. As I understand each widget has its own window (nder Windows) and one must register a new window class with the following styles: CS_HREDRAW | CS_VREDRAW | CD_OWNDC. How can that be done under VASmalltalk ?

When opening the window the window itselfs should have some options like CLIPCHILDREN and CLIPSIBLINGS ... whats the correct way here to do it right. I've found all of the stuff somewhere in the images - but I do not get the overall picture ?!

Actually I managed to get the rendering output into my subclass of CwDrawingArea (but actually only some part of it) - but I do not get all events needed to redraw the widget correctly - and whenever I start the image the first time my code runs it fails completely ...

Any idea or help possible ?

Marten
Marten Feldtmann, Principal Smalltalk User, Private
SkypeMe callto://marten.feldtmann
marten
[|]
 
Posts: 641
Joined: Sat Oct 14, 2006 7:10 am
Location: Hamburg - Germany

Re: New Window style ? How ?

Postby tc » Tue Jul 01, 2008 11:59 pm

Hello,

I have not done specific OpenGL work but working with windows widgets, it seems, one would create a subclass in the CwWidget hierarchy and do the same in the OSWidget hierarchy or in your case, have an OpenGL hierarchy that follows the same pattern as the OSWidget hierarchy.

The OSWidget/OpenGL hierarchy is where the styles would be set, clipping is handled, clipping of siblings, events come in, etc. To me, the pattern of how a CwWidget communicates with an OSWidget would be the same for a CwWidget/OpenGL hierarchy.

--tc
tc
Moderator
 
Posts: 304
Joined: Tue Oct 17, 2006 7:40 am
Location: Raleigh, NC

Re: New Window style ? How ?

Postby marten » Wed Jul 02, 2008 2:44 am

tc wrote:Hello,

I have not done specific OpenGL work but working with windows widgets, it seems, one would create a subclass in the CwWidget hierarchy and do the same in the OSWidget hierarchy or in your case, have an OpenGL hierarchy that follows the same pattern as the OSWidget hierarchy.

The OSWidget/OpenGL hierarchy is where the styles would be set, clipping is handled, clipping of siblings, events come in, etc. To me, the pattern of how a CwWidget communicates with an OSWidget would be the same for a CwWidget/OpenGL hierarchy.

--tc


I've gone in this direction. I created a new subclass of CwDrawingArea and also a corresponding subclass of OSComposite (CwDrawingArea corresponds to OSComposite) and connected them each other. I created a new classmethod "windowClass" and "initializeWindowProc".
Marten Feldtmann, Principal Smalltalk User, Private
SkypeMe callto://marten.feldtmann
marten
[|]
 
Posts: 641
Joined: Sat Oct 14, 2006 7:10 am
Location: Hamburg - Germany


Return to VA Smalltalk 7.0, 7.5 & 8.0

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest