FreeForm ReWriter 1.0
Notes
Added  notepad.exe "C:\LIBERTY\RE-WRI~1\RWNOTES.TXT 
     to the "External Programs" options in Liberty BASIC's
=================================================

Fixs Needed NOW
  graphicboxs
  clear variables
  Rework "Stretch"
  Right comma
    Space required between handles trailing comma and rest of line
   if bmp path on button is a variable then look in the bas file's home dir
     if it's not there then "prompt" for location 
Fix Item count (for control extensions)



change quits

=============================
Things to do
    install header
   Help file
  Bmpbutton specified as a variable
  Add generic error trapping....... verify format
  if format is wrong then give the option for user or auto designed dummy variables

  check to see if control have a number  is so get the largest number for FreeForm
  or start a new counter (starting at item count)  and add it to the prefix "ReWrite" if user does not specify
  or use no extension
  also consider adding a rem at end of a "new" control line


  Don't forget housekeeping

For the future
If non GUI statements are found in the GUI then give the option for recovery
  append to file instead of overwrite.

Setup more specific error traps and give work around options.
 
 
'BUG ?????
    after selecting and freeforming, if anything covers the window,
    a non-functioning combobox  magically appears
    a combobox at this location is not specified anywhere in program
    this happens in both tkn and bas file

    hit re-start and cover the window and it disappears
    ??????????????
   No Not A Bug
   I was "locating" a combobox at "0 0 0 0" to hide it.
   it should have been located at "locate 1000 0 0 0"




=================================
FOR E-Mail about this program.

Testers Needed
Testers needed for FreeForm ReWriter 1.0, a utility that extracts a specified window from an existing bas file and allows edit in FreeForm.
This utility maintains all code add by user to GUIs written in FreeForm.

I have also included the notes ( Menu Item "Develop" ) that  I used throughout this project
I should warn you at this time that the notes are not spell checked and should probably be rated PG-U13 "under 13 for childish content"

Make available at my web site ?????
=================================


               ---- Ok bonehead let's don't get silly on this one ---

  build for speed not comfort,  keep all messages and prompts to a minimum
  Use "One Window, Many Buttons" style GUI

   Use Notepad for Help not the "window" that you've already done.
    Yea but, it's window is very cool.
    Ok moron, How many lines of code did they take
    54
    so..................
     Also, the user can eliminate it if they're txt files.
    Actually they could also eliminate the menu and code used to call notepad as well
    OR
    Could write an actual help/about file
------
When parsing lines, Remember to look for cats !!!!
( Do we need this or will we only work with files in freeform's original format ???)
Seeing as how I use  cats for my menus I guess I'll slow Re-Writer down some more and search for cats.Man I don't like cats

-----


Questions
            how do I want to  save re-written bas file ???
                overwrite original   no, no, no
                rename original
                give rewrite a new name
                give the user the option to overwrite or rename the rewrite---Ok

Files to Include in distribution
   Re-Writer  bas and tkn
   ff2025rw and or method to convert ff2025 to rw
       might consider building a converter program, might not
       this would be a much smaller download, but this wouldnt be silly, wouldnt it   

   RwReadme.Txt 

   developers notes ???
    developers notes would show the "thought", or lack there of, used in  building this program.
   The user could delete this files as well as the menus and code needed for it. 
    Johnny you're so cool.
    You must be pretty important to think that somebody would want so see your thoughts....jug head

   Are you sure about this? it could be like pulling down your pants in public....your face could/would get red and some folks are not gonna understand the name calling and arguments you have with yourself not to mention the spelling and grammar !!!!!  Some might want to delete you. 
  Oh well   DYSLEXICS UNTIE

------------------------------------------------------------
 on first use require readme ??? no---gettin silly


------------------------------------------------------------
files created by FreeForm ReWriter 1.0
  ffrw.ini 
    used to store path to freeform if not in "home" directory.
    if freeform is found in  "home" directory this file will not be created

 ReWrite.tmp
   used to pass window and control info to freeform
   auto-delete this file when done with it and
   make sure it's gone when Re-Writer first begins.

 rwc00jd.tmp
  flags change to ReWrite from FreeForm 
------------------------------------------------------------
FR2 File Layout
GUI     
       currentForegroundColor$
       currentBackgroundColor$
       numbers of controls
       windowLabel$ in title bar
       windowType$
     input #formIn, objectCount  what in the world is this and will I be facing nuclear destruction if I cant figure it out  ???
       window Handle$
       1  (snap on)     betcha a buck that somebody will want this to be a 0
       snap on  xInterval always 8
       snap on  yInterval always 5
       number of menus
       window width
       window height
       windowComboboxColor$
       windowListboxColor$
       windowTextboxColor$
       windowTexteditorColor$
       windowUpperLeftX
       windowUpperLeftY
       bmpPath$
       window font

CONTROLS

    type$(i) = tmp$       ie "statictext"
    label$(i) = tmp$          "Dont Give Me No Static"    
    names$(i) = tmp$       ????
    xOrg(i) = tmp
    yOrg(i) = tmp
    width(i) = tmp
    height(i) = tmp
    corner$(i) = tmp$
    branchLabel$(i) = tmp$
    segment(i) = tmp           item number
    handle$(i) = tmp$          ????
    bmpName$(i) = tmp$
 next i

MENUS
 for i = 0 to menuCount - 1
    input #formIn, tmp$ : menu$(i)=tmp$
    input #formIn, tmp : menuItemCount(i) = tmp
    if menuItemCount(i) = 0 then [noMenuItemsToRead]
    for j = 0 to menuItemCount(i) - 1
    input #formIn, tmp$ : menuItem$(i, j) = tmp$
    next j
 next i

'-------------------------------------------------------------------------------
' 1 determine number of windows
' 2 count controls
' open "always on top"
' minimize when ff is called
' restore when  ff is closed

'===================================================
' changes to ff2025
'  1 at the beginning after the notes and before the dim statements add

'   check for ReWrite
'    ReWrite=0
'    path$=DefaultDir$
'    if right$(path$,1)<>"\" then path$=path$+"\"
'    DIM info$(10, 10)
'    files path$,"ReWrite.tmp", info$(
'    check=val(info$(0, 0))
'    if check<>0 then ReWrite=1 'ReWrite file does exist

'  2 use "find" in the edit menu of Liberty BASIC to find
'    the branch named  [inputLoop]
'    between [inputLoop] and wait add
'
'    if ReWrite=1 then goto [openFile]
'
' 3 use "find" in the edit menu of Liberty BASIC to find
'   the branch named [openFile]
'   between the lines
'   if isModified = 1 then gosub [formIsModified]
'   and
'   filedialog "Load form", "*.fr2;*.fre", formName$
'   add the following line
'      if ReWrite=1 then formName$="ReWrite.tmp" :goto [doReWrite]
'   under the next line filedialog "Load form", "*.fr2;*.fre", formName$ 
'  add
'    [doReWrite]
'  go down 30 lines and find lines

'    if lower$(right$(formName$,3))="fr2" then
'        input #formIn, fontChosen$
'        if fontChosen$<>"" then font$(1)=fontChosen$ 
'    end if
'
'    changes the first line to
'    if lower$(right$(formName$,3))="fr2" or_
'        formName$="ReWrite.tmp" then
'

'-----------------------------<Variables Key>--------------------------------
    GUI
    ffIn$(1) = currentForegroundColor$
    ffIn$(2) = currentBackgroundColor$
    ffIn$(3) = numbersOfControls$
    ffIn$(4) = windowLabel$ 'in title bar
    ffIn$(5) = windowType$
    ffIn$(6) = objectCount$   ' ???
    ffIn$(7) = windowHandle$
    ffIn$(8) = "1" ' (snap on)
    ffIn$(9) = "8" ' snap on  xInterval always 8 or "" ???
    ffIn$(10)= "5" ' snap on  yInterval always 5 or "" ???
    ffIn$(11)= numberOfMmenus$
    ffIn$(12)= windowWidth$
    ffIn$(13)= windowHeight$
    ffIn$(14)= windowComboboxColor$
    ffIn$(15)= windowListboxColor$
    ffIn$(16)= windowTextboxColor$
    ffIn$(17)= windowTexteditorColor$
    ffIn$(18)= windowUpperLeftX$
    ffIn$(19)= windowUpperLeftY$
    ffIn$(20)= bmpPath$
    ffIn$(21)= windowFont$ 

Controls 
    ffInX$(x)      ....type$               '  statictext
    ffInX$(x+1)  ....label$               '  StaticText Caption
    ffInX$(x+2)  ....names$            '  StaticText1
    ffInX$(x+3)  ....xOrg$              '  25
    ffInX$(x+4)  ....yOrg$              '  25
    ffInX$(x+5)  ....width$              '  100
    ffInX$x(+6)  ....height$             '  25
    ffInX$(x+7)  ....corner$            '  UL
    ffInX$(x+8)  ....branchLabel$    '  [branch]
    ffInX$(x+9)  ....itemNumber$    '  item number
    ffInX$(x+10) ....handle$            '   ????
    ffInX$(x+11) ....bmpName$      '  test.bmp
    ffInX$(x+12) ....arrayName$     '   array$()

