Sorry for the late responce, I was away for a few days.

Mattias wrote:
On Thu, 17 Aug 2006 14:51:17 +0200
Marc Weustink <[EMAIL PROTECTED]> wrote:

Mattias wrote:

[snip]

I added those functions to gtkproc.pp:

procedure SetWindowFullScreen(AForm: TCustomForm; const AValue: Boolean);
procedure GrabKeyBoardToForm(AForm: TCustomForm);
procedure ReleaseKeyBoardFromForm(AForm: TCustomForm);
procedure GrabMouseToForm(AForm: TCustomForm);
procedure ReleaseMouseFromForm(AForm: TCustomForm);
Better add these to TWSGTKCustomForm

Thats the place were most gtk proc suff will endup in the future.
(or whn ther are not poblished in the WS add them to TWSGTKCustomFormPrivate (or was it TWSGTKProvateCustomForm)

Yes.

function FormToX11Window(const AForm: TCustomForm): X.TWindow;

Now we need some nice function names for the LCL.
In some sense fullscreen is a windowstate. So maybe we should add it
'wsFullScreen' to TWindowState. OTOH a fullscreen is just a
special wsMaximized, so a FullScreen boolean property might be better.
Comments?
I think we can use wsFullScreen for that. What would be the meaning of a wsMinimized windowstate with a FullScreen := True. A lot of code is optimized to do noting if the WindowState is wsMinimized. If we have an extra boolen, those have to be reviewed all.

Ok. Maybe FormStyle could be even better?

What if you want to have a MDIForm as fullscreen ?

still think WindowState is better

The exclusive grab of mouse and keyboard functions for TCustomForm:
procedure GrabKeyboard;   // grab even winow manager keys
procedure ReleaseKeyboard;// undo GrabKeyboard
procedure GrabMouse;   // grab mouse for form and childs
procedure ReleaseMouse;// undo GrabMouse

Comments?
Arent those already there in TControl ?
At least for the mouse there is the csCaptureMouse control state.
Further there is something like SetMouseCapture iirc.

That's not the same.
When Form.MouseGrabbing=true it is still possible for all child controls to 
work normally, including SetMouseCapture. The above mouse 'grabbing' limits the 
mouse pointer to the forms region. It does not really grab. Maybe it should be 
renamed to 'LimitMouseMovement'.

So a user can only move the mouse within a given area ?

eeek

Form.MouseTrap := true

but serious, why adding this to a form and not TMouseTrap/TMouseBox/TMouseCage(TWincontrol) component ? Its transparent, panel like, so you can place it on any container to limit the mousemovement into there.

Marc



_________________________________________________________________
    To unsubscribe: mail [EMAIL PROTECTED] with
               "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to