Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- dBsee 4.6 - The Library - /* +----------------------------------------------------------------------+ http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
/* +----------------------------------------------------------------------+
   |                                                                      |
   |           (C) 1989 - 1998 by ISA Italian Software Agency             |
   |                                                                      |
   |                      tBrowse  Cargo Structure                        |
   |                      tBColumn Cargo Structure                        |
   |                       SYS Function Parameter                         |
   |                            Inh Parameter                             |
   |                                                                      |
   +----------------------------------------------------------------------+ */

#ifndef _DFWIN_CH
   #define _DFWIN_CH

   // -------------------------------------------------------------------------
   // OBJECT definition
   // -------------------------------------------------------------------------
   // Cargo Structure

   #define WOBJ_TYPE             CARGO[1]       // Cargo Structure
      #define W_OBJ_BRW                   1       // BROWSE
      #define W_OBJ_FRM                   2       // FORM
      #define W_OBJ_ARRWIN                3       // WINDOW on ARRAY
      #define W_OBJ_ARRAYBOX              4       // LISTBOX (ARRAY)
      #define W_OBJ_BROWSEBOX             5       // LISTBOX (FILE)
   #define W_ALIAS               CARGO[ 2]
   #define W_ORDER               CARGO[ 3]
   #define W_KEY                 CARGO[ 4]
   #define W_FILTER              CARGO[ 5]
   #define W_BREAK               CARGO[ 6]
   #define W_TAGARRAY            CARGO[ 7]
   #define W_TITLE               CARGO[ 8]
   #define W_COLORARRAY          CARGO[ 9]
   #define W_SHADOW              CARGO[10]
   #define W_CURRENTREC          CARGO[11]
   #define W_BORDERGAP           CARGO[12]
      #define W_BG_TOP              CARGO[12][1]
      #define W_BG_LEFT             CARGO[12][2]
      #define W_BG_BOTTOM           CARGO[12][3]
      #define W_BG_RIGHT            CARGO[12][4]

   #define W_RELATIVEPOS         CARGO[13]
      #define W_RP_TOP              CARGO[13][1]
      #define W_RP_LEFT             CARGO[13][2]
      #define W_RP_BOTTOM           CARGO[13][3]
      #define W_RP_RIGHT            CARGO[13][4]

   #define W_CONTROL             CARGO[14]

   #define W_MOUSEMETHOD         CARGO[15]
      #define W_MM_ESCAPE            1
      #define W_MM_MOVE              2
      #define W_MM_MINIMIZE          4
      #define W_MM_MAXIMIZE          8
      #define W_MM_VSCROLLBAR       16
      #define W_MM_SIZE             32
      #define W_MM_HSCROLLBAR       64
      #define W_MM_EDIT            128
      #define W_MM_PAGE            256

   #define W_MENUARRAY           CARGO[16]
   #define W_SAVESCREENID        CARGO[17]

   #define W_AI_LENGHT           CARGO[18]

   #define W_KEYBOARDMETHODS     CARGO[19]
   #define W_PRIMARYKEY          CARGO[20]

   #define W_REFRESH             CARGO[21]
      #define W_R_CONTROL           CARGO[21][1]
      #define W_R_GROUP             CARGO[21][2]

   #define W_CURRENTGET          CARGO[22]
   #define W_MENUHIDDEN          CARGO[23]
   #define W_CURRENTPAGE         CARGO[24]
   #define W_PAGELABELS          CARGO[25]

   #define W_BORDERTYPE          CARGO[26]
      #define W_BT_NONE              0
      #define W_BT_SIMPLE            1

   #define W_ARRTOTAL            CARGO[27]
   #define W_CURRENTKEY          CARGO[28]
   #define W_INHARRAY            CARGO[29]

   #define W_OBJGOTOP            CARGO[30]
   #define W_OBJREFRESH          CARGO[31]
   #define W_OBJ2FORCE           CARGO[32]
   #define W_CTRL2SYS            CARGO[33]
   #define W_SYSSTABLE           CARGO[34]

   #define W_DEFAULT             CARGO[35]
      #define W_DEF_ORDER           CARGO[35][1]
      #define W_DEF_KEY             CARGO[35][2]
      #define W_DEF_FILTER          CARGO[35][3]
      #define W_DEF_BREAK           CARGO[35][4]

   #define W_TAGFUNCTION         CARGO[36]

   #define W_SYSFOOTER           CARGO[37]

   #define W_BACKGROUND          CARGO[38]

   #define W_IS2TOTAL            CARGO[39]

   #define W_MENUPOS             CARGO[40]

   #define W_CARGO               CARGO[41]

   #define W_CTRL2CALC           CARGO[42]

   #define W_PAGEMAX             CARGO[43]

   #define W_OBJ2ADD             CARGO[44]

   #define W_LINECURSOR          CARGO[45]

   #define W_OBJSTABLE           CARGO[46]

   #define W_FASTMODIFY          CARGO[47]

   #define W_DEFAULTPOSITION     CARGO[48]

   #define W_50ROWSUPPORT        CARGO[49]

   #define W_STRUCTURELEN              49


   // Windows Object Event
   #define WO_EVENT_ACTIVATE   1
   #define WO_EVENT_INKEY      2
   #define WO_EVENT_EXIT       3

   // Windows Object Close
   #define W_OC_RESTORE       "r"
   #define W_OC_DESTROY       "d"

   // Windows Object Position
   #define W_POSITIONTOP       1
   #define W_POSITIONBOTTOM    2

   // -------------------------------------------------------------------------
   // COLUMN definition
   // -------------------------------------------------------------------------
   #COMMAND ATTACH COLUMN <cId> TO <oParent> BLOCK <bBlock> ;
                                  [PROMPT        <cPrompt>] ;
                                  [WIDTH          <nWidth>] ;
                                  [TOTAL          <bTotal>] ;
                                  [PICTURE      <cPicture>] ;
                                  [FPICTURE <cFootPicture>] ;
                                  [LABEL          <cLabel>] ;
                                  [INFO            <bInfo>] ;
                                  [EDIT           <cField>] ;
                                  [MESSAGE         <cMess>] ;
                                  [COLOR            <aCol>] ;
                                                            ;
   => tbAddColumn(     <oParent>  ,;
                       <{bBlock}> ,;
                       <nWidth>   ,;
                       <cId>      ,;
                       <cPrompt>  ,;
                       <{bTotal}> ,;
                       <cPicture> ,;
                   <cFootPicture> ,;
                       <cLabel>   ,;
                       <{bInfo}>  ,;
                       <cField>   ,;
                       <cMess>    ,;
                       <aCol>      )

   #define WC_ID                  CARGO[1]
   #define WC_PROMPT              CARGO[2]
   #define WC_TOTALVALUE          CARGO[3]
   #define WC_PICTURE             CARGO[4]
   #define WC_FOOTERTOTALBLOCK    CARGO[5]
   #define WC_FOOTERINFOBLOCK     CARGO[6]
   #define WC_EDITFIELD           CARGO[7]
   #define WC_COLUMNMESSAGE       CARGO[8]
   #define WC_COLUMNCOLOR         CARGO[9]

   #define WC_STRUCTURELEN              9

   #define WC_CC_HEADER         1
   #define WC_CC_DATA           2
   #define WC_CC_CURSOR         3

   #define WC_CC_LEN            3

   // -------------------------------------------------------------------------
   // inherited fields
   // -------------------------------------------------------------------------

   //
   // Costants used as 2nd parameter in function call to dbInhGet()
   // They identify the Code-Block to evaluate or write the inherited
   // fields
   //

   #define INH_DEF         1      // Define inherited field variable
   #define INH_WRI         2      // Write inherited field to disk

   // -------------------------------------------------------------------------
   // Key Definition
   // -------------------------------------------------------------------------

   #COMMAND ATTACH KEY <cName> TO <aParent>               ;
                               [KEYTYPE      <nKeyType>]  ;
                               [BLOCK        <bBlock>  ]  ;
                               [VARTYPE      <cVarType>]  ;
                               [VARLEN       <nVarLen> ]  ;
                               [EXPRESSION   <cExp>    ]  ;
                                                          ;
   => AADD( <aParent> ,;
              { <cName>    ,;
                <nKeyType> ,;
                <bBlock>   ,;
                <cVarType> ,;
                <nVarLen>  ,;
                <cExp>     })

   #define PK_NAME            1 // Name of key field
   #define PK_KEY_TYPE        2 // Type (0-1-2-3) of key
   #define PK_BLOCK           3 // CodeBlock for key field
   #define PK_VAR_TYPE        4 // Type of data
   #define PK_LEN             5 // Key field length
   #define PK_EXPRESSION      6 // Key expression

   //
   // Tipologie di chiave
   //
   #define KEY_FREE           0 // No control
   #define KEY_PROGRESS       1 // Automatically increasing
   #define KEY_DIGIT          2 // Entered but not repeated
   #define KEY_FILE_COUNTER   3 // Automatically on counters

   // -------------------------------------------------------------------------
   // Inh Definition
   // -------------------------------------------------------------------------

   #COMMAND ATTACH INH TO <aParent>              ;
                          INHFIELD     <cField>  ;
                          INHBLOCK     <bBlock>  ;
                                                 ;
   => AADD( <aParent> ,;
              { <cField> ,;
                <bBlock> })

   #define INH_FIELD          1 // Field name
   #define INH_BLOCK          2 // Block to assign

   // -------------------------------------------------------------------------
   // REFRESH Definition
   // -------------------------------------------------------------------------

   #COMMAND ATTACH REFRESH GROUP <cGroup> TO <aParent> ;
                                                       ;
   => AADD( <aParent> , <cGroup> )

   // -------------------------------------------------------------------------
   // PAGE Definition
   // -------------------------------------------------------------------------

   #COMMAND ATTACH PAGE LABEL <cPage> TO <aParent> ;
                                                   ;
   => AADD( <aParent> , <cPage> )

   // -------------------------------------------------------------------------
   // DEFINE
   // -------------------------------------------------------------------------

   #define TBISOPT( oTbr, nOpt ) dfAnd( oTbr:W_MOUSEMETHOD, nOpt )!=0

   #define TBREALTOP( oTbr )     (oTbr:nTop -oTbr:W_BG_TOP)
   #define TBREALLEFT( oTbr )    (oTbr:nLeft -oTbr:W_BG_LEFT)
   #define TBREALBOTTOM( oTbr )  (oTbr:nBottom +oTbr:W_BG_BOTTOM)
   #define TBREALRIGHT( oTbr )   (oTbr:nRight +oTbr:W_BG_RIGHT)

   // -------------------------------------------------------------------------
   // DEFINE STANDARD KEY
   // -------------------------------------------------------------------------

   #COMMAND ADDKEY <cId> TO <aParent> [BLOCK <bBlock>]  ;
                                      [WHEN <bWhen>]    ;
                                      [RUNTIME <bRun>]  ;
                                      [MESSAGE <cMess>] ;
                                                        ;
   => aAdd( <aParent>, { <cId>, <{bWhen}>, <{bRun}>, <{bBlock}>, <cMess> })

   #define MTD_ACT    1
   #define MTD_WHEN   2
   #define MTD_RUN    3
   #define MTD_BLOCK  4
   #define MTD_MSG    5

   #include "dfreport.ch"
   #include "dfState.ch"

#endif

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson