class system

superclass(es) object
subclass(es) -
description The system class describes the interface of the system instance. There is always a single instance called 'system'.
remarks It is not possible to create an instance of the system class and it is not necessary because there is always an instance, called 'system', present. This static instance is defined in the module win.txt.
see also scrollBar

tasks

With the system instance it is possible to get information about various system related things like the width and height of icons, cursors, menu checkmarks, scrollBar and the number of processors inside the computer being used. With the method errorBeep/0 an 'error' sound can be generated and there are a number of methods for setting the image and position cursor of the mouse. Playing sounds can be done with the method playSound/3.

International settings that can influence how a date, time or currency value must be displayed can be queried with the system instance.

methods

iconHeight(Output)

func Get the preferred height of an icon.
pre TRUE.
post The height of an icon in pixels was assigned to Output.

iconWidth(Output)

func Get the preferred width of an icon.
pre TRUE.
post The width of an icon in pixels was assigned to Output.

cursorHeight(Output)

func Get the preferred height of a cursor.
pre TRUE.
post The height of a cursor in pixels was assigned to Output.

cursorWidth(Output)

func Get the preferred width of a cursor.
pre TRUE.
post The width of a cursor in pixels was assigned to Output.

widthVerScroll(Output)

func Get the preferred width of a vertical scrollbar.
pre TRUE.
post The width of a vertical scrollbar was assigned to Output.
arrow.gif (1632 bytes) see also: scrollBar

heightHorScroll(Output)

func Get the preferred height of a horizontal scrollbar.
pre TRUE.
post The height of a horizontal scrollbar was assigned to Output.
arrow.gif (1632 bytes) see also: scrollBar

widthThumbHorScroll(Output)

func Get the width of a scrollbar thumb for a horizontal scrollbar.
pre TRUE.
post The width of a scrollbar thumb for a horizontal scrollbar was unified with the parameter Output.
arrow.gif (1632 bytes) see also: scrollBar

heightThumbVerScroll(Output)

func Get the height of a scrollbar thumb for a vertical scrollbar.
pre TRUE.
post The height of a scrollbar thumb for a vertical scrollbar was unified with the parameter Output.
arrow.gif (1632 bytes) see also: scrollBar

captionHeight(Output)

func Get the height of the caption of a normal window.
pre TRUE.
post The height of a window caption was assigned to Output.

smallCaptionHeight(Output)

func Get the height of a small caption of a window. A frame window with the toolFrameStyle has a small caption window.
pre TRUE.
post The height of a small window caption was assigned to Output.

borderWidth(Output)

func Get the width of a window border.
pre TRUE.
post The width of a window border was assigned to Output.

menuCheckmarkHeight(Output)

func Get the preferred height of a checkmark image for a menu item.
pre TRUE.
post The height of a checkmark image of a menu item was assigned to Output.

menuCheckmarkWidth(Output)

func Get the preferred width of a checkmark image for a menu item.
pre TRUE.
post The width of a checkmark image of a menu item was assigned to Output.

menuCheckmarkDimensions(point(X, Y))

func Get the preferred width and height of a checkmark image for a menu item.
pre TRUE.
post The width and height of a checkmark image of a menu item were assigned to the variables X and Y.

numProcessors(Output)

func Get the number of processors that the operating system can use.
pre TRUE.
post The number of processors was assigned to the variable Output.
Arrow.gif (1632 bytes) The number of processors an operating system can use can be different from the number of processors a computer has. Because Windows 95 cannot use more than 1 processor 1 is always assigned to Output if prolog runs on Windows 95, even on a multiprocessor computer.

errorBeep

func Generate a sound associated with an error.
pre TRUE.
post A sound was generated.

putCursor(Cursor)

func Set the cursor of the mouse.
pre The variable Cursor must refer to an instance of the class cursor.
post The cursor was set to the the value of the variable Cursor.

putWaitCursor

func Set the cursor of the mouse to the 'waiting' cursor.
pre TRUE.
post A 'waiting' cursor was displayed.

putDefaultCursor

func Set the cursor of the mouse to the 'default' cursor.
pre TRUE.
post A 'default' cursor was displayed.

putHandCursor

func Set the cursor of the mouse to the 'hand' cursor.
pre TRUE.
post A 'hand' cursor was displayed.

putTextBeamCursor

func Set the cursor of the mouse to the 'text beam' cursor. This is the flashing line that indicates the current position in a text editor.
pre TRUE.
post A 'text beam' cursor was displayed.

putDragDropCursor

func Set the cursor of the mouse to the 'drag-drop' cursor.
pre TRUE.
post A 'drag-drop' cursor was displayed.

changeWaitCursor(Cursor)

func Change the image of the 'waiting' cursor.
pre The variable Cursor must refer to an instance of the class cursor.
post The next time the 'waiting' cursor is displayed the value of the parameter will be used.

changeDefaultCursor(Cursor)

func Change the image of the 'default' cursor.
pre The variable Cursor must refer to an instance of the class cursor.
post The next time the 'default' cursor is displayed the value of the parameter will be used.

changeHandCursor(Cursor)

func Change the image of the 'hand' cursor.
pre The variable Cursor must refer to an instance of the class cursor.
post The next time the 'hand' cursor is displayed the value of the parameter will be used.

changeTextBeamCursor(Cursor)

func Change the image of the 'text beam' cursor.
pre The variable Cursor must refer to an instance of the class cursor.
post The next time the 'text beam' cursor is displayed the value of the parameter will be used.

changeDragDropCursor(Cursor)

func Change the image of the 'drag-drop' cursor.
pre The variable Cursor must refer to an instance of the class cursor.
post The next time the 'drag-drop' cursor is displayed the value of the parameter will be used.

cursor(Output)

func Get the current cursor of the system.
pre TRUE.
post The current cursor was assigned to the variable Output. If no prolog instance was associated with the current cursor then no value was assigned to Output.

currentCursorPos(point(X, Y))

func Get the current position of the cursor. The coordinates returned are relative to the upper-left corner of the screen.
pre TRUE.
post The current position of the cursor was assigned to the variables X and Y.

putCursorPos(point(X, Y))

func Set the current position of the cursor. The coordinates must be relative to the upper-left corner of the screen.
pre X and Y must both be positive integers.
post The current position of the cursor was changed to the values of the parameters.

decimalSymbol(Output)/1

func Get the symbol that is used to separate decimals of a floating point number.
pre TRUE.
post The decimal symbol currently used was assigned to the variable Output.

digitGroupSymbol(Output)

func Get the symbol that is used to separate groups of digits in a floating point number.
pre TRUE.
post The digit grouping symbol currently used was assigned to the variable Output.

negativeSignSymbol(Output)

func Get the symbol that is used to indicate that a number is negative.
pre TRUE.
post The negative sign symbol currently used was assigned to the variable Output.

numDigitsAfterDecimal(Output)

func Get the number of digits that may appear after the decimal symbol.
pre TRUE.
post The number of digits that may appear after the decimal symbol used was assigned to the variable Output.

numDigitsInGroup(Output)

func Get the number of digits that may appear in a single group.
pre TRUE.
post The number of digits of a group was assigned to the variable Output.

dateSymbol(Output)

func Get the symbol that is used to separate parts of a date.
pre TRUE.
post The symbol used to separate parts of a date was assigned to the variable Output.

dateFormat(Output)

func Get the format to display a date.
pre TRUE.
post The date format was assigned to the variable Output. This could be one of the following three values: mdy, dmy or ymd.
Arrow.gif (1632 bytes) mdy = Month-Day-Year
dmy = Day-Month-Year
ymd = Year-Month-Day

timeSymbol(Output)

func Get the symbol that is used to separate parts of a time.
pre TRUE.
post The symbol used to separate parts of a time was assigned to the variable Output.

timeFormat(Output)

func Get the format to display a time.
pre TRUE.
post The time format was assigned to the variable Output. This could be one of the following two values: twelveHours or twentyFourHours.
Arrow.gif (1632 bytes) If the time format is twelveHours then 'AM' and 'PM' strings must also be displayed.

currencySymbol(Output)

func Get the symbol that is used to separate parts of a currency value.
pre TRUE.
post The symbol used to separate parts of a currency value was assigned to the variable Output.

currencyFormat(Output)

func Get the format to display a currency value.
pre TRUE.
post The currency format was assigned to the variable Output. This could be one of the following four values: prefixNoSep, suffixNoSep, prefixSep or suffixSep.
Arrow.gif (1632 bytes) prefixNoSep = prefix a currency symbol and no separators
suffixNoSep = suffix a currency symbol and no separators
prefixSep = prefix a currency symbol and use separators
suffixSep = suffix a currency symbol and use separators

currencyNumDigitsAfterDecimal(Output)

func Get the number of digits that may appear after a decimal symbol of the currency value.
pre TRUE.
post The number of digits after the decimal symbol of a currency value was assigned to the variable Output.

playSound(Name, OptionsList, Result)

func Play the sound specified by the value of the parameter Name. How name is interpreted is defined by the contents of the OptionsList. The OptionsList may contain the following atomic values:
  • file: the Name parameter specifies a file.
  • alias: the Alias parameter specifies an alias for a name that is in the file win.ini.
  • async: the function does not wait for the end of a sound.
  • sync: the function returns after a sound has been played.
  • loop: keep repeating the sound, this flag must be used with the 'async' option.
  • nostop: if a sound is already being played then with this option that current sound is not stopped.
  • nowait: if the system is busy with playing sounds then the method immediately returns.
  • nodefault: if the specified sound is not found then the default sound is not played.
pre The Name parameter must contain a text and the OptionsList must be a valid list with options.
post The value true was unified with the parameter Result if the sound was successfully played, else was false unified with Result.

stopPlaySound( Result)

func Stop playing a sound.
pre TRUE.
post The value true was unified with the parameter Result if playing a sound was successfully stopped, else was false unified with Result.