[lazarus] GTK team: please specify!

Micha Nelissen M.Nelissen at student.tue.nl
Sun Nov 2 08:21:29 EST 2003


Mattias Gaertner wrote:

> On Sat, 01 Nov 2003 21:39:49 +0100
> Micha Nelissen <M.Nelissen at student.tue.nl> wrote:
> 
> 
>>Mattias Gaertner wrote:
>>
>>
>>>Much more clearer :)
>>>I was a little bit confused by the term "derivative of TCustomForm".
>>
>>Well, I meant descendant I think, ie. a windowed control.
>>
>>
>>>Ok, grabbers and icons can be replaced by special non LCL widgets (in
>>>win32 slang: windows).
>>>What about the rubberband, the selection marks and the guide/snap lines?
>>
>>Rubberband can be drawn on the screen itself. It's temporary, after all. 
>>Is this possible in gtk too?
> 
> 
> Yes. But I'm not sure, how to combine this with the LCL/IDE.

The WinAPI specifies that GetDC(GetDesktopWindow()) should return a 
device context of the screen. We can use this DC to draw on.

>>Selection marks aren't the grabber handles?
> 
> 
> No, I mean the multiselection marks (normally gray 4 rectangles at each
> corner of each component). When the user selects 10 components, should we
> then create 40 small widgets?

Hmm, no. These are drawn on the control, within control bounds. Black 
ones are partially on control, partially on parent, but these gray ones 
are completely on the control.

>>Guide/snap lines are the grid, the dots? 
> 
> 
> No, this is the grid. I mean the green and blue lines showing the alignment
> of the selection with other controls on the form. Maybe you never saw them,
> because Delphi does not have them and the designer does not yet work under
> win32.

Indeed, I have never seen them. I guess we can leave these for later?

>>These are not inter-control, 
>>are they? Only things that require inter-control calculations should be 
>>redone. Or is this too simply thought?
>>
>>We can try to implement things one by one, first the invisible 
>>components, then the grabber handles, etc...Then dependencies will show 
>>gradually. Or do you want a complete rewrite from scratch?
> 
> 
> No, every item (grabbers, marks, snap lines, grid, icons) is already
> splitted up. So, we can replace them one by one.
> What we need are LCL widgets, that are not controls. Maybe we can call them
> TDesignerWidget. (Not TDesignerControl, because they have nothing to do with
> TControl, not even with TComponent). They should be as separate from the
> normal LCL routines as possible. For example: No messages.

Delphi recommends descending from TCustomControl in this case. From help:

"TCustomControl is one of two base classes for controls that draw their 
own surfaces. Because TCustomControl is descended from from TWinControl, 
instances of its descendents can receive the focus and serve as containers."

HTH,

Micha.






More information about the Lazarus mailing list