X11 interface control routines

Open X11 display

                      +----------------------------+
                      | I =  IXOPNDS (LENHST,CHOST) |
                      +----------------------------+
                                  
Action: Open the display. Returns -1 if the opening fails. Parameter Description:
LENHST
Host name length.
CHOST
Host name.

Open an X11 window

             +----------------------------------------------+
             | I =  IXOPNWI (IX,IY,IW,IH,LENTIT,CHTIT,IFLAG) |
             +----------------------------------------------+
                                  
Action: Open a X11 window and returns a window number which can be used with IXSELWI. Returns -1 if the window creation fails. It is possible to open up to 20 different windows. Parameter Description:
IX
Initial window X position in pixels.
IY
Initial window Y position in pixels.
IW
Initial window width in pixels.
IH
Initial window height in pixels.
LENTIT
Window title length.
CHTIT
Window title.
IFLAG
If it is not equal to 1 it allows to open a non Motif window even if ixmotif has been called.
The name of machine on which the program is running is automatically apend to the window title except if the window title begin with "-".

Select the current X11 window

                          +--------------------+
                          |CALL  IXSELWI (IWID) |
                          +--------------------+
                                  
Action: Select the window to which subsequent output will be directed. Parameter Description:
IWID
Window number returned by IXOPNWI.

Close an X11 window

                            +----------------+
                            | CALL  IXCLSWI   |
                            +----------------+
                                  
Action: Close the current window.

Close an X11 session

                            +----------------+
                            | CALL  IXCLSDS   |
                            +----------------+
                                  
Action: Close all opened windows and close the X11 connection.

Set X11 host name

                      +----------------------------+
                      |CALL  IXSETHN (LENHST,CHOST) |
                      +----------------------------+
                                  
Action: Set host name. Parameter Description:
LENHST
Host name length.
CHOST
Host name.

Clear an X11 window

                            +----------------+
                            | CALL  IXCLRWI   |
                            +----------------+

                                  
Action: Clear the current window.

Update an X11 window

                          +--------------------+
                          |CALL  IXUPDWI (MODE) |
                          +--------------------+
                                  
Action: Update the display and raise current window to top of stack. Synchronise client and server once (not permanent). Copy the pixmap on the window if the double buffer is on.
MODE
Control the update mode.
(1) or (11)
The window is raised.
(0) or (10)
The window is not raised.
(0) or (1)
No synchronisation between client and server.
(10) or (11)
Synchronisation between client and server.

Resize an X11 window

                       +--------------------------+
                       |CALL  IXRSCWI (IWID,IW,IH) |
                       +--------------------------+
                                  
Action: Resize (rescale) the X11 window IWID. Parameter Description:
IWID
Window number returned by IXOPNWI.
IW
New width.
IH
New height.

Define the X11 clipping rectangle

                    +--------------------------------+
                    | CALL  IXCLIP (IWID,IX,IY,IW,IH) |
                    +--------------------------------+
                                  
Action: Set clipping region for all windows. Parameter Description:
IWID
Window number returned by IXOPNWI.
IX
X clipping rectangle position.
IY
Y clipping rectangle position.
IW
Clipping rectangle width.
IH
Clipping rectangle height.

Deactivate the X11 clipping rectangle

                          +--------------------+
                          |CALL  IXNOCLI (IWID) |
                          +--------------------+
                                  
Action: Switch off the clipping rectangle.
IWID
Window number returned by IXOPNWI.
                              Example
                                  

      program example
      character*8 machinename
      character*1 wait
*
      machinename='hphigz:0.0'               ! Open display
      if(ixopnds(10,machinename).ne.0)print*, 'Can''t open display'
*
      iwinid=ixopnwi(0,0,200,200,5,'Hello')  !  Open window
*
      call ixselwi(iwinid)                   ! Select window identified by iwinid
*
      call ixbox(10,190,10,190,0)            ! Draw boxes
      call ixbox(20,180,20,180,0)
      call ixbox(30,170,30,170,0)
*
      call ixupdwi(0)                        ! Flush X11 buffer and Wait
      read(*,'(a)') wait
*
      call ixclswi                           ! Close window
      call ixclsds                           ! Close display
*
      end