home *** CD-ROM | disk | FTP | other *** search
-
- TPLEDIT.DOC
-
- V1.00 ALPHA
-
- TPLEDIT is a GADTOOLS template editor used to edit display templates
- that can then be compiled into a program.
-
- TPLEDIT ONLY RUNS UNDER 2.0 ! THIS IS AN ALPHA
- TPLEDIT ONLY RUNS UNDER 2.0 ! THIS IS AN ALPHA
- TPLEDIT ONLY RUNS UNDER 2.0 ! THIS IS AN ALPHA
- TPLEDIT ONLY RUNS UNDER 2.0 ! THIS IS AN ALPHA
- TPLEDIT ONLY RUNS UNDER 2.0 ! THIS IS AN ALPHA
-
- (1) MENUS
-
- Save save database
- SaveC save database as C code (appends .C to project name)
- SaveAs save database as (you pick the name)
- SaveAsC save C source as (you pick the name)
- Load Load a new project
- Merge Merge another project into this one
- Quit quit program
-
- LockTo See below (ATTACH STRING GADGETS...)
-
- Snap The mouse coordinates may be snapped to various
- intervals.
-
- NOTE: TPLEDIT is only able to load database format files which
- are saved via SAVE or SAVEAS. TPLEDIT cannot reverse
- engineer C source files it generates.
-
- Currently, TPLEDIT does not warn you if you quit without
- saving, or load a new project without saving the old.
-
- Menus can be accessed from either window
-
- (2) TPL CONTROL WINDOW
-
- The control window allows you edit gadgets in the project window.
-
- CREATE NEW GADGET:
-
- Specify the appropriate gadget type, do not specify invisible
- (not implemented yet). 'entry' is a string gadget, I haven't
- renamed it yet.
-
- Then, specify text placement if it applies.
-
- You MUST specify a REGION name. EACH GADGET MUST HAVE A UNIQUE
- REGION NAME! The gadget label, default text, and buffer length
- specifications depend on the type of gadget you pick. Note
- that the BUFLEN only applies to string gadgets type=entry, and
- DEFAULT for CYCLE or SELLIST, if specified, is an integer item
- number.
-
- You might want to specify a non-empty string list for CYCLE and
- SELLIST gadgets. This is done by typing in the ENUM string
- window and hitting return.
-
- hit the NEW gadget.
-
- Move the mouse to the project window and specify a square
- by placing the mouse in the starting position, holding down
- the select while moving the mouse to the ending position and
- release the mouse. The gadget now exists.
-
- ATTACHING STRING GADGETS TO LISTVIEWS
-
- Create a listview and string gadget. Select the listview
- gadget so that it's information is displayed in the control
- window. Then select the LOCKTO menu option. Finally,
- click on the string gadget.
-
- Due to bugs in GADTOOLS, the string gadget's dimensions will be
- forced to conform. To unlock you must either delete the
- listview or the stringgadget (for now).
-
- DELETE A GADGET
- MOVE A GADGET
- SIZE A GADGET
-
- To delete a gadget hit the DEL button and click on gadgets
- to delete.
-
- Moving and Sizing work the same. Sizing always modifies
- the lower right hand corner of an existing gadget.
-
- WANDER
-
- Wander enables all gadgets and lets you play with them.
-
- UPDATE
-
- You can change various parameters, including the items in
- a select/cycle list, by clicking on the appropriate gadget
- from WANDER mode, making the appropriate modifications in
- the TPL CONTROL window, and the hitting UPDATE.
-
- WARNING WARNING: To copy a string gadget's info to the
- TPL CONTROL window you must hit RETURN in the window after
- activating it! Otherwise you might update the wrong
- gadget's info.
-
- A CYCLE/SELLIST list may be modified by adding new items
- in the string gadget just above the ENUM text, or deleting
- items by selecting the item and hitting the DEL gadget
- below the ENUM text.
-
- NOTE: SELLIST (LISTVIEW_KIND .. I'll rename it eventually) gadgets
- cannot be deactivated and so their hit boxes remain active. There
- is a two pixel boundry around every gadget which you can click on
- to 'grab' such gadgets, or grab string gadgets without clicking
- in them.
-
- (3) SOURCE CODE GENERATION
-
- To generate source code select the SaveC or SaveAsC menu options.
- The C source file generates all manipulations required to setup
- the gadtools gadgets in a window... everything except the openning
- of the window itself.
-
- Additionally, the code generates variables references for easy
- access / modification by the host program. For example, the
- Buf_REGION pointers point to the string buffer for the associated
- string gadget after it is created so you do not have to figure
- it out.
-
- Variables are generated for each gadget based on its REGION name,
- denoted as %% below:
-
- NG_%% These #define's yield a pointer to the proper
- NewGadget structure from NGAry based on the
- REGION name.
-
- NGAry Array of NewGadget structures, ng_VisualInfo and
- ng_TextAttr initialized by InitGads() call (for now,
- eventually this will be specifiable from the editor)
-
- GAD_%% A #define representing the GadgetID for a given
- gadget. Eventually you will be able to specify
- a #define of your own to offset all the id's.
-
- Gad_%% A pointer to the gadget after creation, useful
- when making GT_SetGadgetAttrs() calls.
-
- Buf_%% A pointer to the string buffer (ENTRY) after
- it is created.
-
- DefText_%% A pointer to the default text, or set to NULL.
- May be modified before init. Only applies to
- ENTRY (string) gadgets.
-
- NodeAry_%% If any items are specified for a SELLIST or
- CYCLE, they are stored in this array, with
- Succ and Pred fields linked together and to
- the List_%% list.
-
- SelNo_%% LONG variable (SELLIST, CYCLE), set to preselected
- item number.
-
- List_%% A LIST structure (SELLIST), already initialized
- to either an empty list or linked into a
- NodeAry_%% array of nodes. May be modified
- before the gadget is created or afterwords,
- following gadtools guidelines.
-
- Ary_%% A char ** array pointer (CYCLE), preset to the
- cycle specification. Points to StatAry_%%. The
- reason this is simply a pointer to another
- global array is to allow the host program to
- modify it before creating the gadgets.
-
- StatAry_%% holds static array (CYCLE) of char *'s.
-
- Other Defines
-
- WIN_LEFT window placement parameters. These parameters
- WIN_TOP generate a window of exactly the same screen
- WIN_WIDTH positioning and dimensions as was last saved.
- WIN_HEIGHT
-
- Routines
-
- GList = InitGads(Scr)
- (void) FreeGads()
-
-
- (4) NOTES
-
- Many GADTOOLS types / flags are as yet unsupported.
-
- I intend to change the variable naming conventions so as to support
- linking with multiple TPLEDIT generated object files, including
- separating out the #include's and #define's. I will retain
- single-application mode variable-naming conventions as an option.
-
- SOURCE CODE: Source code generated by TPLEDIT should be
- completely portable. However, the example TEST code and
- TPLEDIT source is DICE specific in that it assumes all libraries
- will be openned automatically.
-
- Other compilers will most likely generate undefined symbol
- errors during linking. In fact, DICE may even do so if you
- do not have the absolute latest version (I just added some
- of the below to the auto library). Shouldn't be a big deal
- though...
-
- intuition.library
- graphics.library
- asl.library
- gadtools.library
-
- The test program makes similar assumptions. I will eventually do
- this myself so as to make the program portable. Please note that
- this is an ALPHA release.
-
-
- I may not have a lot of time to refine this program and invite
- anybody who wishes to take it on as a major project to contact
- me! I only ask that the general design philosophy be retained
- and the code placed in the public domain.
-
- BIX: mdillon
- INTERNET: dillon@overload.Berkeley.CA.US
-
- -----------------------------------------------------------------------
-
- TECH NOTES
-
-
-