| superclass(es) | object |
| subclass(es) | - |
| description | The application class describes the interface of the application instance. There is always a single instance called 'app'. |
| remarks | It is not possible to create an instance of the application class and it is not necessary because there is always an instance, called 'app', present. This static instance is defined in the module win.txt. |
| see also | frame |
| With the application instance is it possible to determine the platform on
which the application is being executed (Windows 3x, Windows 9x or Windows NT). For
example: app<-windows9x(Output). This example also shows the
application instance that must be used. Information about the application like filename, name, helpfile, version message, copyright message, if hint windows may appear, can be set and retrieved with the application instance. The application has a single callback called onCompanyInfo/1, this event is executed when the user requests to see information about the company that created the (prolog) program. It is also possible to retrieve the commandline of the executable file and check for parameters. The current language chosen can be retrieved by the method langId/1. There are also several methods for starting the helpfile of the application, what viewer is opened for the helpfile depends on the extension of the helpfile. For instance, It is possible to use .html files instead of Windows Help files, if a web browser is installed. To have a file opened by the shell of the operating system the method shellOpen/2 can be used, the windows shell starts an application registered with the extension of the file to view the contents of the file. To start an external program there is the method shellOpen/3, this method passes a command with parameters to the windows shell to have it executed. To stop the application there is the method startQuit/0. This method posts a quit message and immediately returns. |
| func | Determine if the application runs on Microsoft Windows 3.x |
| pre | TRUE. |
| post | If the program runs on Windows 3x then Output is assigned true, else it is assigned false. |
| func | Determine if the application runs on Microsoft Windows 95 or 98. |
| pre | TRUE. |
| post | If the program runs on Windows 95 or 98 then Output is assigned true, else it is assigned false. |
| func | Determine if the application runs on Microsoft Windows NT. |
| pre | TRUE. |
| post | If the program runs on Windows NT then Output is assigned true, else it is assigned false. |
| func | Return the complete filename of the program. The filename includes the folder where the executable file is located. |
| pre | TRUE. |
| post | The filename of the executable file was assigned to Output. |
| func | Return the folder of the program. The folder of the executable file is returned. |
| pre | TRUE. |
| post | The folder of the executable file was assigned to Output. |
| func | Return the name of the application, this is not the name of the executable file but the name of the program that is displayed on the screen. |
| pre | TRUE. |
| post | The name of the application was assigned to Output. |
| func | Set the name of the application, this is the name of the program that is displayed on the screen. |
| pre | The variable String must contain a string value. |
| post | The value of String has become the name of the application. |
| func | Return the name of the application helpfile. |
| pre | TRUE. |
| post | The name of the application helpfile was assigned to Output. |
| func | Set the application helpfile. |
| pre | The variable String must contain a string value. |
| post | The filename of the application helpfile was set to the value of String. |
| func | Return the version string of the application. |
| pre | TRUE. |
| post | The version message of the application was assigned to Output. |
| func | Set the version message of the application. |
| pre | The variable String must contain a string value. |
| post | The version message of the application was set to the value of String. |
| func | Return the copyright message of the application. |
| pre | TRUE. |
| post | The copyright message of the application was assigned to Output. |
| func | Set the copyright message of the application. |
| pre | The variable String must contain a string value. |
| post | The copyright message of the application was set to the value of String. |
| func | Return the name of the company that produced the program. |
| pre | TRUE. |
| post | The name of the company was assigned to Output. |
| func | Set the name of the company that produced the program. |
| pre | The variable String must contain a string value. |
| post | The company name was set to the value of String. |
| func | Return the name of the current language chosen. |
| pre | TRUE. |
| post | The name of the current language was returned. This can be one of the following values: unknown, dutch, german, french, spanish, italian, portugese, denish, swedish, norwegian, finish, polish, russian, english or english_american and many more. The module 'win.txt' contains all the language defines. |
| see also: read_string/2. |
| func | Return the number of the current language chosen. |
| pre | TRUE. |
| post | The number of the current language was returned. The module 'win.txt' contains all the language defines. |
| see also: read_string/2. |
| func | Enable or disable the floating hints. The floating hints are the small windows that appear over a control with a help text in them. |
| pre | The variable YesNo must contain true or false. |
| post | If YesNo was true the hints are enabled else they are disabled. |
| func | Check if the hint windows may appear or are disabled. |
| pre | TRUE. |
| post | If the hints are enabled then true was unified with Output, else false. |
| func | Determine if pressing the ENTER key is the same as pressing the TAB key, i.e. move the focus from one control to another control (previous or next) in the taborder. |
| pre | The value of the parameter YesNo must be boolean (true or false). |
| post | If YesNo was true then both the ENTER- and TAB key can be used to go through the taborder of controls on a window, else not. |
| func | Check if pressing the ENTER key is the same as pressing the TAB key, i.e. move the focus from one control to another control (previous or next) in the taborder. |
| pre | TRUE |
| post | If both the ENTER- and TAB key can be used to go through the control taborder then was true unified with the value of the Output, else was false unified with Output. |
| func | Get the commandline string of the application, the commandline string is passed on to the executable file on startup and arguments can be transferred this way. |
| pre | TRUE. |
| post | The commandline string of the executable was assigned to Output. |
stringOnCommandLine(+String, ?Output)
| func | Determine if a certain string was present in the commandline string of the application. |
| pre | The variable String must contain a string value. |
| post | If the value of String is present in the commandline string then true was assigned to Output, else is false assigned to Output. |
stringValueFromCommandLine(+String, ?Output)
| func | Retrieve the value of a parameter from the commandline string. The characters following the value of the variable String, until the first whitespace character, are assigned to Output. |
| pre | The variable String must contain a string value. |
| post | The characters from the commandline string following the value of String were assigned to Output. If the value of String was not found then no value was assigned to Output. |
shellOpen(+Command, +Parameters, ?Output)
| func | Have the command executed by the shell, if the command is a file then the shell launches the application associated with the extension of the file to view the contents of the file. Parameters for the command (for instance: the location of the file to open) can be passed in the Parameters variable |
| pre | The variables Command and Parameters must contain a string values. |
| post | If the file could be opened then was true assigned to Output, else was false assigned. |
| func | Open the helpfile of the application. |
| pre | TRUE. |
| post | The helpfile of the application was opened. |
| func | Open the specified helpfile inside an appropriate viewer. What viewer is used is determined by the extension of the file. For example: if the extension is .hlp the Windows Help Viewer application is used, if the extension is .htm or .html the current web browser is used. |
| pre | The variable FileName must contain a string value, the string value must be an absolute path to a file. |
| post | An attempt was made to open the helpfile. |
| func | Open the specified topic from the application helpfile. In Windows Help files topics are identified by topic numbers, with this method it is possible to jump to a specified help topic. |
| pre | The variable Topic must contain an integer value. |
| post | An attempt was made to open the application helpfile and jump to the topic. |
startHelpTopic(+Topic, +FileName)
| func | Open the specified topic from the helpfile. In Windows Help files topics are identified by topic numbers, with this method it is possible to jump to a specified help topic. |
| pre | The variable Topic must contain an integer value and the variable FileName must contain a string value, the string value must be an absolute path to a file. |
| post | An attempt was made to open the helpfile and jump to the topic. |
| func | Post a quit message to the message loop of the application. This starts the process of exiting the application. |
| pre | TRUE. |
| post | Exiting the application was started. |
| func | This callback event is executed when a modal frame window must appear with information on it about the company that created the program. It can be used for displaying information about the company like name, address, website, etc.. |
| pre | The Sender argument refers to the application instance. |
| post | TRUE. |