Sign in Join

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

Mailing lists / lazarus / 2010-07

Carbon Nested Windows

3 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

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

J. Stelkens

Hi,

i'm working on a bigger lazarus project running as a plugin and have the task to modify the carbon interface so that one can create a TForm within a given parent window comming from the host. The TForm.CreateParented function seems to be not functional yet for carbon interface. And it seems that MacOS does not have a simple call to nest windows.

To solve that I'm thinking about a special treatment in procedure CarbonWindow.CreateWindow(const AParams: TCreateParams); that does not create a new window but using the hosts windowref (passing thru the AParams) to set the tforms window reference to the hosts one. This seems to work quite ok unless the host does not do additional painting in the window. And that is the case in my host app. The better solution would be use CreateUserPaneControl and using HIViewAddSubView to add the pane to the window. But how I would tell LCL that this is the painting target, not the window itself?

Are there any thurther ideas or given solutions from your side?

Thanks for any hint,
best wishes
freq

Reply by email

Paul Ishenin
to J. Stelkens
J. Stelkens wrote
i'm working on a bigger lazarus project running as a plugin and have the task to modify the carbon interface so that one can create a TForm within a given parent window comming from the host. The TForm.CreateParented function seems to be not functional yet for carbon interface. And it seems that MacOS does not have a simple call to nest windows.

Did you test with the development version?

I worked on CreateParented - it can create a window with the passed parent Handle but this must be a handle of LCL controls only in most of widgetsets. Carbon is on of them becase TWinControl.Handle points to the TCarbonWidget instead of HiViewRef/WindowRef. At the moment I don't know how to solve this problem.

Best regards,
Paul Ishenin.

Reply by email

J. Stelkens
to Paul Ishenin

No, I'm working on the current released version 0.9.28.2. And the plug only gots the parents windows "real" carbon WindowRef...

you wrote 17 lines
23.07.2010 15:26, J. Stelkens wrote: >i'm working on a bigger lazarus project running as a plugin and have the task to modify the carbon interface so that one can create a TForm within a given parent window comming from the host. The TForm.CreateParented function seems to be not functional yet for carbon interface. And it seems that MacOS does not have a simple call to nest windows. Did you test with the development version? I worked on CreateParented - it can create a window with the passed parent Handle but this must be a handle of LCL controls only in most of widgetsets. Carbon is on of them becase TWinControl.Handle points to the TCarbonWidget instead of HiViewRef/WindowRef. At the moment I don't know how to solve this problem. Best regards, Paul Ishenin. -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email