Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 1999-10

wndproc

8 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Samuel Liddicott
to Shane Miller: I am going to begin to look at a method of converting GTK to use the wndproc while I also…
Show quoted text 12 lines
-----Original Message----- From: Shane Miller Sent: Thursday, October 21, 1999 05:13 PM To: Subject: [lazarus] wndproc I am going to begin to look at a method of converting GTK to use the wndproc while I also look at the editor with Curtis (and anyone else who wants to help). I just added the LMLButtonDown procedures and I feel that the wndproc is really the only way to handle those correctly.

Oh wow. Excellent.
[BTW I've not been skiving, I've been snowed under as 2 projects draw to a close]

Sam

Reply by email

Shane Miller

I am going to begin to look at a method of converting GTK to use the wndproc while I also look at the editor with Curtis (and anyone else who wants to help). I just added the LMLButtonDown procedures and I feel that the wndproc is really the only way to handle those correctly.

Shane

Reply by email

Baeseman, Cliff

The great winproc debate...

Guys let me know if I am designing the event model in the QT engine correctly to support this also.

Inside the QT engine this is what takes place.

Each widget is assigned its standard events when it is created. If a event fires for instance a button is pushed. The click event calls a internal procedure that will call the single pascal handler for the appropriate dispatch. In this model I assume a single call back procedure for each component. So all event calls are recieved by single procedure attached to each component. In this way you can use a override to customize the event handling if necessary.

pacalhandler(intEventMessage)

  case intEventMessage of
   WM_CLICK
        dispatch call
   WM_DOUBLECLICK
        dispatch call
   WM_PAINT
        dispatch call

Is this the type of thing we are shooting for...I tried to stay out of the debate before but need to know the direction so that I can change the base engine now if necessary.

Cliff

Earlier message 32 lines
-----Original Message----- From: Samuel Liddicott Sent: Thursday, October 21, 1999 11:58 AM To: Subject: RE: [lazarus] wndproc > -----Original Message----- > From: Shane Miller > Sent: Thursday, October 21, 1999 05:13 PM > To: > Subject: [lazarus] wndproc > > > I am going to begin to look at a method of converting GTK to use > the wndproc while I also look at the editor with Curtis (and > anyone else who wants to help). I just added the LMLButtonDown > procedures and I feel that the wndproc is really the only way to > handle those correctly. Oh wow. Excellent. [BTW I've not been skiving, I've been snowed under as 2 projects draw to a close] Sam _________________________________________________________________ To unsubscribe: mail with "unsubscribe" as the Subject archives at http://www.miraclec.com/list_archives/lazarus

Reply by email

Baeseman, Cliff

Yep that was exactly my intent. I am going to pass back a pointer to data. If I just pass back a pointer to some arbitrary data it allows me to keep as generic as possible on the C++ side of things where I intend to run the engine thru the two etern defined C calls.

I guess another cool fallout of this is that our QT engine can easily be used with other languages that are pointer capable. I intend on putting in a base widget set and then stabilize the code. Once that occurs I am going to publish the library and the documentation and send it to the world as a generic QT interface and Freshmeat and KDE it. There was a C implemented version around somewhere but can no longer find it. Michael C said that it pretty much sucked anyhow. Then I will work on porting the stuff to the LCL. I am going for a alpha release by next friday.

first stabalized version out will be alpha liblazqt.01.so

Cliff

Earlier message 90 lines
-----Original Message----- From: Shane Miller Sent: Thursday, October 21, 1999 2:29 PM To: Subject: RE: [lazarus] wndproc If possible, send the message struct (if you use that) to the wndproc and have the wndproc send out a message via dispatch to the control. This is what I asm going to do with GTK.......That's how delphi does it too.. Shane >>> "Baeseman, Cliff" 10/21/99 12:32PM >>> The great winproc debate... Guys let me know if I am designing the event model in the QT engine correctly to support this also. Inside the QT engine this is what takes place. Each widget is assigned its standard events when it is created. If a event fires for instance a button is pushed. The click event calls a internal procedure that will call the single pascal handler for the appropriate dispatch. In this model I assume a single call back procedure for each component. So all event calls are recieved by single procedure attached to each component. In this way you can use a override to customize the event handling if necessary. pacalhandler(intEventMessage) case intEventMessage of WM_CLICK dispatch call WM_DOUBLECLICK dispatch call WM_PAINT dispatch call Is this the type of thing we are shooting for...I tried to stay out of the debate before but need to know the direction so that I can change the base engine now if necessary. Cliff -----Original Message----- From: Samuel Liddicott Sent: Thursday, October 21, 1999 11:58 AM To: Subject: RE: [lazarus] wndproc > -----Original Message----- > From: Shane Miller > Sent: Thursday, October 21, 1999 05:13 PM > To: > Subject: [lazarus] wndproc > > > I am going to begin to look at a method of converting GTK to use > the wndproc while I also look at the editor with Curtis (and > anyone else who wants to help). I just added the LMLButtonDown > procedures and I feel that the wndproc is really the only way to > handle those correctly. Oh wow. Excellent. [BTW I've not been skiving, I've been snowed under as 2 projects draw to a close] Sam _________________________________________________________________ To unsubscribe: mail with "unsubscribe" as the Subject archives at http://www.miraclec.com/list_archives/lazarus _________________________________________________________________ To unsubscribe: mail with "unsubscribe" as the Subject archives at http://www.miraclec.com/list_archives/lazarus _________________________________________________________________ To unsubscribe: mail with "unsubscribe" as the Subject archives at http://www.miraclec.com/list_archives/lazarus

Reply by email

Shane Miller

If possible, send the message struct (if you use that) to the wndproc and have the wndproc send out a message via dispatch to the control. This is what I asm going to do with GTK.......That's how delphi does it too.. Shane

>> "Baeseman, Cliff" 10/21/99 12:32PM >>>

The great winproc debate...

Guys let me know if I am designing the event model in the QT engine correctly to support this also.

Inside the QT engine this is what takes place.

Each widget is assigned its standard events when it is created. If a event fires for instance a button is pushed. The click event calls a internal procedure that will call the single pascal handler for the appropriate dispatch. In this model I assume a single call back procedure for each component. So all event calls are recieved by single procedure attached to each component. In this way you can use a override to customize the event handling if necessary.

pacalhandler(intEventMessage)

  case intEventMessage of
   WM_CLICK
        dispatch call
   WM_DOUBLECLICK
        dispatch call
   WM_PAINT
        dispatch call

Is this the type of thing we are shooting for...I tried to stay out of the debate before but need to know the direction so that I can change the base engine now if necessary.

Cliff

Earlier message 37 lines
-----Original Message----- From: Samuel Liddicott Sent: Thursday, October 21, 1999 11:58 AM To: Subject: RE: [lazarus] wndproc > -----Original Message----- > From: Shane Miller > Sent: Thursday, October 21, 1999 05:13 PM > To: > Subject: [lazarus] wndproc > > > I am going to begin to look at a method of converting GTK to use > the wndproc while I also look at the editor with Curtis (and > anyone else who wants to help). I just added the LMLButtonDown > procedures and I feel that the wndproc is really the only way to > handle those correctly. Oh wow. Excellent. [BTW I've not been skiving, I've been snowed under as 2 projects draw to a close] Sam _________________________________________________________________ To unsubscribe: mail with "unsubscribe" as the Subject archives at http://www.miraclec.com/list_archives/lazarus _________________________________________________________________ To unsubscribe: mail with "unsubscribe" as the Subject archives at http://www.miraclec.com/list_archives/lazarus

Reply by email

Samuel Liddicott
to Baeseman, Cliff: The great winproc debate... Guys let me know if I am designing the event model in the QT…
Show quoted text 21 lines
-----Original Message----- From: Baeseman, Cliff Sent: Thursday, October 21, 1999 06:43 PM To: '' Subject: RE: [lazarus] wndproc pacalhandler(intEventMessage) case intEventMessage of WM_CLICK dispatch call WM_DOUBLECLICK dispatch call WM_PAINT dispatch call Is this the type of thing we are shooting for...I tried to stay out of the debate before but need to know the direction so that I can change the base engine now if necessary.

Nearly. This handler could dispatch all those messages - but generally shouldn't. The ancestor implementation of this function will call self.Dispatch which then uses the very fast pascal message dispatcher to call routines declared like:

  Procedure Click(Sender : TObject); message WM_Click;

Of course the handler can be overridden and intercept messages the way you showed above, equally well new message handler routines could override the level [Dispatch is a Delphi method]

Sam

Reply by email

Samuel Liddicott
to Shane Miller: If possible, send the message struct (if you use that) to the wndproc and have the…
Show quoted text 12 lines
-----Original Message----- From: Shane Miller Sent: Thursday, October 21, 1999 08:29 PM To: Subject: RE: [lazarus] wndproc If possible, send the message struct (if you use that) to the wndproc and have the wndproc send out a message via dispatch to the control. This is what I asm going to do with GTK.......That's how delphi does it too.. Shane

Yep. Oh, excellent!

Sam

Reply by email

Shane Miller

TControl is 75% done
TWinControl 75% done
TCustomForm clientwndproc exists, but is empty now.

Cliff, you can start coding your end of it. The messages may not get dispatched correctly yet, but you sure can assign them to call the correct wndproc.

I haven't looked at it but I would guess that FORMS use TCustomForm's as the main entry point, etc and the TWINCONTROL get "inherited"?

Anyway, anyone else that wants to code come wndproc's take a free to grab a class and go for it.

Shane

>> "Baeseman, Cliff" 10/28/99 01:54PM >>>

Yes we do need the event thing solidified so that I can move on.

Cliff

Earlier message 49 lines
-----Original Message----- From: Shane Miller Sent: Thursday, October 28, 1999 12:20 PM To: Subject: [lazarus] FComponent removed FComponent has been removed and replaced with TWInControl.Handle. There are a few issues: 1) Currently I defined the property Handle with a read AND a write method (the write method simply writes to FHandle). In Windows, you didn't want to write to FHandle because the user should never modify it. However, in order to be able to assign FHAndle the component in gtkinterface.pp, you need to write to HANDLE because you can't access the private property (FHAndle) from within gtkinterface.pp 2) HandleAllocated should be implemented and used. If a handle is not implemented, then CreateComponent should be called in HandleNeeded. Currently, I check to see if Handle = 0. 3) HANDLE is a TWinCotrol property, NOT a TCONTROL property so in gtkinterface.inc I had to typecast things as a TWinControl instead of TControl's. Not a big deal but that's why it's different. I think that's it for now. I added a default HINT or TOOLTIP to each widget upon creation. I used gtk_object_set_data to assign it to the widget so we can pull it out of it with a gtk_object_get_data('Tooltip'); The Menu's aren't appearing, but that's been that way before I did the fcomponent thing. Not sure what the issue is there yet. Anyone doing anything else of interest? I'll be working on events now I think. Shane _________________________________________________________________ To unsubscribe: mail with "unsubscribe" as the Subject archives at http://www.miraclec.com/list_archives/lazarus _________________________________________________________________ To unsubscribe: mail with "unsubscribe" as the Subject archives at http://www.miraclec.com/list_archives/lazarus

Reply by email