Sign in Join

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

Mailing lists / lazarus / 2002-09

Behavior of LCL Client Area (was: win32 development)

4 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

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

Karl Brandt
to Andrew Johnson: On Wed, 25 Sep 2002 01:08:08 -0300 [..] At the moment my laptop is disconnected from the…
Andrew Johnson wrote 11 lines
> I deleted the files and made new update again: the files are without > the patch :-( [..] > Do you guess what's wrong? At the moment my laptop is disconnected from the internet so I cannot test..(its the only computer with windows) I will look into it tomorrow.

I checked the CVSWeb and it's not applied.

Just in case its a bad patch on my system, why don't you send the patch again(gzipped to be on the safe side) direct to my E-Mail address.

Did

Show quoted text 5 lines
> So in win32 would be diferent of gtk? unfortunatly yes. in this area, and a few others. esp in regars to forms (border, system buttons, etc)

Let me understand: are you saying that the correct/objective is when set Height/Width property in LCL/win32 the window size would be set, and under LCL/gtk the client size would be set?
There are some problems with making diferent behaviors for each platform. One example: the ide *.lfm sets the same size for both client and window sizes.
In win32 what would be the correct value?

Show quoted text 11 lines
> In other words: there's no way to make client area work as i > mentioned before in gtk/lazarus :-\ Correct.. this is an area where Win32 should be as compatible as possible with Delphi for porting to lazarus reasons, but for new projects and projects ported to *nix ClienttArea should be used for cross-compiling reasons. If I find a way to make semi-compatibiity I'll implement it, but given what I have read in the X headers and in the X Specs, it doesn't look like

Reply by email

Andrew Johnson
I deleted the files and made new update again: the files are without the patch :-(

[..]

Do you guess what's wrong?

At the moment my laptop is disconnected from the internet so I cannot test..(its the only computer with windows) I will look into it tomorrow.

Just in case its a bad patch on my system, why don't you send the patch again(gzipped to be on the safe side) direct to my E-Mail address.

I made a simple test and Height = ClientHeight under win32

well I don't have a windows system in front of me to test and the Win32 code isn't exactly easily browsed through.

So in win32 would be diferent of gtk?

unfortunatly yes. in this area, and a few others. esp in regars to forms (border, system buttons, etc)

In other words: there's no way to make client area work as i mentioned before in gtk/lazarus :-\

Correct.. this is an area where Win32 should be as compatible as possible with Delphi for porting to lazarus reasons, but for new projects and projects ported to *nix ClienttArea should be used for cross-compiling reasons. If I find a way to make semi-compatibiity I'll implement it, but given what I have read in the X headers and in the X Specs, it doesn't look likely.

Andrew

_________________________________________________________________ Join the world�s largest e-mail service with MSN Hotmail. http://www.hotmail.com

Reply by email

Andrew Johnson
AFAIK it wasn't applied(i updated cvs today)

wierd.. I update daily, and I tried to apply your patch before I wrote that and it told me, already applied do you want to remove... et al. So I assumed it was applied... hrmm.... And all my tests showed proper functionalitly which it didn't before your Patch... I dunno whats up..

Show quoted text 5 lines
What i tried to do was the above (it's not complete!), although i disagree this way. It looks like the WinControl.ClientHeight/Width act as WinControl.Height/Width, so setting one or other will do the same thing. Please correct me if i'm wrong

This is why I said IF it is implemented properly. I wasn't sure.

Show quoted text 6 lines
I think the best behavior is to implement ClientHeight/Width and Height/Width as Delphi does: If you set the client sizes automatically the correct window sizes are set and vice-versa, in this manner the lcl user could decide if he wants set the client or the window size and makes ClientHeight/Width really useful.

Yes this is probably how it should be done for Win32

Show quoted text 7 lines
One way to implement-it: Setting the ClientHeight would calculate the apropriate (Window)Height via AdjustWindowRectEx (Now it's only a hack-> it would be done by the interface). Then the Height would be adjusted and the interface called to set the desired size. The contrary would be true: Height -> ClientHeight

makes a sort of sense...

Show quoted text 5 lines
>This is an incompatibility between X-Windows and Win32 design, not a >problem in the Lazarus code. Is there a way to set the window size instead of client size in gtk? Is there a equivalent Windows.AdjustWindow(Client)RectEx in gtk?

This IS the incompatibility.. in XWindows the Border Width Height etc is determined by the window manager, which is a separate program, without any consistant standards or interface library to get this info from. Thus it is Impossible to set the Width/Height in the Win32 manner in an XWindows environment, unless you want to try and add support for every known WM and keep adding more and more support.. AFAIK this is the only way we could make it work... As for the ClientRect, this is what setting Width/Height sets under GTK(except I think under Win32.. but I am not sure)

Andrew

_________________________________________________________________ Send and receive Hotmail on your mobile device: http://mobile.msn.com

Reply by email

Karl Brandt
to Andrew Johnson
Andrew Johnson wrote 10 lines
On Wed, 25 Sep 2002 00:21:59 -0300 "Karl Brandt " wrote: > AFAIK it wasn't applied(i updated cvs today) wierd.. I update daily, and I tried to apply your patch before I wrote that and it told me, already applied do you want to remove... et al. So I assumed it was applied... hrmm.... And all my tests showed proper functionalitly which it didn't before your Patch... I dunno whats up..

I deleted the files and made new update again: the files are without the patch :-(

repository:=projects/lazarus/lcl/interfaces/win32
entries:=/interfaces.pp/1.7/Sun May 12 20:48:12 2002// /win32def.pp/1.4/Sun May 12 20:48:12 2002//
/win32listsl.inc/1.6/Sun May 12 20:48:12 2002//
/win32listslh.inc/1.3/Sun May 12 20:48:14 2002//
/win32proc.inc/1.8/Sun May 12 20:48:24 2002//
/winext.pas/1.9/Sun May 12 20:48:28 2002//
/Makefile/1.10/Sun Jul 21 20:35:12 2002//
/Makefile.fpc/1.10/Sun Jul 21 20:35:12 2002//
/win32int.pp/1.16/Sat Aug 24 17:52:52 2002//
/win32winapih.inc/1.14/Thu Sep 12 03:25:08 2002//
/win32winapi.inc/1.19/Wed Sep 25 03:18:02 2002//
/win32callback.inc/1.15/Wed Sep 25 03:52:50 2002// /win32object.inc/1.25/Wed Sep 25 03:53:14 2002//
D
Do you guess what's wrong?

Show quoted text 9 lines
> What i tried to do was the above (it's not complete!), although i > disagree this way. > It looks like the WinControl.ClientHeight/Width act as > WinControl.Height/Width, so setting one or other will do the same thing. > Please correct me if i'm wrong This is why I said IF it is implemented properly. I wasn't sure.

I made a simple test and Height = ClientHeight under win32

Show quoted text 11 lines
> I think the best behavior is to implement ClientHeight/Width and > Height/Width as Delphi does: > If you set the client sizes automatically the correct window sizes > are set and vice-versa, > in this manner the lcl user could decide if he wants set the client > or the window size and makes ClientHeight/Width really useful. Yes this is probably how it should be done for Win32

So in win32 would be diferent of gtk?

Show quoted text 30 lines
> One way to implement-it: > Setting the ClientHeight would calculate the apropriate > (Window)Height via AdjustWindowRectEx (Now it's only a hack-> it > would be done by the interface). > Then the Height would be adjusted and the interface called to set the > desired size. > The contrary would be true: Height -> ClientHeight makes a sort of sense... >> This is an incompatibility between X-Windows and Win32 design, not a >> problem in the Lazarus code. > > Is there a way to set the window size instead of client size in gtk? > Is there a equivalent Windows.AdjustWindow(Client)RectEx in gtk? This IS the incompatibility.. in XWindows the Border Width Height etc is determined by the window manager, which is a separate program, without any consistant standards or interface library to get this info from. Thus it is Impossible to set the Width/Height in the Win32 manner in an XWindows environment, unless you want to try and add support for every known WM and keep adding more and more support.. AFAIK this is the only way we could make it work... As for the ClientRect, this is what setting Width/Height sets under GTK(except I think under Win32.. but I am not sure)

In other words: there's no way to make client area work as i mentioned before in gtk/lazarus :-\

Reply by email