What Is It
Treeview Master - displays documents of just about any kind from graphical, hierarchical tree style lists. Treeview Master demonstrates the Document Tree kind of application that can be purchased commercially providing functionality similar to this rather simple TCB process.
Treeview Master data tree charts can be loaded from a file dialogue or selected from a preloaded drop-down selection box. SQLite dataset files can be separately selected from a file dialogue and database structures can be displayed in the data tree.
The majority of the screen consists of a large window box with a single graphic object titled "Database" in it. This is the data tree window. At the far left of the process window is a vertical line of four buttons. The first or yellow button should display this document. The next, green, button minimizes the screen to the system tray. The third, or blue button toggles the Word Master window to stay on top of other windows or not. The last, red button exits Treeview Master.
In the top middle of the window below the "Treeview Master" label is a drop-down selection box labeled, "Charts". Selecting an item from the drop-down and pressing the Enter key, loads the data tree from the selected data tree file. This preloaded file is named "lstCharts.txt" located in the docs\folder. The user can edit this file to create their own list of charts.
Beneath the Charts box and just above the data tree on its left side, is a row of four buttons. From the left, the first button opens a dialogue that lets the user select a chart file from disk to load into the data tree. The next button clears the data tree. The third button refreshes the data tree if the graphics get a little flaky.
The last button opens a dialogue that lets the user select a SQLite database file from disk and its structure is loaded into the data tree. When a data base file is loaded, it is set as the default data set file and when a table is selected in the data tree that table is set as the default table. Why this is relevant will be made clear later.
Treeview Master database use requires that a version of the SQLite command-line version must be present in the same folder as TCB.exe. A version is delivered with Treeview Master. A later version can be found on the Treeview Master website. More recent versions are probably available in many other places. A sample database is delivered in the Treeview Master package.
If that was all it could do Treeview Master would be like other such applications. But Treeview Master goes the extra mile. Pressing the large button above the top right edge of the data tree window, changes the screen. After pressing the button the first time, the data tree window morphs into an empty light beige colored window with five buttons above and on the left of the window.
This is the work/composition window. Its primary function is to provide the ability to edit and then run Treeview Master chart files. The first or left most button above the composition screen opens a dialogue that lets the user select any file from disk to load into the composition window. The next button opens a dialogue that lets the user select a file name and location to save the contents of the composition window.
The third button takes the contents of the composition window and executes each line as though it where a command line in a "batch" file. Command lines may consist of compound combinations, separated by a "|" character, of any mix of TCB functions or Windows or DOS commands. Multiple line SQL queries on these command lines are accommodated by the convention of using the "\n " three character combination instead of a linefeed in the query. The fourth button takes the contents of the composition window and passes the information to the TCB SQL query processor for execution. The query can consist of standard SQl statements as well as SQLite "." commands. Query results can be "spooled" to the composition window.
You can set any SQLite database file to the default expected in most queries by using the TCB function db3file= before composing and running a query. It has the form: db3file=[database path\file]. So, executing the command line db3file=data\mydata.db3|seltable=mytable| will set data\mydata.db3 as the default database file and the table in it, mytable as the default table. Documentation for TCB functions and processes is found in the docs\ folder where this document should reside.
The last button clears the composition window. The data tree and composition window combination provides a very powerful data exploration interface. If the button above the right corner of the composition window is pressed. the window morphs back to the data tree view.
The data tree chart files are contained in plain text files and have a fairly simple format. The data tree processor expects a file with two type of objects, graphic objects and data objects, in any order but it is wise to group object together. The graphics objects consist of a single line of text in the following format:
The data objects or chart elements consist of a single line of text with five parameters in the following format:
We are concerned with a major concept in tree structures, parents and children. Its pretty simple, a parent can have children and a parent. Children can be parents but have only one parent. Secondarily, each element must have a valid graphic assigned to it or it effectively doesn't exist.
Each table that is loaded may share graphics but all element tags must be unique from elements in other charts already loaded or the element won't display. Treeview Master primary method of working is being able to execute a command line from an element. The command line replaces the name tag in an element.
When that element is right-clicked, the command line is executed. It is a TCB command line and can contain anything. The element name tag "browser=docs\TCBSQLtut.pdf|" is also a TCB function call. It says to open the document TCBSQLtut.pdf in the folder docs\ with the Treeview Master imbedded document viewer. Yes, Treeview Master has its own viewer!
That's not all! Do this, switch to the composition window if you are not already there. Type in "playv=[path\file.mpg]|" where [path\file.mpg] is the location of a .mpg movie file on your disk. Press enter then click the "Execute box contents." button. Viola! Treeview Master is now a video player! You can size the Treeview Master window before the video plays by grabbing an edge and dragging the Treeview Master screen to the size you want. You can move the screen by putting the cursor anywhere in the screen where there isn't an object and drag.
Although the TCB development system has a chart generator process that automatically creates data tree files from data bases, it is very easy to create and modify small to medium charts by hand with Treeview Master.
The Treeview Master screen is generated by a TCB process. The Treeview Master process is run by the TCB.exe program. What this means is that you, the end user, can tailor the Treeview Master process to be just about anything you want. Treeview Master is a TCB process that is easily user-modifiable, user-extensible, and user customizable!
You can clone it then modify it to create new "programs." You can change everything about the Treeview Master process, including window size and location, look and feel and the number, sizing and placement of objects can be changed. You can alter the behavior of an object as well as their attributes.
Objects are everything you see on the Treeview Master screen, everything. If you are going to play, the name of the Treeview Master process file is treemaster.prc located in the prcs\ folder. Copy it or otherwise preserve it if you don't want to lose the original Document Master process itself.
The program, TCB.exe runs processes. When it is run by itself, it looks for a process called "main.prc" in the prcs\ folder. This procedure was altered to simply run Treeview Master then exit. You can change it do do what you want.
We certainly hope you have fun playing with an adult toy!
graf=[graphic tag],[graphic file spec]
Examples:
graf=report,grafics\report.ico
graf=table,grafics\table.ico
The graf= is required. The graphic tag is referenced in the data objects as the graphic to use for that tree element. The graphic file spec is the location of the graphic file on disk. If a graphic object doesn't exist for an element, the element won't show.
node=[parent tag],[tvwChild],[element tag],[text],[graphic tag]
Example Root Element:
node=,,Lev11,TreeDocs,report
Example Child Element:
node=Lev11,tvwChild,Lev21,Treeview Master Documentation,table
The node= is required. The parent tag is only used in an element if it is the child of an element, a child of parent tag. The tvwChild is a constant that is required if the chart element has a parent. The element tag is the name of a particular chart element. The text parameter is the element text that appears in the display. The graphic tag parameter references a graphic object in the file from the graf= objects.
Copyright © 1982-2016 Phoenix Information Systems/TM all rights reserved
Contact: Fred Pierce, makpiya@aol.com, makpiya@gmail.com, 831.240.9969