
                      fpGUI Toolkit
                 CLASS INHERITANCE LAYOUT


The derivation and inheritance of classes are different than one
might be used to. It will be explained by the following example.

Due to the graphics painting library being different on certain
platforms we had to do some trickery to the inheritance so the
same classname could be used in descendant classes for widgets
in fpGUI. We also did not want to introduce IFDEF's in our code,
if we did not absolutely needed too.

Here is the inheritance for the X11 backend for TfpgCanvas:

                                      TObject
                                         |
                                   TfpgCanvasBase
                                         |
     TfpgCanvasImpl      --->       TfpgX11Canvas
           |
       TfpgCanvas


Here is the inheritance for the GDI backend for TfpgCanvas:

                                      TObject
                                         |
                                   TfpgCanvasBase
                                         |
     TfpgCanvasImpl      --->       TfpgGDICanvas
           |
       TfpgCanvas


TfpgCanvasImpl acts like an alias for the actual backend used. Every
painting library has a fpg_interface.pas unit that defines this
alias.

  X11:    corelib/x11/fpg_interface.pas
  GDI:    corelib/gdi/fpg_interface.pas


TfpgCanvas is common to all painting backends.

  TfpgCanvas:    corelib/fpg_main.pas


TfpgCanvasBase is also common to all painting backends and acts
like a abstract class defining the class interface that needs
to be implemented.

  TfpgCanvasBase:    corelib/fpg_base.pas


Each backend needs to implement the class interface defined by
TfpgCanvasBase. Obviously they are specific to each backend
so the unit implementing that interface, lives in that backend
specific directory.

  TfpgX11Canvas:    corelib/x11/fpg_x11.pas
  TfpgGDICanvas:    corelib/gdi/fpg_gdi.pas


Each backend has its own fpgui_toolkit.lpk Lazarus Package. Due
to the fpgui_toolkit including the common units and the backend
specific units, it completes the class hierachy and ties all the
units together into one framework.

Other classes that follow this same process (inheritance) are
listed below. Their actual definitions are in the fpg_interface.pas
unit inside each backend directory.

  TfpgFontResourceImpl
  TfpgImageImpl
  TfpgCanvasImpl
  TfpgWindowImpl
  TfpgApplicationImpl
  TfpgClipboardImpl
  TfpgFileListImpl

        ---------------oO0Oo-----------------

