Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2008-12

Lazarus: graphical interface using code only?

12 messages · 5 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Ryan Mann

Hello. I'm blind and the Lazarus IDE does not work that well with my screen reader. Instead of using the IDE to design graphical interfaces, is it possible to write a graphical interface using Pascal code?
Thanks for any help.
Ryan

Ryan Mann

Break The Matrix
http://www.breakthematrix.com

Reply by email

Michael Fuchs
to Ryan Mann
[..] Instead of using the IDE to design graphical interfaces, is it possible to write a graphical interface using Pascal code?

Of course, you can create all components dynamicly and give them their positions by code. It is like programming with Turbo Vision/Free Vision.

g
Michael

Reply by email

Graeme Geldenhuys
to Ryan Mann: Hello. I'm blind and the Lazarus IDE does not work that well with my screen reader. …
Ryan Mann wrote
Hello. I'm blind and the Lazarus IDE does not work that well with my screen reader. Instead of using the IDE to design graphical interfaces, is it possible to write a graphical interface using Pascal code?

Yes, by all means. fpGUI Toolkit does this. There are no .lfm files, only a single .pas file that represents a Form. All UI code exists in a AfterCreate() method. fpGUI Toolkit does include a Visual Forms Designer, but that designer is simply to speed up the creation of the pascal code - still no .lfm files are used. I'm also working on a layout designer (I'm porting the Java MIG Layout) to Object Pascal and fpGUI. This will make it even easier to create a user interface without visual tools, plus it will be dpi and resolution independent.

Regards,
- Graeme -

_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

Reply by email

Ryan Mann
to Michael Fuchs: Of course, you can create all components dynamicly and give them their positions by code.…

OK thanks, but where can I find information about doing this? The lazarus tutorial on the Wiki talks about using the IDE. Thanks.
Ryan

Michael Fuchs wrote 13 lines
Ryan Mann schrieb: > [..] Instead of using the IDE to design graphical interfaces, > is it possible to write a graphical interface using Pascal code? Of course, you can create all components dynamicly and give them their positions by code. It is like programming with Turbo Vision/ Free Vision. g Michael _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Ryan Mann

Break The Matrix
http://www.breakthematrix.com

Reply by email

Graeme Geldenhuys
to Ryan Mann
Ryan Mann wrote
OK thanks, but where can I find information about doing this? The lazarus tutorial on the Wiki talks about using the IDE.

fpGUI Toolkit has a readme.txt file in the 'src' directory explaining how you can develop applications + fpGUI from the command line, FP text IDE and Lazarus IDE. fpGUI also includes 20+ demos which are kept simple and to the point to make it easier to study.

The 'examples' directory also contains a readme.txt file to explain how to compile them. They all follow the same style as shown below:

The format is as follows:
fpc @extrafpc.cfg <project main unit>

Example:
fpc @extrafpc.cfg docedit.lpr
or
fpc @extrafpc.cfg helloworld.pas

As for using the Lazarus LCL components... You would have to setup FPC to find all the units and include files in the compiler paths etc... In fpGUI I have done that for you with the help of the extrafpc.cfg files.

Regards,
- Graeme -

_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

Reply by email

Ryan Mann

Actually, I tried to compile FPGUI using build.bat on Windows earlier today and I got an error. If you want, I can try it again and get the exact error message. By the way, does FPGUI use Windows API on Windows? If it does that's good because the GUIs it creates are probably accessible to screen readers.
Thanks.
Ryan

Original message:

Show quoted text 19 lines
On Thu, Dec 4, 2008 at 4:48 AM, Ryan Mann wrote: > OK thanks, but where can I find information about doing this? The lazarus > tutorial on the Wiki talks about using the IDE. fpGUI Toolkit has a readme.txt file in the 'src' directory explaining how you can develop applications + fpGUI from the command line, FP text IDE and Lazarus IDE. fpGUI also includes 20+ demos which are kept simple and to the point to make it easier to study. The 'examples' directory also contains a readme.txt file to explain how to compile them. They all follow the same style as shown below: The format is as follows: fpc @extrafpc.cfg <project main unit> Example: fpc @extrafpc.cfg docedit.lpr or fpc @extrafpc.cfg helloworld.pas
As for using the Lazarus LCL components... You would have to setup FPC to find all the units and include files in the compiler paths etc... In fpGUI I have done that for you with the help of the extrafpc.cfg files.
Regards, - Graeme -
Show quoted text 6 lines
_______________________________________________ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/ _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Email services provided by the System Access Mobile Network. Visit www.serotek.com to learn more about accessibility anywhere.

Reply by email

Graeme Geldenhuys
to Ryan Mann
Ryan Mann wrote
Actually, I tried to compile FPGUI using build.bat on Windows earlier today and I got an error.

It should now be fixed in revision 1051. Please get a svn update and try again. The windows build.bat file did not try and create the lib output directory, if it didn't exist. The unix shell script did. The build.batch has one limitation, it always assumes the ..\lib\i386-win32\ output directory, so if you run a 64bit FPC compiler, you will have to manually create the ..\lib\i386-win64\ directory before running the batch file.

Anybody know how I can store the output of a program into a variable in windows batch files? I'm trying to capture the following output like I have done in the unix shell script.
fpctarget=`fpc -iTP`-`fpc -iTO`

By the way, does FPGUI use Windows API on Windows? If it does that's good because the GUIs it creates are probably accessible to screen readers.

If you mean, does it use the Windows common controls, then the answer is No. fpGUI is a custom drawn toolkit. All components are drawn by the toolkit itself. That is how it accomplished a uniform look & feel across platforms. fpGUI's GDI backend does obviously use the Windows API for drawing etc, but doesn't use the common controls.

I'm curious... How do you manage to create a GUI or use a GUI program if you are blind? Sorry, I don't know how screen readers work?

Regards,
- Graeme -

_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

Reply by email

Graeme Geldenhuys
to Graeme Geldenhuys
Graeme Geldenhuys wrote 5 lines
Anybody know how I can store the output of a program into a variable in windows batch files? I'm trying to capture the following output like I have done in the unix shell script. fpctarget=`fpc -iTP`-`fpc -iTO`

A bit of google searching and some experimentation, I managed to solve this problem. fpGUI revision 1052 has the improved build.bat file. :-)

Regards,
- Graeme -

_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

Reply by email

Felipe Monteiro de Carvalho
to Ryan Mann: OK thanks, but where can I find information about doing this? The lazarus tutorial on…
Ryan Mann wrote
OK thanks, but where can I find information about doing this? The lazarus tutorial on the Wiki talks about using the IDE.

Hello, I added a tutorial about this in the wiki:

http://wiki.lazarus.freepascal.org/LCL_Tips#Creating_a_GUI_by_code

I have created a couple of programs with Lazarus in this way and it works perfectly. The main reason I did this was to facilitate using the same code with Lazarus and Delphi.

Felipe Monteiro de Carvalho

Reply by email

Ryan Mann
to Felipe Monteiro de Carvalho

Thanks. I will check this out.
Ryan

Felipe Monteiro de Carvalho wrote 18 lines
On Thu, Dec 4, 2008 at 12:48 AM, Ryan Mann wrote: > OK thanks, but where can I find information about doing this? The > lazarus > tutorial on the Wiki talks about using the IDE. Hello, I added a tutorial about this in the wiki: http://wiki.lazarus.freepascal.org/LCL_Tips#Creating_a_GUI_by_code I have created a couple of programs with Lazarus in this way and it works perfectly. The main reason I did this was to facilitate using the same code with Lazarus and Delphi. -- Felipe Monteiro de Carvalho _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Ryan Mann

Break The Matrix
http://www.breakthematrix.com

Reply by email

Ryan Mann
to Graeme Geldenhuys: It should now be fixed in revision 1051. Please get a svn update and try again. The…

Hello. To answer your question about screen readers, basically, a screen reader reads in synthesized speech what a sighted person would read on their monitor. The way it works is that the program gets information from the operating system about what is on the screen. This means that on Windows, applications that use common Windows controls usually work well with screen readers. If an application doesn't use the common Windows controls, it probably won't work because the screen reader can't get the information that it needs from the operating system. On Mac OS 10, graphical applications need to use the Coco interface in order for Voiceover, Mac OS 10's built-in screen reader to work properly with the application. I hope this is a good explanation.

Graeme Geldenhuys wrote 44 lines
On Thu, Dec 4, 2008 at 8:35 AM, Ryan Mann wrote: > Actually, I tried to compile FPGUI using build.bat on Windows > earlier today > and I got an error. It should now be fixed in revision 1051. Please get a svn update and try again. The windows build.bat file did not try and create the lib output directory, if it didn't exist. The unix shell script did. The build.batch has one limitation, it always assumes the ..\lib\i386-win32\ output directory, so if you run a 64bit FPC compiler, you will have to manually create the ..\lib\i386-win64\ directory before running the batch file. Anybody know how I can store the output of a program into a variable in windows batch files? I'm trying to capture the following output like I have done in the unix shell script. fpctarget=`fpc -iTP`-`fpc -iTO` > By the way, does FPGUI use Windows API on Windows? If it does > that's good because the GUIs it creates are probably accessible to > screen > readers. If you mean, does it use the Windows common controls, then the answer is No. fpGUI is a custom drawn toolkit. All components are drawn by the toolkit itself. That is how it accomplished a uniform look & feel across platforms. fpGUI's GDI backend does obviously use the Windows API for drawing etc, but doesn't use the common controls. I'm curious... How do you manage to create a GUI or use a GUI program if you are blind? Sorry, I don't know how screen readers work? Regards, - Graeme - _______________________________________________ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/ _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Ryan Mann

Break The Matrix
http://www.breakthematrix.com

Reply by email