• Places
    • Home
    • Graphs
    • Prefixes
  • Admin
    • Users
    • Settings
    • Plugins
    • Statistics
  • CPACK
    • Home
    • List packs
    • Submit pack
  • Repository
    • Load local file
    • Load from HTTP
    • Load from library
    • Remove triples
    • Clear repository
  • Query
    • YASGUI SPARQL Editor
    • Simple Form
    • SWISH Prolog shell
  • Help
    • Documentation
    • Tutorial
    • Roadmap
    • HTTP Services
  • Login

4.35 Operating System Interaction
All Application Manual Name SummaryHelp

  • Documentation
    • Reference manual
      • Built-in Predicates
        • Operating System Interaction
          • shell/1
          • shell/2
          • getenv/2
          • setenv/2
          • unsetenv/1
          • setlocale/3
          • Windows-specific Operating System Interaction
          • Apple specific Operating System Interaction
          • Dealing with time and date
          • Controlling the swipl-win.exe console window
            • window_title/2
            • win_window_pos/1
            • win_window_color/2
            • win_has_menu/0
            • win_insert_menu/2
            • win_insert_menu_item/4
    • Packages

4.35.4 Controlling the swipl-win.exe console window

The Windows executable swipl-win.exe console has a number of predicates to control the appearance of the console. Being totally non-portable, we do not advise using it for your own application, but use XPCE or another portable GUI platform instead. We give the predicates for reference here.

window_title(-Old, +New)
Unify Old with the title displayed in the console and change the title to New.bugThis predicate should have been called win_window_title for consistent naming.
win_window_pos(+ListOfOptions)
Interface to the MS-Windows SetWindowPos() function, controlling size, position and stacking order of the window. ListOfOptions is a list that may hold any number of the terms below:
size(W, H)
Change the size of the window. W and H are expressed in character units.
position(X, Y)
Change the top-left corner of the window. The values are expressed in pixel units.
zorder(ZOrder)
Change the location in the window stacking order. Values are bottom, top, topmost and notopmost. Topmost windows are displayed above all other windows.
show(Bool)
If true, show the window, if false hide the window.
activate
If present, activate the window.
win_window_color(+Which, +RGB)
Change the color of the console window. Which is one of foreground, background, selection_foreground or selection_background. RGB is a term rgb(Red,Green,Blue) where the components are values between 0 and 255. The defaults are established using the Windows API GetSysColor().
win_has_menu
True if win_insert_menu/2 and win_insert_menu_item/4 are present.
win_insert_menu(+Label, +Before)
Insert a new entry (pulldown) in the menu. If the menu already contains this entry, nothing is done. The Label is the label and, using the Windows convention, a letter prefixed with & is underlined and defines the associated accelerator key. Before is the label before which this one must be inserted. Using - adds the new entry at the end (right). For example, the call below adds an Application entry just before the Help menu.
win_insert_menu('&Application', '&Help')
win_insert_menu_item(+Pulldown, +Label, +Before, :Goal)
Add an item to the named Pulldown menu. Label and Before are handled as in win_insert_menu/2, but the label - inserts a separator. Goal is called if the user selects the item.

ClioPatria (version V3.1.1-51-ga0b30a5)