Lazarus

Free Pascal => FV/Textmode IDE => Topic started by: avra on November 23, 2012, 02:36:07 pm

Title: FreePascal text mode dialog designer for Free Vision
Post by: avra on November 23, 2012, 02:36:07 pm
I have succeeded to compile TESTAPP FreeVision application and run it via remote terminal on Raspberry Pi ARM HF Debian Linux. Now I would like to use FreeVision but couldn't find any text mode dialog designer. Neither in text mode IDE neither in my net or wiki search. I have only found this application for Turbo Pascal: DialEdit - a Visual Editor for TurboVisionTM Dialogs http://home.comcast.net/~JamesMClark5/Pascal/index.htm. Is that no source ancient DOS application my only option?
Title: Re: FreePascal text mode dialog designer for Free Vision
Post by: BigChimp on November 29, 2012, 12:41:02 pm
Hi Avra,

I've looked around some but didn't find anything. Have you come up with anything useful meanwhile?

Perhaps we could send an email to the author of DialEdit and ask to make it open source (GPL/LGPL). AFAIU, it's written for another Pascal compiler, but perhaps translating it to FPC won't be too hard...
Title: Re: FreePascal text mode dialog designer for Free Vision
Post by: avra on November 30, 2012, 08:41:54 am
Unfortunately it seams that's the only option. I just don't get it that all these years TP/FP text mode existed without such a tool integrated in IDE. What did everyone do, draw screens in code? Visual screen designer really boosts productivity, and some nice visual text mode application like raspi-config could be written in an afternoon. Of course, for Midnight Commander or Dos Navigator you would need "a little" more time... ;-)
Title: Re: FreePascal text mode dialog designer for Free Vision
Post by: BigChimp on November 30, 2012, 08:58:38 am
Ok, I'll send him an email if you don't mind.Sent him an email.
Title: Re: FreePascal text mode dialog designer for Free Vision
Post by: avra on December 01, 2012, 08:39:26 am
Thanks. Let me know about the result.
Title: Re: FreePascal text mode dialog designer for Free Vision
Post by: BigChimp on March 04, 2013, 10:13:33 am
Got no response; just sent him a reminder.
Title: Re: FreePascal text mode dialog designer for Free Vision
Post by: avra on March 04, 2013, 11:43:19 am
Thanks for the info. Let's hope for the best...
Title: Re: FreePascal text mode dialog designer for Free Vision
Post by: avra on May 02, 2014, 03:32:12 pm
GOOD NEWS!!!

My terminal application was finished recently (drawing lines by hand) and I have no need for this editor now, but I have decided to try to contact the author my self to avoid repeating all the hard work if I ever need textual screen designer again. Fortunately, I have received two replies from the author shown below. He has been so kind and released source under GPL3. Who knows if/when I will have next project that needs textual screen designer, but if anyone is in a hurry feel free to try yourself to adapt sources to FPC. Once finished, this would be a very powerful screen designer that will allow building TUI (textual user interface) frontends for endless linux command line tools which could be run from terminal, SSH or Telnet.

Reply 1:
"Zeljko -
I have decided to release DialEdit under the GNU General Public License.
Go to http://home.comcast.net/~JamesMClark5/Pascal/index.htm
again, and you will see that DialEdit3a.zip has been replaced by DialEdit3b.zip,
which includes the source code and the user manual in a form meant to be viewed
in the IDE (using the LineDraw font to show example dialog features).
The original BP7.0 program has been adapted to Visual Pascal, so hopefully
that will make the port to FreePascal easier.
- Jim"

Reply 2:
"Zeljko -
Yes, you may publish my former reply on the forum.
I have been retired for 12 years, and will be glad to see
DialEdit gain new life.
There remains a copyright notice in the CopyNote string,
but this is preempted by the GPL notice in the comments.
The CopyNote string, which is displayed by the EXE to
show the program version, can be replaced by a last-edit
date, perhaps including a GPL notice.
The "To-Do" and "Notes" comment sections near the
beginning of the source code may give you ideas for
further improvements.
I have a habit of putting {+} tags on source code lines
to mark recently added or modified lines.  The idea is
that when new behavioral faults are observed, these
lines are suspected first as possible culprits.  Often,
one conceptual change requires scattered code changes.
You may also publish any of this reply on the forum.
- Jim"

Thank you very much Jim!
Title: Re: FreePascal text mode dialog designer for Free Vision
Post by: marcov on May 02, 2014, 03:54:25 pm
I have config/params and tvinput compiling.
Title: Re: FreePascal text mode dialog designer for Free Vision
Post by: marcov on May 02, 2014, 04:31:34 pm
I also have dialedit running but it crashes when creating a new dialog.

Possibly there are issues with streams not being 100% compat, since it comes with a resource file that it tries to read.

Traceback:


 $00431EF5  ADVANCESTRINGPTR,  line 236 of ./fv/src/histlist.pas
 $00422088  TGROUP__FOREACH,  line 2329 of ./fv/src/views.pas
 $0042248A  TGROUP__HANDLEEVENT,  line 2514 of ./fv/src/views.pas
 $004256E9  TWINDOW__HANDLEEVENT,  line 3973 of ./fv/src/views.pas
 $00428A5F  TDIALOG__HANDLEEVENT,  line 1134 of ./fv/src/dialogs.pas
 $00426792  MESSAGE,  line 4629 of ./fv/src/views.pas
 $0042A24C  TBUTTON__PRESS,  line 1841 of ./fv/src/dialogs.pas
 $0042A905  TBUTTON__HANDLEEVENT,  line 2015 of ./fv/src/dialogs.pas
 $00422088  TGROUP__FOREACH,  line 2329 of ./fv/src/views.pas
 $0042241B  TGROUP__HANDLEEVENT,  line 2505 of ./fv/src/views.pas

Title: Re: FreePascal text mode dialog designer for Free Vision
Post by: Mike.Cornflake on May 02, 2014, 06:06:43 pm
In unrelated news Pyroworm just became my favourite Worm/Conways Life mashup :) 
http://home.comcast.net/~JamesMClark5/Pascal/index.htm

I look forward to going through the source code - thanks for the site pointer :-)
Title: Re: FreePascal text mode dialog designer for Free Vision
Post by: avra on May 05, 2014, 10:20:49 am
Possibly there are issues with streams not being 100% compat, since it comes with a resource file that it tries to read.
marcov, you are faster then light ;-). I didn't expect anyone to take a look at it so soon. Anyway, if resource file is a problem I may try to talk it through with the author or I could PM you his contact details.
Title: Re: FreePascal text mode dialog designer for Free Vision
Post by: marcov on May 05, 2014, 02:48:56 pm
I yesterday did some more:

- the first crash was in histlists, probably because the history stream format is different. Renamed the .hst file -> solved.
- second crash is in initbounds, probably due to an order problem in the constructor.

for a
  new  (psometing,something.init...());

it seems that TP assigns the allocation to psomething before calling init, and FPC after.  Anyway, the initbounds access the global var and is called during subitems initialziation, leading to crashes. No solution yet.
Title: Re: FreePascal text mode dialog designer for Free Vision
Post by: Jurassic Pork on May 07, 2014, 01:51:35 am
hello marcov,
is it in these calls that you have a sigsegv :
Code: [Select]
#0 TTRIALBUTTON__INIT(0xcfd38, 0xffffffff, <error reading variable>) at DialEdit.pas:2311
#1 TTRIALDIALOG__INIT(0xcfe10, 0xffffffff, <error reading variable>) at DialEdit.pas:4078
#2 NEWDIALOG(0xcff30) at DialEdit.pas:5027

something is strange :
TTRIALBUTTON__INIT  call initbound and initbound use trialdialog :
Code: [Select]
procedure InitBounds(var R: TRect; SX, SY: integer);
var
    PX, PY: integer;
begin
    PX:= TrialDialog^.Size.X - 2;
    PY:= TrialDialog^.Size.Y - 2;
    R.Assign(PX-SX, PY-SY, PX, PY);
end; {InitBounds}   

but in calling procedure init of trialdialog is after the New ???????
Code: [Select]
  PV:= ValidView(New(PTrialDialog, Init(@DialogData)));
                DeskTop^.Insert(PV);
                TrialDialog:= PTrialDialog(PV);   

with this ( for test only) no crash :
Code: [Select]
    TrialDialog := New (PTrialDialog);
                PV:= ValidView(New(PTrialDialog, Init(@DialogData)));
                DeskTop^.Insert(PV);
                TrialDialog:= PTrialDialog(PV);     
Title: Re: FreePascal text mode dialog designer for Free Vision
Post by: Tomas Hajny on May 12, 2014, 12:40:54 am
BTW, I just came across this ancient thread due to the recent updates - there had been certainly multiple dialog editors available for Turbo Vision. My memory could serve me with at least one additional program - Turbo Vision Resource Workshop by Balazs Scheidler. If the name sounds familiar to you, it indeed should - you can find the name listed on pages "Credits" available from the FPC homepage.

There were multiple such tools available. Quick scan through my archive of downloaded freeware and shareware packages found in addition to those mentioned above also Dialog Designer by L. David Baldwin and TVGen by Bocian Software. Unfortunately, the great repository at garbo.uwasa.fi formerly managed by big (Turbo) Pascal fan Timo Salmi is not available any longer; I'm fairly sure there would be more such tools available there.
Title: Re: FreePascal text mode dialog designer for Free Vision
Post by: marcov on May 12, 2014, 11:30:36 am

with this ( for test only) no crash :
Code: [Select]
    TrialDialog := New (PTrialDialog);
                PV:= ValidView(New(PTrialDialog, Init(@DialogData)));
                DeskTop^.Insert(PV);
                TrialDialog:= PTrialDialog(PV);     

True, but that is wrong. That instantiates two different PTrialDialog's. I guess this is a bug, but the original code doesn't deserve a beauty price.
Title: Re: FreePascal text mode dialog designer for Free Vision
Post by: Jurassic Pork on May 12, 2014, 01:36:01 pm
hello,
may be it is better to do this ?  :
Code: [Select]
      TrialDialog := New(PTrialDialog);
                TrialDialog^.Init(@DialogData);
                PV:= ValidView(PVIEW(TrialDialog));
                DeskTop^.Insert(PV);
                DialSaved:= false;           
Title: Re: FreePascal text mode dialog designer for Free Vision
Post by: marcov on May 12, 2014, 05:08:08 pm
I guess this one is the only one with src?
Title: Re: FreePascal text mode dialog designer for Free Vision
Post by: Jurassic Pork on May 12, 2014, 05:18:50 pm
Sorry, i don't understand  :-[
Quote
the only one with src?

is it for turbo vision dialog editor with source code ?
Title: Re: FreePascal text mode dialog designer for Free Vision
Post by: Paul Breneman on May 12, 2014, 05:33:30 pm
I'm *glad* to discover this thread today.

I think there is a place for nice Free Vision tools for using Free Pascal linux console apps on Android:
http://turbocontrol.com/gnuroot.htm

http://forum.lazarus.freepascal.org/index.php/topic,23927.msg143489.html (http://forum.lazarus.freepascal.org/index.php/topic,23927.msg143489.html)

I have a topic (Free Pascal console programs on Android are easy) under Free Pascal General but I can't figure out how to put a link directly to it.   :(

When I look at this message on another PC that is *not* logged into the forum, the above link doesn't work.  Any suggestions?
Title: Re: FreePascal text mode dialog designer for Free Vision
Post by: marcov on May 12, 2014, 08:43:48 pm
Sorry, i don't understand  :-[
Quote
the only one with src?

is it for turbo vision dialog editor with source code ?

Yes, dialedit, the one from the threadstarter.
Title: Re: FreePascal text mode dialog designer for Free Vision
Post by: Tomas Hajny on May 14, 2014, 09:47:43 am
Regarding sources for other TV dialog designing utilities:

Sources for Dialog Designer 4.6 are available nowadays (see http://pbear.com), but it was apparently written in C++ rather than Pascal.

Sources for TVRW don't seem to be available for direct download, but it should be possible to find current contact information for the the original author Balazs Scheidler (I could find him e.g. on LinkedIn) and I guess that he would be willing to share them nowadays, since the original company under which he was selling the licences doesn't exist any longer apparently and he seems to be still involved in the open source area (although apparently not using Pascal any longer).

Regarding TVGen - well, if you wanted to try contacting the author(s), it might be possible because I found a trace which might help in that, but I wouldn't start with that because it probably wasn't as well established as the others.
Title: Re: FreePascal text mode dialog designer for Free Vision
Post by: Rave on August 11, 2014, 10:24:08 am
Hm.. Don't you think it'd be easier to write new dialog editor from scratch rather than trying to fight bugs in this one? If you'd start it from scratch, you'd know every little bit of code so you could add/remove features easily. Plus code could be written in more readable manner.

My opinion? We need something like Lazarus but for FreeVision.
Title: Re: FreePascal text mode dialog designer for Free Vision
Post by: marcov on August 11, 2014, 10:35:16 am
Hm.. Don't you think it'd be easier to write new dialog editor from scratch rather than trying to fight bugs in this one?

Assuming they are bugs in the dialedit, and not FV.   Worse, that is totally different time magnitude. For me it is as much FV testing as work on dialedit.

Quote
If you'd start it from scratch, you'd know every little bit of code so you could add/remove features easily. Plus code could be written in more readable manner.
 
My opinion? We need something like Lazarus but for FreeVision.

Lazarus' LCL is more designed to make this possible. Keep in mind that FV is only Turbo Pascal level.


Title: Re: FreePascal text mode dialog designer for Free Vision
Post by: Rave on August 11, 2014, 10:52:43 am
I know. I never said Lazarus should be used for it, just that we need some IDE like Lazarus (with events, etc.) that works purely on FreeVision to make FV apps. Something like very first VisualBASIC for DOS (https://www.youtube.com/watch?v=-vDpzoYgNd0).
Title: Re: FreePascal text mode dialog designer for Free Vision
Post by: marcov on August 11, 2014, 11:55:12 am
I mean a designer for FV within current lazarus, yes. Currently FV doesn't work with events, but with overriding, something that can't be done runtime.

Also the streaming is not generalized, there is no RTTI, and the string system has severe (255 char and unicode) limitations.

So I think first you would have to re- setup FV on VCL/LCL principles like RTTI based streaming, a more delegating event model uniform constructors etc.
Title: Re: FreePascal text mode dialog designer for Free Vision
Post by: Rave on August 12, 2014, 07:22:12 pm
I don't think it'd be good on Lazarus to design for FV as FV uses component dimensions in characters, not pixels (for obvious reasons). Also you won't be able to really see how it would ACTUALLY look like until you run this app, unless designer would be a console application, at which point you could make it special "lazarus" (not actual lazarus) for FreeVision or integrate it into fp.

Unfortunately I don't think I have what it takes to do such task like making RTTI for FV, so this is all you can get out of me (I even barely understand FV and when I made console apps I've usually done in pure text (write, writeln and so on)).
Title: Re: FreePascal text mode dialog designer for Free Vision
Post by: RickE on August 13, 2014, 04:54:34 pm
This thread is a great discovery. I have been a fan of Freepascal, and agree the Raspberry Pi is a great platform for textmode. I have some disagreement and some questions with the premise. Some years ago I did a straight use of linux "console codes" with freepascal and posted a link on the old "community" site. I still don't know why, as I assume, you want ncurses as yet another layer when the linux console has perhaps a larger set of console codes than most.

Given the memory and speed constraint of the RPI perhaps other options for a user interface can be considered. I like the XForms library and have done some freepascal work with it, but the reliance on an Xlib timer mechanism is a problem for some embedded use. I am currently trying to do a tcl-console codes interface, but re-inventing the wheel might be unwise. Nice to use framebuffer graphics if possible for accurate timing.

Some predefined freepascal textmode widgets would be nice if the compiled file was small enough. I don't particularly care about design editors, since I never learned how to use them. XForms has one and it does make a nice structure to convert into a pascal record, but making the code readable is a chore.

All in all, yes freepascal, the RPi, textmode, are interesting research.
Title: Re: FreePascal text mode dialog designer for Free Vision
Post by: ArtLogi on January 07, 2016, 03:05:41 pm
I will draw this "ancient" topic back to surface..

Have there been any succesful FPC builds from the DialEdit so far?

Also original download link is a dead end now.. So does anyone have working link to mirror.
Title: Re: FreePascal text mode dialog designer for Free Vision
Post by: jc99 on March 27, 2016, 12:35:34 pm
I will draw this "ancient" topic back to surface..

Have there been any succesful FPC builds from the DialEdit so far?

Also original download link is a dead end now.. So does anyone have working link to mirror.
BTW: The original Website does not work anymore, could someone rerelease the code/archive please.
PS: Fv didn't compile on my Win64/FPC3.0.0 so I had to make a Patch to
outline.pas (Line 193ff)
 
Code: Pascal  [Select]
  1.    else
  2.       Graph[J] := Chars[Retracted+1];
  3.   end;
  4.   {$IF FPC_VERSION >= 3} //JC <-------
  5.   setlength(Graph,  J);
  6.   {$ELSE}
  7.   Graph[0] := Char(J);  // original
  8.   {$ENDIF}   //JC ---------->
  9.  
and to
app.pas (Line 806ff)
 
Code: Pascal  [Select]
  1.  { the orginal code can't be used here because of the limited
  2.     video unit capabilities, the mono modus can't be handled
  3.   }
  4.   video.InitVideo; // JC <---Quick Fix--->
  5.   Drivers.DetectVideo;
  6.   if (ScreenMode.Col div ScreenMode.Row<2) then
  7.  

Maybe someone knows a better solution
In the patch is also a Lazarus-Package
Title: Re: FreePascal text mode dialog designer for Free Vision
Post by: RolandC on March 27, 2016, 02:33:05 pm
Hello! Here is the file:

www.eschecs.fr/fichiers/DIALEDIT3b.zip

Happy Easter!
Title: Re: FreePascal text mode dialog designer for Free Vision
Post by: jc99 on March 27, 2016, 03:10:22 pm
Hello! Here is the file:

www.eschecs.fr/fichiers/DIALEDIT3b.zip (http://www.eschecs.fr/fichiers/DIALEDIT3b.zip)

Happy Easter!
Thanks, Happy (and peaceful) Easter to you and everyone.
Title: Re: FreePascal text mode dialog designer for Free Vision
Post by: Bocian on March 08, 2017, 12:36:57 pm
Well, I happen to be an author of TVGen mentioned in one of the posts of this thread...  so I might be of help, maybe ☺
Title: Re: FreePascal text mode dialog designer for Free Vision
Post by: avra on March 08, 2017, 07:30:41 pm
Well, I happen to be an author of TVGen mentioned in one of the posts of this thread...  so I might be of help, maybe ☺
FreePascal is missing a text mode dialog designer for quite a lot of time. As you can see from previous posts, our attempts to resurrect one have failed. If you can take a look into that and help, or convert your own dialog designer to FreePascal that would be really, really great. Thank you very much for any effort you can put into this. Right now we have nothing, so even if you can't convert it to FreePascal it would be very useful even if it remains a dos application adapted just to design dialogs for use in FreePascal. The world of nice looking linux terminal TUI applications is waiting for us, but we are stuck at this first big step.

Btw. I can't find much more about your TVGen on the net but this http://m.zkratky.cz/TVGen/6986. Do you have any screenshot or URL download location to take a look at it?
Title: Re: FreePascal text mode dialog designer for Free Vision
Post by: jc99 on April 23, 2017, 01:22:57 am
I played a little with the Source of Dialedit
it's still a work in progress
so here the source ...
Title: Re: FreePascal text mode dialog designer for Free Vision
Post by: avra on April 24, 2017, 01:33:56 pm
I played a little with the Source of Dialedit
it's still a work in progress
so here the source ...
This is awesome  8) ::) 8)

I could not compile until line 1724 in obj_dialeditapp.pas was commented out like this:
Code: Pascal  [Select]
  1.    //DoScreenShot(screen);

Basic functionality mostly works well, with SIGSEGV if radio boxes, check boxes and lists are used. So far code gen outputs only to screen but according to what I see it looks promissing.

It's very, very, very nice work and much appreciated! Thanks a lot!!!  :D
Title: Re: FreePascal text mode dialog designer for Free Vision
Post by: avra on April 24, 2017, 03:23:32 pm
I have managed to get file output after setting output file name in File/SelectFile and after playing with File/OutputOptions. This is a file output of a simple dialog with just Ok and Cancel buttons:

Code: Pascal  [Select]
  1. unit MyOutput;
  2.  
  3. interface
  4.  
  5. uses Objects, Views, Dialogs;
  6.  
  7. (*
  8.   ascii picture is skipped here since it shows a lot of null characters
  9.   probably because of commented line DoScreenShot(screen)
  10. *)
  11. { TestDialog }
  12.  
  13. type
  14.   PTestDialog = ^TTestDialog;
  15.   TTestDialog = object(TDialog)
  16.     constructor Init;
  17.   end;
  18.  
  19.   PTestData = ^TTestData;
  20.   TTestData = record
  21.   end;
  22.  
  23. const
  24.   TestDefaults: TTestData = (
  25.  
  26.   );
  27.  
  28. implementation
  29.  
  30. uses Menus;
  31.  
  32. { TestDialog }
  33.  
  34. constructor TTestDialog.Init;
  35. var
  36.   R: TRect;
  37. begin
  38.   R.Assign(4, 4, 40, 19);
  39.   inherited Init(R, 'Test Dialog');
  40.   Options:= Options or ofCentered;
  41.  
  42.   R.Assign(19, 11, 29, 13);
  43.   Insert(New(PButton, Init(R, '~O~k', cmOK, bfDefault)));
  44.  
  45.   R.Assign(7, 11, 17, 13);
  46.   Insert(New(PButton, Init(R, 'C~a~ncel', cmCancel, bfNormal)));
  47. end; {TTestDialog.Init}
  48.  
  49. begin end.
Title: Re: FreePascal text mode dialog designer for Free Vision
Post by: Paul Breneman on April 24, 2017, 04:04:47 pm
I'd really like to use Free Vision in Android but something broke in the past three years.

Can someone please help me? http://forum.lazarus.freepascal.org/index.php/topic,23927.msg244283/topicseen.html#new (http://forum.lazarus.freepascal.org/index.php/topic,23927.msg244283/topicseen.html#new)
Title: Re: FreePascal text mode dialog designer for Free Vision
Post by: Graeme on April 24, 2017, 05:34:55 pm
I haven't tried the Dialedit code, but thought I would mentioned a possible alternative... fpGUI's standalone UIDesigner application is designed in such a way that it can easily be extended. I've even used the core concept of UIDesigner to implement a data mapping tool to populate PDF designed Forms (where data fields should appear on a page). A fork of UIDesigner could easily be modified to generate Free Vision dialogs and code.
Title: Re: FreePascal text mode dialog designer for Free Vision
Post by: jc99 on April 24, 2017, 09:42:58 pm
@Graeme: You are aware that we're talking about Text-Mode, AFAIK UIDesigner is for GUI (Graphic User Interface) can UIDesigner do FV ?
Title: Re: FreePascal text mode dialog designer for Free Vision
Post by: jc99 on April 24, 2017, 09:50:50 pm
BTW: I also work on something like FV2
- using classes not objects,
- using Enumerators instead of Callbacks.
- objpas support
... if someone like

Some Errors in DialEdit are due to the fact that i upgraded my fv to be objpas compatible
e.G: string_var[0] -> length(string_var)
Title: Re: FreePascal text mode dialog designer for Free Vision
Post by: Graeme on April 24, 2017, 11:18:21 pm
@Graeme: You are aware that we're talking about Text-Mode, AFAIK UIDesigner is for GUI (Graphic User Interface) can UIDesigner do FV ?
Yes, that's exactly what I'm saying. The dialog designer will be a GUI application, but the code in generates will be Free Vision style dialogs.

eg: In a fork of UIDesigner you can register a "Button" control. In the UIDesigner that button will look like fpGUI's Button - but that's just looks, nothing else. The Object Inspector will display the properties you registered for a button (fpGUI's UIDesigner doesn't simply use RTTI to extract property information like Lazarus or Delphi does). When you save the form design to a file, it can generate Free Vision dialog code. fpGUI's UIDesigner again doesn't use TComponent streaming for form designs - it has its own code parser and generator that doesn't use RTTI.

There is no reason why a Free Vision form designer must be a console application. Just like you don't need to use Free Pascal's Text IDE to write Console applications - you can use Lazarus IDE. A button is a button, a listbox is a listbox etc. It's what code gets generated that matters.
Title: Re: FreePascal text mode dialog designer for Free Vision
Post by: Graeme on April 24, 2017, 11:19:36 pm
BTW: I also work on something like FV2
- using classes not objects,
- using Enumerators instead of Callbacks.
- objpas support
... if someone like

Now that is awesome news!!! I believe that was on many peoples wish lists - mine included
Title: Re: FreePascal text mode dialog designer for Free Vision
Post by: avra on April 25, 2017, 12:48:35 pm
Some Errors in DialEdit are due to the fact...
Could you please attach code for DoScreenShot procedure?

It is not in downloaded sources, and without it we can not have a picture of the dialog to attach to generated code.
Title: Re: FreePascal text mode dialog designer for Free Vision
Post by: x2nie on April 25, 2017, 01:21:54 pm
...we're talking about Text-Mode, AFAIK UIDesigner is for GUI (Graphic User Interface) can UIDesigner do FV ?


I proof that TextMode is not problem for Lazarus (see picture below)
Title: Re: FreePascal text mode dialog designer for Free Vision
Post by: x2nie on April 25, 2017, 01:24:19 pm
and here is what if it run (in windows):

(actually it is debugging inside Lazarus, just like another normal CONSOLE applications)
Title: Re: FreePascal text mode dialog designer for Free Vision
Post by: x2nie on April 25, 2017, 01:33:32 pm
BTW: I also work on something like FV2
- using classes not objects,
- using Enumerators instead of Callbacks.
- objpas support
... if someone like
very interesting !!
If you put the source code somewhere (sourceforge or github), I may quickly adapt my `TUI` widgets to yours.
Currently I am stuck with TUI, since it just experimental approach, not yet completed.
For example, TUI didnt support mouse, even it is able to.




Now that is awesome news!!! I believe that was on many peoples wish lists - mine included
agree. me too.
Title: Re: FreePascal text mode dialog designer for Free Vision
Post by: avra on April 25, 2017, 02:00:16 pm
Ok, after getting used to it all components work except ListBox. Here is generated code for a dialog with Buttons, StaticText, ParamText, InputLine, RadioButtons, CheckBoxes and MultiCheckBoxes:

Code: Pascal  [Select]
  1. unit ComplexDialog;
  2.  
  3. interface
  4.  
  5. uses Objects, Views, Dialogs;
  6.  
  7. { TestDialog }
  8.  
  9. type
  10.         PTestDialog = ^TTestDialog;
  11.         TTestDialog = object(TDialog)
  12.                 constructor Init;
  13.         end;
  14.  
  15.         PTestData = ^TTestData;
  16.         TTestData = record
  17.                 ParName1: ;
  18.                 LabelDataName: string[80];
  19.                 Mode: word;
  20.                 Options: word;
  21.                 Choices: longint;
  22.         end;
  23.  
  24. implementation
  25.  
  26. uses Menus;
  27.  
  28. { TestDialog }
  29.  
  30. constructor TTestDialog.Init;
  31. var
  32.         R: TRect;
  33.         RB: PRadioButtons;
  34.         CB: PCheckBoxes;
  35.         MB: PMultiCheckBoxes;
  36. begin
  37.         R.Assign(4, 4, 65, 47);
  38.         inherited Init(R, 'Test Dialog');
  39.         Options:= Options or ofCentered;
  40.  
  41.         R.Assign(48, 39, 58, 41);
  42.         Insert(New(PButton, Init(R, '~O~k', cmOK, bfDefault)));
  43.  
  44.         R.Assign(36, 39, 46, 41);
  45.         Insert(New(PButton, Init(R, 'C~a~ncel', cmCancel, bfNormal)));
  46.  
  47.         R.Assign(2, 2, 15, 3);
  48.         Insert(New(PStaticText, Init(R, 'MyStaticText1')));
  49.  
  50.         R.Assign(18, 2, 30, 3);
  51.         Insert(New(PParamText, Init(R, 'MyParamText1', 0)));
  52.  
  53.         R.Assign(3, 39, 26, 41);
  54.         Insert(New(PButton, Init(R, '~M~yButton', cmMyButton, bfBroadcast)));
  55.  
  56.         R.Assign(2, 5, 57, 6);
  57.         IL:= New(PInputLine, Init(R, 80));  Insert(IL);
  58.         R.Assign(2, 4, 14, 5);
  59.         Insert(New(PLabel, Init(R, '~L~abel name', IL)));
  60.  
  61.         R.Assign(2, 8, 17, 10);
  62.         RB:= New(PRadioButtons, Init(R,
  63.                 NewSItem('Radio1',
  64.                 NewSItem('Radio2',
  65.                 nil))
  66.         ));  Insert(RB);
  67.         R.Assign(2, 7, 8, 8);
  68.         Insert(New(PLabel, Init(R, '~M~ode', RB)));
  69.  
  70.         R.Assign(2, 12, 22, 15);
  71.         CB:= New(PCheckBoxes, Init(R,
  72.                 NewSItem('Checkbox1',
  73.                 NewSItem('Checkbox2',
  74.                 NewSItem('Checkbox3',
  75.                 nil)))
  76.         ));  Insert(CB);
  77.         R.Assign(2, 11, 11, 12);
  78.         Insert(New(PLabel, Init(R, '~O~ptions', CB)));
  79.  
  80.         R.Assign(2, 18, 25, 22);
  81.         MB:= New(PMultiCheckBoxes, Init(R,
  82.                 NewSItem('MultiCharacter1',
  83.                 NewSItem('MultiCharacter2',
  84.                 NewSItem('MultiCharacter3',
  85.                 NewSItem('MultiCharacter4',
  86.                 nil)))), 5, cfFourBits, '@#$%&'));
  87.         Insert(MB);
  88.         R.Assign(2, 17, 11, 18);
  89.         Insert(New(PLabel, Init(R, '~C~hoices', MB)));
  90. end; {TTestDialog.Init}
  91.  
  92. begin end.
  93.  
Title: Re: FreePascal text mode dialog designer for Free Vision
Post by: Graeme on April 26, 2017, 10:28:23 am
I proof that TextMode is not problem for Lazarus (see picture below)
Pretty much what I was trying to explain is possible with fpGUI's UIDesigner. :)

There are some finer details to work out, but nothing to serious. eg: I would also add that you can't do component positioning in pixels, so I would use fpGUI's UIDesigners "snap to grid" setting (eg: where it snaps components to an invisible grid every 4 or 8 etc pixels - user defined) and use that to convert pixels dimensions and positioning information into text dimensions and positioning.
Title: Re: FreePascal text mode dialog designer for Free Vision
Post by: jc99 on April 27, 2017, 04:30:26 pm
So first here is my patched FV version ...
Title: Re: FreePascal text mode dialog designer for Free Vision
Post by: jc99 on April 27, 2017, 04:58:11 pm
I also got the IDE running with objfpc-mode
with this patch
Title: Re: FreePascal text mode dialog designer for Free Vision
Post by: jc99 on April 27, 2017, 06:04:27 pm
@Graeme: (http://forum.lazarus.freepascal.org/index.php?action=profile;u=40195)
You have a nice piece of work with you fpGUI and the UIDesigner.
My goal here with DialEdit is that it can be integrated in the IDE.
Title: Re: FreePascal text mode dialog designer for Free Vision
Post by: avra on April 29, 2017, 12:52:30 am
Maybe someone following this topic will find this TUI framework useful:
http://forum.lazarus.freepascal.org/index.php/topic,22894.msg135893.html
Title: Re: FreePascal text mode dialog designer for Free Vision
Post by: x2nie on April 29, 2017, 10:33:09 am
Maybe someone following this topic will find this TUI framework useful:
http://forum.lazarus.freepascal.org/index.php/topic,22894.msg135893.html (http://forum.lazarus.freepascal.org/index.php/topic,22894.msg135893.html)


Yes, very useful to know JATUIF (the link), even it was confused me in first time, because he (re)introduced a vital class: TComponent in unit JATUIF_Component.pas
Bytheway, it is the first working console app I knew, that uses "visual" component that didn't use FreepascalVision (view.pas) completely,
meaning that we can learn how if "FV" built in another implementation.


@avra, thanks for that nice info 8-)
Title: Re: FreePascal text mode dialog designer for Free Vision
Post by: korba812 on April 29, 2017, 03:33:43 pm
I would start with redesigning backend. Currently, FV supports only single-byte character set. I think support for multibyte character set (utf8, utf16) should be added. And (if I remember correctly) FV has a strictly limited maximum buffer size (160x160 or something like that). In addition, I proposes to get rid of "ifdef mess" and design drivers in object-oriented way.

I currently manage the code written in old Clipper / Harbor. There is a GT system (Graphics Terminal) where you can select a terminal driver. For example, the same program can be run in the console or run in graphical mode (eg. A standard window that emulates text mode). It would be nice to have something like this in pascal tui.
Title: Re: FreePascal text mode dialog designer for Free Vision
Post by: jc99 on April 29, 2017, 04:00:09 pm
@korba812
That's what I try to do with FV2.

@x2nie
If it's only about a working console app with visual design elements & mouse support, then look at my K_Vision System...
 
Title: Re: FreePascal text mode dialog designer for Free Vision
Post by: marcov on April 29, 2017, 04:17:01 pm
BTW: I also work on something like FV2
- using classes not objects,
- using Enumerators instead of Callbacks.
- objpas support
... if someone like

Some Errors in DialEdit are due to the fact that i upgraded my fv to be objpas compatible
e.G: string_var[0] -> length(string_var)

And automated rather than manual streaming?  I pretty much reached the same conclusion about 10 years ago, except for the enumerators bit(which I assume is an attempt at multicast events?), but both Florian and I considered it too hard to rewrite the current codebase with so much changes, and starting over would be better.

... which I put off till retirement :-)
Title: Re: FreePascal text mode dialog designer for Free Vision
Post by: avra on April 29, 2017, 09:35:20 pm
If it's only about a working console app with visual design elements & mouse support, then look at my K_Vision System...
I looked at your github projects but couldn't find it. Am I missing something obvious?
Title: Re: FreePascal text mode dialog designer for Free Vision
Post by: x2nie on April 30, 2017, 08:20:21 am
@x2nie
If it's only about a working console app with visual design elements & mouse support, then look at my K_Vision System...
Ooops, I was very bad with that my very limited english words.
Perhaps I must said: "Wow, JATUIF run out of the box, his `TComponent` is not the common known `TComponent`, and he reinvent the wheel by reintroducing the new way of how trigger events and how to use the properties. No offense, but it just run well out of the box."


@jc99, yeah. your K_Vision System look as good ! 8)


...
I currently manage the code written in old Clipper / Harbor. There is a GT system (Graphics Terminal) where you can select a terminal driver. For example, the same program can be run in the console or run in graphical mode (eg. A standard window that emulates text mode). It would be nice to have something like this in pascal tui.
@korba812, any screenshot we can see?
Title: Re: FreePascal text mode dialog designer for Free Vision (off topic: K_Vision)
Post by: jc99 on April 30, 2017, 08:26:34 am
off topic !
@avra
You are right, the K_Vision system is not public it's closed source because it has copyrighted material in it.
However i have the source, the Original was from 1996, but I managed to get it working on modern compilers. ( fpc/lazarus & various delphi versions)
at the moment the delphi version is stuck the keyboard-events are not fired anymore, but the lazarus version is fine.
both versions compile 32/64-bit.
on topic !
but there is no designer with it...
Title: Re: FreePascal text mode dialog designer for Free Vision
Post by: Graeme on April 30, 2017, 12:53:40 pm
@Graeme: (http://forum.lazarus.freepascal.org/index.php?action=profile;u=40195)
You have a nice piece of work with you fpGUI and the UIDesigner.
Thanks.

Quote
My goal here with DialEdit is that it can be integrated in the IDE.
A valid point. I can't remember, does the Text IDE support "external tools", if so, you can still call the fpGUI UIDesigner from the Text IDE - just like we currently do with Lazarus IDE. But that obviously means you will have to be running the Text IDE via a console window under X11 - and not directly from a console login. But I get your point and goal.
Title: Re: FreePascal text mode dialog designer for Free Vision
Post by: korba812 on May 01, 2017, 11:18:40 am
@korba812, any screenshot we can see?
It is difficult to show on screenshot because they look similar. I am sending compiled example from Harbor compiler (32bit win):
https://gmsystems.pl/pliki/inne/achoice.zip
If you run without parameters it will run in the console. If you specify the parameter "//GTWVT" (with two slashes) will run in standard graphical window.

Another interesting thing is the built-in debugger. Press Alt-D to launch it. But it's a topic for another discussion.
Title: Re: FreePascal text mode dialog designer for Free Vision
Post by: x2nie on May 01, 2017, 02:18:51 pm
@korba812, any screenshot we can see?
It is difficult to show on screenshot because they look similar. I am sending compiled example from Harbor compiler (32bit win):
......
Wow, :o that is cool for my eyes. amazing to know that a console app is also a gui app, both in a single exe.


You have confirmed that my imagination was wrong, :P  due I think another appearance of non-console-app appearance (see last pic below)

Title: Re: FreePascal text mode dialog designer for Free Vision
Post by: marcov on May 01, 2017, 03:50:49 pm

A valid point. I can't remember, does the Text IDE support "external tools", if so, you can still call the fpGUI UIDesigner from the Text IDE - just like we currently do with Lazarus IDE. But that obviously means you will have to be running the Text IDE via a console window under X11 - and not directly from a console login. But I get your point and goal.

Yes it supports external tools, but only in a blocking way, iow the IDE only resumes if the tool has finished afaik.
Title: Re: FreePascal text mode dialog designer for Free Vision
Post by: Thaddy on May 01, 2017, 05:12:14 pm
Wow, :o that is cool for my eyes. amazing to know that a console app is also a gui app, both in a single exe.
You have confirmed that my imagination was wrong, :P  due I think another appearance of non-console-app appearance (see last pic below)
[/quote]

That screenshot is just to hide the teletubbies...?
Title: Re: FreePascal text mode dialog designer for Free Vision
Post by: korba812 on May 01, 2017, 05:42:28 pm
You have confirmed that my imagination was wrong, :P  due I think another appearance of non-console-app appearance (see last pic below)
In graphical mode it is possible to add graphical elements. So if you have old Clipper code that works in text mode, by adding a few lines of code you can update the application to look like a GUI application.
Title: Re: FreePascal text mode dialog designer for Free Vision
Post by: x2nie on May 02, 2017, 03:16:04 am
Wow, :o that is cool for my eyes. amazing to know that a console app is also a gui app, both in a single exe.
You have confirmed that my imagination was wrong, :P  due I think another appearance of non-console-app appearance (see last pic below)

That screenshot is just to hide the teletubbies...?
Yes, but the "teletubbies" is windows form, not the console one.! 8-)


Actually, my screenshot is taken from here: https://jonlennartaasenden.wordpress.com/2014/10/19/build-your-own-delphi-based-operative-system/
Which there, the main topic is about running delphi application in DOS, so there are tools to emulate windows environment in DOS
Title: Re: FreePascal text mode dialog designer for Free Vision
Post by: marcov on May 02, 2017, 09:54:23 am
Actually, my screenshot is taken from here: https://jonlennartaasenden.wordpress.com/2014/10/19/build-your-own-delphi-based-operative-system/
Which there, the main topic is about running delphi application in DOS, so there are tools to emulate windows environment in DOS

Just read through the comments on that site. Only the non visual part seemed to be working.
Title: Re: FreePascal text mode dialog designer for Free Vision
Post by: jc99 on May 02, 2017, 11:06:26 am
... and on top of that, it's based on DWPL, and for DWPL you need the original borland-sources, they are copied into the directory and the patched (with a binary patching tool).
... so you have to do that, then compare the patched sources and the find a solution without copyrighted units in fpc ... sounds like fun ... ;)
Title: Re: FreePascal text mode dialog designer for Free Vision
Post by: Graeme on May 02, 2017, 12:07:07 pm
Yes it supports external tools,
Excellent, thanks for confirming that.

Quote
...but only in a blocking way, iow the IDE only resumes if the tool has finished afaik
That is actually the desired behaviour - for me at least, when using the fpGUI UIDesigner.
Title: Re: FreePascal text mode dialog designer for Free Vision
Post by: jc99 on May 09, 2017, 06:42:08 pm
since I mentioned my FV2 project here.
did someone had a look ?
It starts to make progress:
https://github.com/joecare99/Public/tree/master/Projects/FV2
unit-test:
https://github.com/joecare99/Public/blob/master/Projects/bin/x86_64-win64/fpc_TestFV2units.exe
Title: Re: FreePascal text mode dialog designer for Free Vision
Post by: avra on May 10, 2017, 09:48:05 am
did someone had a look ?
Not yet. Could you please provide some basic info about the progress?

https://github.com/joecare99/Public/blob/master/Projects/bin/x86_64-win64/fpc_TestFV2units.exe
Is it for 64-bit? Currently I have only WinXP SP3 available and I get "....exe is not a valid Win32 application".
Title: Re: FreePascal text mode dialog designer for Free Vision
Post by: jc99 on May 10, 2017, 03:09:14 pm
Yes, the exe is for win64 only, but the sources are in the repository, you could compile to any target you like, but i will provide win32 version soon.

About the progess, the converting is mostly done, at the moment i'm at bug-Fixing for the new fearures:
- TextCanvas
- TStrings- Support
Title: Re: FreePascal text mode dialog designer for Free Vision (FV2)
Post by: jc99 on May 11, 2017, 09:24:42 am
@Avra:
Here's the 32bit Version:
https://github.com/joecare99/Public/blob/master/Projects/bin/i386-win32/fpc_TestFV2units.exe
Title: Re: FreePascal text mode dialog designer for Free Vision
Post by: ArtLogi on May 11, 2017, 12:09:10 pm
@Graeme: (http://forum.lazarus.freepascal.org/index.php?action=profile;u=40195)
You have a nice piece of work with you fpGUI and the UIDesigner.
My goal here with DialEdit is that it can be integrated in the IDE.
Superb.  O:-)