On Mon, 9 Oct 2006 17:39:54 -0300
"Felipe Monteiro de Carvalho" <[EMAIL PROTECTED]> wrote:
> On 10/9/06, Sebastian Kraft <[EMAIL PROTECTED]> wrote:
> > can you give me some hints where to start? I mean... which units
> > and functions are used to draw TSplitter?
I'm glad you asked.
A TPairSplitter is created in gtkint.pp
in TGtkWidgetSet.CreatePairSplitter.
It is a drawn by the gtk itself (gtkpaned).
A TSplitter is drawn by TCustomSplitter.Paint via the function
DrawSplitter, which is defined in the LCL gtk interface:
gtkwsextctrls.pp TGtkWSCustomSplitter.DrawSplitter.
This method uses the gtk_paint_box function, the same function the gtk
uses itself, except the hpaned and vpaned Detail was exchanged.
I fixed that and now it looks better.
> All gtk specific stuff is on the directory:
>
> lazarus/lcl/interfaces/gtk
>
> > I took a look inside sourcecode of the lcl but I completely have no
> > Idea where to start.
>
> When I need to find something I use the Search in Files dialog from
> Lazarus.
>
> Select search in directory. Put lazarus/lcl/interfaces/gtk as your
> directory and search for TSplitter
Most interfaces use the TCustomXXX base classes:
Start at TSplitter. This has not much code. Go to TCustomSplitter.
This has a Paint method, which calls
TWSCustomSplitterClass(WidgetSetClass).DrawSplitter(Self);
Use 'Find in Files' and search for DrawSplitter in the gtk directory.
>
> There will be 1 hit. That hit leads to the files where TSplitter is
> implemented.
>
> Gtk can be very tricky, and documentation is very poor. I recomend
> going to FreeNode and ask Gtk specific questions on #gtk+ channel.
> There is also a Gnome server. Or you can ask here too.
Mattias
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives