An example of a primitive is the Right() primitive. Whenever you press the Right arrow key you cause the Right() primitive to run. This primitive moves the text cursor to the right and if there is no more text to the right then it moves it to the beginning of the next line instead.
Another example of a primitive is the OpenFilePrompt() primitive. Whenever you choose the Open ... menu item from the default menus you are causing the OpenFilePrompt() primitive to run. It displays the File Selector window, allows the user to choose a file, closes the current file and opens the chosen file instead.
The list of all primitives is given at the end of this section.
AddKeyBinding( string Key, string MacroOrPrimitiveExpression )This primitive binds the given key to the given macro or primitive expression. The given key must follow the proper formatting rules.
Example:
AddKeyBinding( "Ctrl+S", "GotoLineN(5)" );
GotoLineN( int LineNumber )This primitive will move the text cursor to the given line if it exists. That line will be made the topmost line on the screen.
Example:
GotoLineN(5);
InsertString( string Text )This primitive inserts the given text as the current cursor position.
Example:
InsertString( "Hello" );
RunProgram( string CommandLine )This primitive runs the given QNX program.
Example:
RunProgram( "pterm" );
ScrollCharLeft() ScrollCharRight() ScrollLineDown() ScrollLineUp() ScrollPageLeft() ScrollPageRight() ScrollToBegOfLine() ScrollToEndOfLine()These primitives are what some of the parts of the scrollbars use to do their scrolling.