Sand Box

From Lazarus wiki
Jump to navigationJump to search

Deutsch (de) English (en) español (es) Bahasa Indonesia (id) italiano (it) 日本語 (ja) polski (pl) русский (ru) slovenčina (sk) 中文(中国大陆)‎ (zh_CN)

Free-Vision

Einführung

Einleitung

Free Vision ist die freie Variante von Turbo-Vision, welche bei Turbo-Pascal dabei war. Viele denken, das FV etwas veraltetes aus dem DOS-Zeitalter sei. Für normale Desktop-Anwendungen stimmt dies zu. Aber es gibt Anwendungen, wo dies heutzutage noch sehr praktisch ist. Sehr gutes Beispiel ist bei einem Telnet-Zugriff. Oder bei einem Server, der keine grafische Oberfläche hat.

Welcher Linux-Freak hat sich nicht schon mit vi oder nemo rumärgern müssen. Hätte Linux ein FV-Editor an Board, währe das Leben viel leichter. ;-)

Aus diesem Grund beschäftige ich mich mit momentan mit Free Vision. Vieles dafür habe ich in den Quellen von FV abgeguckt, auch habe ich noch etwas auf einer alten Diskette von einem Tubo-Pascal Buch gefunden. Auch im Internet findet man noch das eine und andere. Da ich meine Erfahrung teilen will, erstelle ich dieses Tutorial.

Ich hoffe das Ganze ist verständlich, obwohl es sicher viele Rechtschreibe-Fehler hat. :-D

Wen jemand noch Anregungen und Fehler sieht, kann er seine Kritik im deutschen Lazarus-Forum miteilen. ;-)
http://www.lazarusforum.de/viewtopic.php?f=22&t=11063&p=98205&hilit=freevision#p98205

Die Sourcen zum Tutorial, kann man alle auf der Hauptseite herunterladen. Es ist eine Zip.

Hinweise zu den Coden:

Free Vision verwendet Codepage 437. Aus diese Grund sollte man für eine fehlerfreie Darstellung der Umaute, diese als Char-Konstante verwenden.

ä = #132  Ä = #142
ö = #148  Ö = #153
ü = #129  Ü = #154

Genereller Hinweis: Wen man zur Laufzeit Texte ändern will, zB. Label, StaticText, ist Vorsicht geboten. Da die Texte PString gespeichert sind, ist darauf zu achten, das man im Konstruktor (Init) schon genügend Specher für die Texte reserviert. Am einfachsten geht dies so, somit hat es dann genügend Platz noch für world.

  StaticText := new(PStaticText, Init(Rect, 'Hallo           '));
  StaticText^.Text^ := 'Hello world';

Genereller Hinweis 64Bit: Bei 64Bit Coden, kann es Fehler geben, das betrifft vor allem Funktionen, welche FormatStr verwenden. Das sieht man leider gut mit der Zeilen und Spalten-Anzeige der Fenster.

Erster Desktop

lazarus-avr.png
Minimalste Free-Vision Anwendung Programm-Name, wie es bei Pascal üblich ist.

program Project1;

Das überhaupt Free-Vision möglich ist, muss die Unit App eingebunden werden.

uses
  App;   // TApplication

Deklaration für die Free-Vision Anwendung.

var
  MyApp: TApplication;

Für die Abarbeitung sind immer die drei Schritte notwendig.

begin
  MyApp.Init;   // Inizialisieren
  MyApp.Run;    // Abarbeiten
  MyApp.Done;   // Freigeben
end.

Append

 Program Test;
 Uses Crt;

 Var I : Integer;

 Begin
   For I := 0 to 12 do
     WriteLn('Test ',I:2);
 End.

--Graeme 11:03, 23 March 2012 (UTC) The DELPHI style doesn't seem to be supported, so we have to use the SOURCE tag instead.

Sayonara

Test O

How to use an internal link: indent first line.

Append 2

 // this is the same code as above

 Program Test;
 Uses Crt;

 Var I : Integer;

 Begin
   For I := 0 to 12 do
     WriteLn('Test ',I:2);
 End.

External link

External link: link title
another link: link title


a image

This text should be placed near the picture, does it? zxvzxcv zxvc xcv xzcv zxcv zxvc zxvc zxcv zxcv zxcv zxcv xcv xcv xcv xcv zxcv zxcv zxcv xcv zxcv zxcv aaaaaaaaaaaaa
And this line were is going? and this line?

a text

This is the text

new section test

Table 2

Header 1 Header 2 Header 3 Header 4
Item 1,1 Item 1,2 Item 1,3 Item 1,4
Item 2,1 Item 2,2 Item 2,3 Item 2,4

Bullets

  • One
  • Two
    • Tree

Numbering

  1. First
  2. Second
  3. Third

Nested Numbering

  1. First
    1. first.one
    2. first.two
    3. first.three
  2. Second
    1. second.one
    2. second.two
    3. second.three

Mixed Numbering

  1. First
    • first.one
    • first.two
    • first.three
  2. Second
    • second.one
    • second.two
    • second.three

indenting first line

      Please note that all contributions to Lazarus-ccr are considered to be released under the GNU Free Documentation License (see Lazarus-ccr:Copyrights for details). If you don't want your writing to be edited mercilessly and redistributed at will, then don't submit it here.

You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. DO NOT SUBMIT COPYRIGHTED WORK WITHOUT PERMISSION!

TEST


Another Test: lets go crazy

I want to create a boxed text:

This is in a box, or so I hope.

This is outside the box, no? And this is a reference to my incomplete Structural Analyis book ThisIsMyShura

Weird: this is in the box as well?
  • And a bullet in italics?

non formatted...

Humm

{{#categorytree:Foo}} <categorytree>

Float Like A Butterfly

New section?

Let's see... ok

grusskarte

if Graphviz was installed, this would draw a pretty graph...

<graphviz> digraph G {

 rankdir=LR; node [fontsize = "8" shape = "rectangle"]; 
 "Node 1" -> "Node 2";

} </graphviz>

This is a test to see, if I can edit a page after the Bad-Behavior update. fpcfan 22:43, 7 December 2007 (CET)

Tutorial links

30_Second_Quick_Wiki_Tutorial 30 Second Quick Wiki Tutorial scam link removed

Use this syntax to include a page within another page: {{:LazAutoUpdater}}

Clipboard commands with selections

Clipboard-related commands work with carets, both with selections and without them. Some details about this:

Command Behaviour, when there're no selections Behaviour, when at last one selection present
Copy to clipboard Copies entire lines, containing carets. (Ignores multiple carets on same line.) Copies only selections text. (Ignores carets without selections.)
Paste from clipboard First, selections are cleared (deleted). Then, command pastes text into each caret position. Special case is when clipboard lines count equals to carets count - in this case, first line is inserted at first caret, second line is inserted at 2nd caret, etc.