Sign in Join

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

Mailing lists / lazarus / 1999-10

FComponent removed

3 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

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

Marc Weustink
to Shane Miller: FComponent has been removed and replaced with TWInControl.Handle. There are a few issues:
you wrote
FComponent has been removed and replaced with TWInControl.Handle. There

are a few issues:

Show quoted text 7 lines
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

Maybe by some other method ?

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.

I have the code here. I'll try this to commit tonight (If I get it compiled)

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.

Some GTK specific things were stripped from that. I'm working on that.

Anyone doing anything else of interest? I'll be working on events now I think.

Hmm.... the font stuff gets a bit on the background. Anyone feel desperate to do this? otherwise I'll look at it this weekend.

Marc

Reply by email

Shane Miller

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

Reply by email

Baeseman, Cliff

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

Cliff

Earlier message 44 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

Reply by email