=============
TeeTree 1.02
teeMach, SL
=============

See below the following:

  ** New features and changes.
  ** Problems fixed.
  ** Pending bugs.
  ** Previous versions.


New Features and Changes since 1.01 version:
---------------------------------------------

 * New "Hint" yellow popup window when passing the
   mouse cursor over long text nodes.

     Tree1.ShowHint := True ;

 * Added a new method to show the Tree Editor dialog
   without any "About..." information:

     Uses TreeEd;
     EditTreeNoAbout( Self, Tree1 );

 * Connection lines now display correctly rotated Text.

     Tree1.Connections[23].Text.Add('Hello');

 * Connection "arrows" are now correctly rotated.

 * New Database Wizard dialog !

   Available both at design and run-time, this dialog makes
   very easy to connect DBTree components to Datasets to
   populate tree nodes with Field contents.

   3 ways of population are supported:

     Parent Field, Group Field and Master-Detail.

 * New Speed improvements:

   When adding many nodes at runtime (for example more than 1000),
   the following properties can be useful to increment speed:

     Tree1.AssignParent : Boolean ( default True )

    When a new shape is created, it is assigned to
    its parent node properties.
    This is time consuming and not necessary all times,
    so you can turn it to False for more speed.

     Tree1.CreateConnections : Boolean ( default True )

    When adding child nodes, first the node is created
    and then a new connection object linking the node and
    its parent is also created.
    If connection lines are not essential, you can set
    this property to False for more speed.
    No connection objects will be created (so it will be
    faster to paint and to save / load to file ).

     Tree1.NoOwnerShapes : Boolean ( default False )

    When creating new nodes and connections, the Tree is,
    by default, the Owner.

    Setting NoOwnerShapes to True will speed up very much
    adding new nodes at run-time, but it will make not possible
    to save the tree to *.tee files.

    Other internal changes have been done to increment
    speed when adding nodes and when redrawing trees.


 * New Examples

    The "USACities" folder contains a project to show how
    to Load nodes from ASCII files and also how to handle 
    mouse clicks and other features.

    The "OpenGL" folder includes a demo of TeeOpenGL 
    3D Canvas rendering using a Tree component.

    The "QuickReport" folder provides an example of a QRTree 
    component in a QuickReport band.


 * New Inplace editor

   Now the Tree supports inplace editing internally without
   any additional code.
   When pressing the F2 key, a memo control pops up filled
   with the current node text.
   You can change the F2 key or disable Inplace editing
   using the new Tree1.OnStartEditing and StopEditing events.

   The text can be edited in multi-line mode.
   Pressing the ESCAPE key will close the memo and
   repaint the node with the new text.

   This boolean property returns if the tree is in
   "edit" mode:

     if Tree1.Editing then ...

   These methods can be used to start / stop inplace editing:

     Tree1.StartEditing
     Tree1.StopEditing

   The above methods trigger the following events:

     Tree1.OnStartEditing
     Tree1.OnStopEditing

   For advanced use, you can modify the TMemo box that is
   displayed when editing using a new internal public
   variable:

     Tree1.InternalMemo.Font.Color:=clBlue;


 * New Focus / Keyboard / TabStop support

   Now when focusing or unfocusing a Tree component,
   the selected nodes are displayed using a different
   color. The Tree detects focus / unfocus events and
   repaints itself.

   Now the Tree.TabStop property is set to True by default,
   as now the Tree component supports keyboard navigation.

   Now keyboard events are published:

    Tree1.OnKeyDown
    Tree1.OnKeyPress
    Tree1.OnKeyUp

 * Improved node linking:

   Now when connecting nodes using the Tree editor,
   a temporary line is displayed while the user
   is doing the connection by mouse.
   This improves very much visual connection of nodes.

   A new read-only property returns if the Tree is in
   "connecting" mode or not:

     if Tree1.Connecting then ...

   The "from" and "to" shapes of the connection are:

     Tree1.ConnectingShape1
     Tree1.ConnectingShape2

 * Added "Snap To Grid" support.

   Now when moving or resizing nodes, they can be
   adjusted to grid intervals. (The GridStep property).

   This property controls this feature:

     Tree1.SnapToGrid := True ;

     Tree1.GridStep := 8 ;

   Snap-To-Grid works with / without the Tree editor,
   and at design-time / runtime.

 * (Advanced) Created new virtual class object:

     TTreeAlignChild=class

   This class can be used by advanced developers
   to create new types of "child alignment".

   One example of this class is the included:

    TTreeExplorerAlignChild=class

   This class will organize nodes like a Windows Explorer
   TreeView. It will move nodes down when expanding and
   move nodes up when collapsing.

   This class is also responsible to draw the connection
   lines between nodes and to determine the position of
   the node "crossbox".

   By creating a new "Align Child" class, it is possible
   to reposition nodes and draw customized lines.


 * New Navigation property for Tree component:

    Tree1.Navigation : ( tnExplorer, tnNearest, tnNone )

    This property controls navigating nodes using the
    arrow keys.

    When Navigation is "tnExplorer" (the default),
    nodes are selected using the Up and Down arrow keys.
    Left and Right arrow keys expand and collapse
    nodes.

    When is "tnNearest", the arrow key determines
    the direction of the nearest node to select.

    When "tnNone", keyboard navigation is disabled.

    Keys:

    -Arrow keys to navigate (and expand / collapse in Explorer mode).

    -The F2 key popups an inline editor memo to
     alter the node's text.  The ESCAPE key or F2 key
     cancel inplace editing.

    -The ENTER key expands and collapses nodes.

    -The SPACE key toggles between checked and
     unchecked when the node has
     tiFolderCloseChecked or tiFolderCloseUnChecked images.

    -The DELETE key removes nodes.

    -The Home and End keys move to top root and bottom node.

    When the Tree is in "Designing" mode, selected shapes
    can be moved using the Ctrl key and the arrow keys, and
    resized using the Shift key and the arrow keys.
    Using Alt key and arrow keys in design mode will move the
    node but not the node childs.

 * Added a new property to Tree1.Selected:

       Tree1.Selected.ScrollToView : Boolean default True

   When navigating using the arrow keys or selecting nodes by code,
   the Tree will automatically scroll up or down to make new selected
   nodes totally visible.

   You can set this property to False if do not want automatic scrolling:

      Tree1.Selected.ScrollToView := False

 * Added new properties to ScrollBars (Horiz and Vert):

    Tree1.VertScrollBar.Automatic: Boolean (default True)

   This new property, when True, makes the Tree
   scrollbars visible only when necessary.
   It also calculates the ScrollBar Min, Max and
   PageSize properties according to all tree shape bounds.

    Tree1.HorizScrollBar.PageSize: Integer  (default zero)

   The ScrollBar "PageSize" property controls the size of the
   scrollbar "thumb". It has effect when Automatic is True.


 * Added new properties for Tree1.Selected sub-object:

    ColorUnFocused : TColor (default "clInactiveCaption")

    This color is used to draw shapes that are
    selected, but only when the Tree is unfocused.

    And...

    BorderUnFocused : TTreePen ( default not-visible pen)


 * Added new property for Shapes:

     Tree1[23].HasChilds : Boolean

   Returns True if the node has child nodes.

   It is equivalent to this expression: "Childs.Count>0"

     if MyNode.HasChilds then ...

 * Added new property for Shapes:

     Level : Integer

   This read-only property returns the number of parents
   of a given shape to get to the "root" node.

   Root nodes "Level" property returns zero.

     if MyNode.Level > 2 then ...


 * Added new property for Shapes:

    ShowCross: ( scAuto, scAlways, scNever )

   This property (by default is "scAuto"), controls
   when to display the "cross-box" graphic.

   Setting it to "scAlways" is useful when we need the
   cross-box to be displayed but we do not know yet if
   the node has childs.  (This is what Windows Explorer
   does).

   When "scAuto", it will be displayed only when the
   node has "child nodes".

     Tree1[14].ShowCross := scAlways;


 * Added Shape style ToolBar at Tree Editor dialog.

   This new toolbar is very similar to Delphi or
   C++ "Component ToolBar".
   It allows you to click or double-click
   toolbar buttons to create new shapes of the selected style.

   Custom shapes can also be "registered" into the shape
   toolbar palette. ( See "Flow Chart" example editor and
   the TreeFlow.pas unit ).


 * Added "Custom" shape styles.

   Now it is possible to create small and simple
   components which implement "custom" shape styles.
   An example of several custom shapes is included
   at "TeeFlow.pas" unit.

   When creating custom shapes, the most important
   thing is to override a method to specify the shape
   points coordinates.
   These points are used many times internally, and are
   used to draw the graphical shape and to check
   if the mouse cursor is inside it.


 * Added new property at Tree.CrossBox object:

     ClickTolerance ( Integer, default value 0 )

     This property indicates how many extra pixels will
     be allowed to trigger a "mouse click" on a CrossBox
     rectangle when expanding or collapsing nodes.

     For example, setting ClickTolerance to 2 will
     allow clicks around 2 more pixels of the crossbox
     bounds.

        Tree1.CrossBox.ClickTolerance := 2


 * Added new method for all nodes:

    SaveToTextFile( Const FileName: String );

    This allows to save a complete Tree root into a text ASCII file:

      Tree1.Roots[0].SaveToTextFile( 'c:\mytree.txt' );

     Only the first line of each Node text is saved.
     One space character is used for each child level.

     Format example:

      World
       Africa
       Asia
       Australia
       Europe
        France
         Paris
        UK
         London
        Spain
       USA
        California
         Los Angeles
         San Francisco
        Oregon

 * Added new method for TTree and TDBTree components:

   Function LoadFromTextFile( Const FileName: String ):TTreeNodeShape;

    This function imports trees previously saved into text files 
    (see above method).

    Tree1.Clear;
    Tree1.LoadFromTextFile('c:\mytree.txt');

    A new root node is created and filled with childs according to
    the text file contents.
    The function returns the newly created root node.


    Using text files to store / reload Tree nodes can be much
    faster than using *.Tee files.  ( Because when using text
    files, node formatting properties are not saved ).


  * Added a new method:  Tree1.AddRootObject

    Equivalent to shapes AddChildObject but for Root nodes.

      Tree1.AddRootObject('c:\', MyData );


  * Removed protected unnecessary method: TTreeNodeShape.DoMouseDown
     (use Shapes's OnClick event).

  * Added all new properties to Tree and Shapes Editor Dialogs.


Problems fixed since 1.01 version:
===================================

  * Problem Fixed in Print Preview dialog (TeePrevi.pas).
    Now changing the printer in the "Setup" dialog refreshes
    the current printer.

  * Fixed autopositioning of Root nodes. This allows expanding
    or collapsing one "root" node and moving the other roots.


Pending bugs:
=============

  - Curved connection lines do not work.

------------------------------------------------------

Changes in Previous Versions:
------------------------------

 * Added "TDBTree" component to the palette.
   This component implements automatic connection to Tables, 
   Queries or any other DataSet.
   Supports several data-aware situations, including master-detail
   relationships.  See TeeDBTre.pas unit for more documentation.
   See the example form "Database" to check the DBTree features
   and to see how to do it by code.

   At design-time, you can right-click a DBTree to "Refresh" its
   contents by loading records from the configured Table or Query,
   adding tree node shapes with field contents.

 * Added example of "Tree with CheckBoxes" using images simulating
   a checkbox near each node. 

 * Added example of something close to multi-columns for each node.
   ( See "Database example" in "master-detail" mode ).

 * The Shape "ShadowColor" and "ShadowSize" properties have been
   joined into a single subcomponent: 

    "Shadow.Color", "Shadow.HorizSize" and "Shadow.VertSize".

   This allows to control the horizontal and vertical size of
   the shape shadow independently.


 * The Shape.Font property has now a new sub-property to draw
   text with shadow effect:

     TeeShape1.Font.Shadow.Color
     TeeShape1.Font.Shadow.HorizSize
     TeeShape1.Font.Shadow.VertSize

   The shape text (if any) is displayed twice, first with the
   shadow color and second with the Font.Color.
   By default shadow is not visible ( shadow size is zero ).

 * Added "RoundRectangle" style for shapes.
   Shape's Gradient and Shadow also take care of "RoundRectangle".

 * Replaced the "Shape.TextAlignment" property with:
   "Shape.HorizTextAlign" and "Shape.VertTextAlign" properties:

   Example:

    Old:                               
     Tree1[23].TextAlignment:=taCenter

    New:
     Tree1[23].HorizTextAlign:=htaCenter
     Tree1[23].VertTextAlign:=vtaCenter

 * Renamed "TConnectionStyle" enumerated type to 
   "TTreeConnectionStyle".  (To avoid clashing with other tools).

 * Added Text, Font and Text Alignments to Connection line objects.
   ( TTreeConnection ).  Added support for these new properties at
   the connection Editor dialog ( TreeCoEd.pas unit ).

 * Now it's possible to refer to a Tree shape with less effort:

      Old: Tree1.Shapes[23]
      New: Tree1[23]

   (The old way is also valid and works fine).

 * Added "AutoPosition.Left" and "AutoPosition.Top" to each shape.

   Now shape nodes can be automatically positioned in the horizontal
   and / or vertical directions independently.
   This is very useful to implement complex positioning algorithms.

 * Added a new property to all shape Fonts:  "InterCharSize"

   This property specifies, in pixels, the distance between
   each character in a shape's text. Can be negative or positive. 
   By default is zero.

 * Added two new properties to nodes: ImageWidth and ImageHeight
   They are zero by default ( so the default image size is used ).  

   Setting these properties allows shapes to display images
   with customized width and / or height.

 * Improved drawing speed

 * Added main menu to the Tree editor

 * Expanded documentation (TeeTree1.doc)


Problems Fixed in 1.01 version since 1.0 version:
--------------------------------------------------

 * Printing now works fine.

 * Drawing a Tree onto another Canvas with Left / Top
   coordinates bigger than zero works fine now:

      Tree1.Draw( PaintBox1.Canvas, Rect( 20,30,120,130 ) );

 * Some misbehavior in connection placements has been corrected.


----------------------------------------------------------------