[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference bulova::decw_jan-89_to_nov-90

Title:DECWINDOWS 26-JAN-89 to 29-NOV-90
Notice:See 1639.0 for VMS V5.3 kit; 2043.0 for 5.4 IFT kit
Moderator:STAR::VATNE
Created:Mon Oct 30 1989
Last Modified:Mon Dec 31 1990
Last Successful Update:Fri Jun 06 1997
Number of topics:3726
Total number of notes:19516

2449.0. "Questions on SELECTION widget" by FRAFS3::HAGEMANN () Thu Mar 15 1990 05:39

       	
       Hi,

       I've got a difficult thing for me to do and need your
       experts help asap. Because I'm not familiar with the 
       DECwindows programing stuff, but have to answer some
       indepth DECwindows proraming questions I 'ld like to
       beg you for your help.
       In parallel of course I'll try to anser all these
       questions for myself. But because the customer needs to
       have the answers a week ago it makes sence to me to 
       request you as the experts in that way.
       So I thank you for your help in forehand.

       So, now I'ld like to come to the core !

       The customer submited an catalogue of 6 questions to DEC.
       The questions are as follows:

       1.	Are there any known problems with the SELECTION
       		widget?
       2.	If there are no problems with the SELECTION widget
       		why does the program example not invoke the 	
       		NO_MATCH callback routine specified when the
       		MUST_MATCH value in the UIL file is set TRUE
       		and a value which does not match any in the item
       		list is entered and the OK push button is
       		pressed ??

       		I'll append the program example below !

       3.	What files are searched in order to set up the
       		Resource Manager default database, and in what
       		order ??
       4.	How can the default Resource Manger database ID
       		be found ??
       5.	Is there any documentation giving a fuller, more
       		comprehensible description of how the Resource
       		Manager works ? The available documentation
       		(DECwindows Programming Volume 2C) is very
       		unclear on this topic !
       6.	What is the maximum number of points that can be
       		specified in one call to X$DRAW_LINES and other
       		graphics routines ?  In some cases when using
       		this routine a SYSTEM access violation is
       		received if an attempt is made to plot more than 
       		about 3000 points.

       Environment description:

       VMS V5.1-1, DECwindows 1.0
       FORTRAN


       Find below the FORTRAN program example.

       Regards,

       	Pietro

       


      PROGRAM DEC_TEST
C
C
      IMPLICIT NONE
C
C
      INTEGER*4      DEC_TEST_CANCEL
      EXTERNAL       DEC_TEST_CANCEL
      INTEGER*4      DEC_TEST_NO_MATCH
      EXTERNAL       DEC_TEST_NO_MATCH
      INTEGER*4      DEC_TEST_ACTIVATE
      EXTERNAL       DEC_TEST_ACTIVATE
C
C
      INCLUDE '($DSCDEF)'                   ! VMS Data type definitions.
      INCLUDE 'SYS$LIBRARY:DECW$DWTDEF'     ! DECWindows parameters/variables.
      INCLUDE 'SYS$LIBRARY:DECW$XLIBDEF'    ! XLib parameters/veriables.
C
C
C     Declare descriptor for the hierarchy file name.
C
      STRUCTURE    / S_DESC /
C
         INTEGER*2   I2LENG                 ! Length of string( =LEN(string) )
         BYTE        BDTYPE / DSC$K_DTYPE_T /! Variable specifing string type.
         BYTE        BCLASS / DSC$K_CLASS_S /! Variable specifing string class.
         INTEGER*4   I_POIN                 ! Pointer to string( =%LOC(string) )
C
      END STRUCTURE
C
      RECORD       / S_DESC /               ! Record used to pass data to
     +               D_DESC                 ! DWT$OPEN_HIERACHY
C
      RECORD       / DWT$DRMREG_ARG /       ! Record array used to register
     +               D_CLBK( 0:2 )          ! callback and action routines.
C
      INTEGER*4      IDECWS                 ! Return code from DWT routines.
      INTEGER*4      IDUMMY                 ! Dummy variable required by some routines.
      INTEGER*4      I_HIER                 ! Hierachy ID.
      INTEGER*4      I_POIN                 ! Pointer to D_DESC.
      INTEGER*4      I_DUMM                 ! Dummy variable required by some routines.
      INTEGER*4      ISHL_W                 ! Shell widget ID.
      INTEGER*4      ITOP_W                 ! Top widget ID.
C
      INTEGER*2      I2DUMM                 ! Dummy variable required by some routines.
C
C
C*******************************************************************************
C
C
C     Initialise the DRM 
C
      CALL DWT$INITIALIZE_DRM()
C
C
C     Initialise the toolkit.
C
      ISHL_W = XT$INITIALIZE( %DESCR( 'DEC_TEST' ),
     +                        %DESCR( 'DEC_TEST' ),
     +                        ,
     +                        %REF( 0 ),
     +                        %REF( IDUMMY ),
     +                        %REF( IDUMMY ) )
C
C
C     Define the DRM hierarchy (only for 1 file ). First set up required
C     descriptor and pointer to descriptor.
C
      D_DESC.I2LENG = LEN( 'DEC_TEST.UID' )
      D_DESC.I_POIN = %LOC( 'DEC_TEST.UID' )
C
      I_POIN        = %LOC( D_DESC )
C
      IDECWS = DWT$OPEN_HIERARCHY( %REF( 1 ),
     +                             %REF( I_POIN ),
     +                             ,
     +                             %REF( I_HIER ) )
C
      IF( IDECWS .NE. DWT$C_DRM_SUCCESS ) CALL LIB$STOP( %VAL( IDECWS ) )
C
C
C     Register callback routines so that the resource manager can resolve them
C     at widget-creation time.
C
      D_CLBK( 0 ).DWT$A_DRMR_NAME  = %LOC( 'DEC_TEST_CANCEL'//CHAR( 0 ) )
      D_CLBK( 0 ).DWT$L_DRMR_VALUE = %LOC( DEC_TEST_CANCEL )
C
      D_CLBK( 1 ).DWT$A_DRMR_NAME  = %LOC( 'DEC_TEST_NO_MATCH'//CHAR( 0 ) )
      D_CLBK( 1 ).DWT$L_DRMR_VALUE = %LOC( DEC_TEST_NO_MATCH )
C
      D_CLBK( 2 ).DWT$A_DRMR_NAME  = %LOC( 'DEC_TEST_ACTIVATE'//CHAR( 0 ) )
      D_CLBK( 2 ).DWT$L_DRMR_VALUE = %LOC( DEC_TEST_ACTIVATE )
C
      IDECWS = DWT$REGISTER_DRM_NAMES( %REF( D_CLBK ),
     +                                 %REF( 3 ) ) 
C
      IF( IDECWS .NE. DWT$C_DRM_SUCCESS ) CALL LIB$STOP( %VAL( IDECWS ) )
C
C
C     Fetch all required widgets.
C
      IDECWS = DWT$FETCH_WIDGET( %VAL( I_HIER ),
     +                           %DESCR( 'DEC_TEST_ADBOX' ),
     +                           %REF( ISHL_W ),
     +                           %REF( ITOP_W ),
     +                           %REF( I2DUMM ) )
C
      IF( IDECWS .NE. DWT$C_DRM_SUCCESS ) CALL LIB$STOP( %VAL( IDECWS ) )
C
C
C     Make the shell widget manage the top level window.
C
      CALL XT$MANAGE_CHILD( %REF( ITOP_W ) )
C
C
C     Realise the shell widget.
C
      CALL XT$REALIZE_WIDGET( %REF( ISHL_W ) )
C
C
C     Loop and process events.
C
      CALL XT$MAIN_LOOP()
C
C
      STOP
      END
C
C
C
C
C
      INTEGER*4      FUNCTION DEC_TEST_CANCEL( I_WIDG, I_VALU, I_REAS )
C
C
      IMPLICIT       NONE
C
C
      INTEGER*4      I_WIDG                 ! ID of calling widget.
      INTEGER*4      I_VALU                 ! Value of callback argument.
      INTEGER*4      I_REAS                 ! Code specifing reason for call.
C
C
C*******************************************************************************
C
C
      WRITE( *, FMT='('' ''/'' '',''Cancel selected ! '')' )
      WRITE( *, FMT='('' '',''Widget='',I8.8,''   Tag='',I8.8,''  Reason='',
     +I8.8 )' ) I_WIDG, I_VALU, I_REAS
C
C
      RETURN
      END
C
C
C
C
C
      INTEGER*4      FUNCTION DEC_TEST_NO_MATCH( I_WIDG, I_VALU, I_REAS )
C
C
      IMPLICIT       NONE
C
C
      INTEGER*4      I_WIDG                 ! ID of calling widget.
      INTEGER*4      I_VALU                 ! Value of callback argument.
      INTEGER*4      I_REAS                 ! Code specifing reason for call.
C
C
C*******************************************************************************
C
C
      WRITE( *, FMT='('' ''/'' '',''No Match selected ! '')' )
      WRITE( *, FMT='('' '',''Widget='',I8.8,''   Tag='',I8.8,''  Reason='',
     +I8.8 )' ) I_WIDG, I_VALU, I_REAS
C
C
      RETURN
      END
C
C
C
C
C
      INTEGER*4      FUNCTION DEC_TEST_ACTIVATE( I_WIDG, I_VALU, I_REAS )
C
C
      IMPLICIT       NONE
C
C
      INTEGER*4      I_WIDG                 ! ID of calling widget.
      INTEGER*4      I_VALU                 ! Value of callback argument.
      INTEGER*4      I_REAS                 ! Code specifing reason for call.
C
C
C*******************************************************************************
C
C
      WRITE( *, FMT='('' ''/'' '',''Activate selected ! '')' )
      WRITE( *, FMT='('' '',''Widget='',I8.8,''   Tag='',I8.8,''  Reason='',
     +I8.8 )' ) I_WIDG, I_VALU, I_REAS
C
C
      RETURN
      END


T.RTitleUserPersonal
Name
DateLines
2449.1answer availableFRUST::HAGEMANNMon Mar 26 1990 08:5311
    HI,
    
    I've got the answers of most of my questions.
    What may be interesting for you is the fact, that the programing
    problems mentioned in point 1) and 2) are related to the
    'poor' DECwindows Version 1.0. So I was able to perform the
    program successfully under DECwinows V2.0.
    
    So for to that!
    
    Pietro