Sign in Join

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

Mailing lists / lazarus / 2000-05

Finally I get the code to you

5 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

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

Cliff Baeseman

No the library should not care about the are actually handled in the LCL interface object for the implemented toolkit.

Cliff Baeseman

Earlier message 48 lines
-----Original Message----- From: To: Date: Monday, May 01, 2000 8:53 PM Subject: Re: Finally I get the code to you >Does it has a need to validate if the message realy could be apply to the >asked widget? If so What would be done in case of bad message? > >Vital Tremblay > > > >At 21:37 00-05-01 -0700, you wrote: >>From the standpoint of the LCL here is what really occurs. >> >>When a program is started the application object gets created and and the >>initialize routing is called on the interface object. Here is where we tell >>the engine to create a engine instance. From then on the lcl will pass a >>message to the IntSendMessage routine telling the widget engine to do >>various things depending on what was passed. For instance the routine may >>get a message to create a form in that case lcl_win32_create_widget gets >>called and it internally creates a form. It will pass back a integer value >>"we'll call it the hwnd" which is the index of the component in the list. >>Inside of the interface object we set the LCL TComponent handle with that >>returned value because that is what we are going to use to access the >>instance. Now in the library you will need to do something like >>lcl_win32_reparent_widget(hwndparent, hwndchild: integer) and that will >>inturn set the parent of the child to the parent. Then you add something >>like lcl_win32_set_bounds(hwndwidget: integer;x,y,top,left: integer) so >>internal you just grab that widget from the list and set the properties. >>Then you need to add a event hook I think I coded the stub into it but did >>not finish it. Something like lcl_win32_hook_mouse_move(hwndwidget: integer; >>fproc: pointer) You then assign a handler internal which will call this fpc >>method pointer. I know this sounds like a lot of stuff but it is pretty >>simple to implement. >> >>Cliff > >_________________________________________________________________ > To unsubscribe: mail with > "unsubscribe" as the Subject > archives at http://www.miraclec.com/list_archives/lazarus >

Reply by email

Unknown author

Does it has a need to validate if the message realy could be apply to the asked widget? If so What would be done in case of bad message?

Vital Tremblay

you wrote 24 lines
From the standpoint of the LCL here is what really occurs. When a program is started the application object gets created and and the initialize routing is called on the interface object. Here is where we tell the engine to create a engine instance. From then on the lcl will pass a message to the IntSendMessage routine telling the widget engine to do various things depending on what was passed. For instance the routine may get a message to create a form in that case lcl_win32_create_widget gets called and it internally creates a form. It will pass back a integer value "we'll call it the hwnd" which is the index of the component in the list. Inside of the interface object we set the LCL TComponent handle with that returned value because that is what we are going to use to access the instance. Now in the library you will need to do something like lcl_win32_reparent_widget(hwndparent, hwndchild: integer) and that will inturn set the parent of the child to the parent. Then you add something like lcl_win32_set_bounds(hwndwidget: integer;x,y,top,left: integer) so internal you just grab that widget from the list and set the properties. Then you need to add a event hook I think I coded the stub into it but did not finish it. Something like lcl_win32_hook_mouse_move(hwndwidget: integer; fproc: pointer) You then assign a handler internal which will call this fpc method pointer. I know this sounds like a lot of stuff but it is pretty simple to implement. Cliff

Reply by email

Cliff Baeseman

That sounds like a reasonable way to handle it just remember that I believe the window handle is a long integer inside the lcl so we need a int or long int to reference the instance.

As for finishing it or adding to it, I cannot deal with it at the moment. I have to finish the lfm read and write routines and then I can maybe help you out some. End of the week at the earliest.

Cliff

Earlier message 61 lines
-----Original Message----- From: To: Date: Wednesday, May 03, 2000 4:18 PM Subject: Re: Finally I get the code to you >I would suggest another way of managing the handle. >Instead of using the index in the list, we could use the pointer of the >instance of the wrapper class (TWidgetObject) which is any way the instance >that we will need to find by is index. We then get direct access to the >instance without the need to retrieve it from the list. This is not a great >deal but that would prevent the mess when some object will be deleted from >the list resulting in a shifted index. So the index will be out of sync. > >Those that make sence. > > >By the way Cliff, Do you relay on my to finish this work now or you have to >complete it somehow before I get involve? > > >Vital Tremblay > > > >At 21:37 00-05-01 -0700, you wrote: >>From the standpoint of the LCL here is what really occurs. >> >>When a program is started the application object gets created and and the >>initialize routing is called on the interface object. Here is where we tell >>the engine to create a engine instance. From then on the lcl will pass a >>message to the IntSendMessage routine telling the widget engine to do >>various things depending on what was passed. For instance the routine may >>get a message to create a form in that case lcl_win32_create_widget gets >>called and it internally creates a form. It will pass back a integer value >>"we'll call it the hwnd" which is the index of the component in the list. >>Inside of the interface object we set the LCL TComponent handle with that >>returned value because that is what we are going to use to access the >>instance. Now in the library you will need to do something like >>lcl_win32_reparent_widget(hwndparent, hwndchild: integer) and that will >>inturn set the parent of the child to the parent. Then you add something >>like lcl_win32_set_bounds(hwndwidget: integer;x,y,top,left: integer) so >>internal you just grab that widget from the list and set the properties. >>Then you need to add a event hook I think I coded the stub into it but did >>not finish it. Something like lcl_win32_hook_mouse_move(hwndwidget: integer; >>fproc: pointer) You then assign a handler internal which will call this fpc >>method pointer. I know this sounds like a lot of stuff but it is pretty >>simple to implement. >> >>Cliff > >_________________________________________________________________ > To unsubscribe: mail with > "unsubscribe" as the Subject > archives at http://www.miraclec.com/list_archives/lazarus >

Reply by email

Unknown author

I would suggest another way of managing the handle. Instead of using the index in the list, we could use the pointer of the instance of the wrapper class (TWidgetObject) which is any way the instance that we will need to find by is index. We then get direct access to the instance without the need to retrieve it from the list. This is not a great deal but that would prevent the mess when some object will be deleted from the list resulting in a shifted index. So the index will be out of sync.

Those that make sence.

By the way Cliff, Do you relay on my to finish this work now or you have to complete it somehow before I get involve?

Vital Tremblay

you wrote 24 lines
From the standpoint of the LCL here is what really occurs. When a program is started the application object gets created and and the initialize routing is called on the interface object. Here is where we tell the engine to create a engine instance. From then on the lcl will pass a message to the IntSendMessage routine telling the widget engine to do various things depending on what was passed. For instance the routine may get a message to create a form in that case lcl_win32_create_widget gets called and it internally creates a form. It will pass back a integer value "we'll call it the hwnd" which is the index of the component in the list. Inside of the interface object we set the LCL TComponent handle with that returned value because that is what we are going to use to access the instance. Now in the library you will need to do something like lcl_win32_reparent_widget(hwndparent, hwndchild: integer) and that will inturn set the parent of the child to the parent. Then you add something like lcl_win32_set_bounds(hwndwidget: integer;x,y,top,left: integer) so internal you just grab that widget from the list and set the properties. Then you need to add a event hook I think I coded the stub into it but did not finish it. Something like lcl_win32_hook_mouse_move(hwndwidget: integer; fproc: pointer) You then assign a handler internal which will call this fpc method pointer. I know this sounds like a lot of stuff but it is pretty simple to implement. Cliff

Reply by email