Commands

DCTABLE..............A command for creating a TABLE in HTML
OVERVIEW_DUAL_COMM...Dual-Mode Commands
OVERVIEW_GUI_COMM....GUI commands
=> (ECHO)............Display the pre-processed output of a DOT PROMPT command
@ DC3STATE...........Create a 3-STATE object for displaying with the GUI reader
@ DCAPPCRT...........Create an APPLICATION CRT object for displaying with GUI reader
@ DCBROWSE...........Create a BROWSE object for displaying with GUI reader
@ DCCHECKBOX.........Create a CHECKBOX object for displaying with GUI reader
@ DCCOMBOBOX.........Create a COMBOBOX object for displaying with GUI reader
@ DCCUSTOM...........Create a CUSTOM object for displaying with GUI reader
@ DCDIALOG...........Create a DIALOG object for displaying with GUI reader
@ DCDIRTREE..........Create a DIRECTORY TREE object for displaying with GUI reader
@ DCFINDBROWSE.......A browse-window find utility that uses AutoSeek
@ DCGET..............Create a GET object for displaying with the text/GUI reader
@ DCGRABOX...........Draw a Box
@ DCGRALINE..........Draw a line
@ DCGRAPROC..........Draw a screen object with a custom procedure
@ DCGRASTRING........Write a text string
@ DCGROUP............Create a GROUP object for displaying with GUI reader
@ DCKLMLE............Create a MULTILINE edit for displaying with GUI reader
@ DCLISTBOX..........Create a LISTBOX object for displaying with GUI reader
@ DCMESSAGEBOX.......Create a MESSAGE BOX area for displaying with GUI reader
@ DCMULTILINE........Create a MULTILINE edit for displaying with GUI reader
@ DCOBJECT...........Define an existing object for displaying with GUI reader
@ DCPICKLIST.........Create a PICKLIST dialog object for displaying with GUI reader
@ DCPRINT BITMAP.....Send BitMap to printer using @..SAY style printing
@ DCPRINT BOX........Send Box to printer using @..SAY style printing
@ DCPRINT LINE.......Send Line to printer using @..SAY style printing
@ DCPRINT MARKER.....Send Marker to printer using @..SAY style printing
@ DCPRINT SAY........Send text to printer using @..SAY style printing
@ DCPROGRESS.........Create a PROGRESS BAR object for displaying with GUI reader
@ DCPUSHBUTTON.......Create a PUSHBUTTON for displaying with GUI reader
@ DCQUICKBROWSE......Create a QUICKBROWSE object for displaying with GUI reader
@ DCRADIOBUTTON......Create a RADIO BUTTON object for displaying with GUI reader
@ DCRIGHTPRINT SAY...Send right-justified text to printer
@ DCSAY GET..........Create a SAY..GET object for displaying with the text/GUI reader
@ DCSCROLLBAR........Create a SCROLL BAR object for displaying with GUI reader
@ DCSPINBUTTON.......Create a SPIN BUTTON get for displaying with GUI reader
@ DCSTATIC...........Create a STATIC object for displaying with GUI reader
@ DCTABPAGE..........Create a TAB PAGE object for displaying with GUI reader
@ DCTOOLBAR..........Create a TOOLBAR object for displaying with GUI reader
@ DCTREEARRAY........Browse a multi-dimensional array using Tree-View
@ DCTREEROOT.........Create a Root object for a Tree View
@ SAYWIN.............Write a SAY text string in a Text or GUI dialog
ABROWSE..............Browse an array
AEDIT................Edit an Array
AEVAL................Evaluate an Array
APPEND...............Append and Edit a new record
APPEND BLANK.........Append a Blank record
APPEND FROM..........Append records from another file
APPEND VIRTUAL.......Append Virtual Record to selected database
AVERAGE..............Average numeric fields in selected database
AVIEW................A Tree style array/object browser
BATCH................Process a Batch file with Dot-Prompt commands
BLANK................Blank record(s) in currently selecte database
BROWSE...............A text-base Database browsing system
CALC.................A popup, full-function calculator
CD | CHDIR...........Change system directory
CHR..................Display an ASCII Character Chart
CLEAR SCOPE..........Clear scoping values for the current work area
CODE DELETE..........Delete a code table
CODE EDIT............Edit a Code Table
CODE IMPORT..........Import a code table
CODE RENAME..........Rename a Code Table
COMPILE..............Compile a source .PRG or all changed .PRGs
CONTINUE.............Continue Locating a record
COPY TO..............Copy records from selected database to a new database
COPYNEW..............Copy only new files to another directory
COUNT................Count records in selected database
CREATE...............Create a new database
CRT..................Run a text-based procedure in a new CRT Window
DATACONVERT..........Convert a database to a different DBE driver
DATE.................A pop-up calendar for selecting a date
DCADDBUTTON..........Add BUTTON to TOOLBAR object for displaying with GUI reader
DCAPPBROWSE..........Create an APPLICATION BROWSE object for displaying with GUI reade
DCAPPEDIT............Create an APPLICATION EDIT object for displaying with GUI reader
DCAPPFIELD...........Create an APPLICATION FIELD object for displaying with GUI reader
DCBITMAP.............Create a BITMAP object for displaying with the GUI reader
DCBROWSECOL..........Create a BROWSE column object for displaying with GUI reader
DCDOT................Invoke a Dot-prompt window
DCFINDADDCOL.........Add column to an array to be used by DCFINDBROWSE
DCFORM...............A command for creating FORM tags in HTML
DCFRAME..............A command for creating FRAME tags in HTML
DCFRAMESET...........A command for creating FRAMESET tags in HTML
DCGETOPTIONS.........Set the options for the Dialog Reader
DCGRUMPBROW..........An emulation of Greg Lief's GRUMPBROW
DCHOTKEY.............Set a Hot-Key for action by the GUI Reader
DCHTML...............A command for creating any HTML output
DCHTMLBODY...........A ccommand for creating the body tag of an HTML document
DCHTMLMAIN...........A ccommand for creating the main HTML document
DCHYPERLINK..........A command for creating HYPERLINK tags in HTML
DCIMAGE..............A command for creating IMAGE tags in HTML
DCINPUT..............A command for creating input elements for HTML forms
DCLDEBUG.............Send debug information to a debugging Log File
DCLDEBUGOFF..........Send debug information to a debugging Log File
DCLDEBUGOFFQUIET.....Send debug information to a debugging Log File
DCLDEBUGQUIET........Send debug information to a debugging Log File
DCLIST...............A command for creating lists in HTML
DCLISTITEM...........A command for creating list items in HTML
DCMENUBAR............Create a MENUBAR object for displaying with Text/GUI reader
DCMENUITEM...........Add Item to SUBMENU object for displaying with Text/GUI reader
DCMSGBOX.............Display an array of messages in a window
DCPRINT ?/??.........Send text to printer using ?/?? style printing
DCPRINT ABORT........Abort the print job
DCPRINT ATTRIBUTE....Set the Attributes for printing with DCPRINT commands
DCPRINT EJECT........Eject the printer page
DCPRINT EVAL.........Evaluate a code block to imbed custom graphs in printed page
DCPRINT FONT.........Set the Font for printing with @..SAY style coordinates
DCPRINT OFF..........Destroy a printer object
DCPRINT ON...........Create a printer class object for @..SAY style printing
DCPRINT OPTIONS......Create an option array for setting printing defaults
DCPRINT SIZE.........Set the size of the print page in rows and columns
DCQDEBUG.............Send debug information to a debugging CRT window
DCQDEBUGOFF..........Send debug information to a debugging CRT window
DCQDEBUGOFFQUIET.....Send debug information to a debugging CRT window
DCQDEBUGQUIET........Send debug information to a debugging CRT window
DCQOUT...............Send data to the default CRT window
DCQOUT WINDOW........Establish or Create a CRT window for debugging GUI apps
DCREAD GUI...........Read the DIALOG GetList with the GUI reader
DCREAD HTML..........Read the DIALOG GetList with the HTML reader
DCREAD TEXT..........Read the DIALOG GetList
DCSETGROUP...........Set the GROUP name for successive DC* commands
DCSETPARENT..........Set the Parent object for successive DC* commands
DCSTATUSBAR..........Create a Status Bar area on the perimiter of a dialog
DCSUBMENU............Add Submenu to MENUBAR object for displaying with Text/GUI reader
DCTABGROUP...........A command for creating TABPAGES in HTML
DCTREEITEM...........Create a new item for a Tree View
DCVARS...............A command for managing HIDDEN variables in HTML
DELETE...............Mark record(s) for deletion
DELETE FILE..........Delete a file
DELETE TAG...........Delete a tag from a combined index
DIR..................Display a directory of files or databases
DISPLAY MEMORY.......Display the contents of a memory file or current memory
DISPLAY STATUS.......Display System status window
DISPLAY STRUCTURE....Display the structure of the selected database
DLL LIST.............List all loaded dynamic .DLLs
DLL LOAD.............Load a dynamic .DLL
DLL UNLOAD...........UnLoad a dynamic .DLL
EDIT FILE............Edit a source file
EDIT VIRTUAL.........Edit the Virtual Record
FILE DELETE..........Delete a file group from the DCFILES.DBF dictionary
FILE EDIT............A Database File / Work area Definition editor
FILE IMPORT..........Import File Group(s) from the Import File Dictionary
FILE RESTORE.........Restore work areas, indexes, relations, from dictionary
FILE SAVE............Save Work area definition array to dictionary
FIND.................GUI dialog for finding a record using an index
GO BOTTOM............Go to the Bottom of a set of Scoped Records
GO TOP...............Go to the Top of a set of Scoped Records
GUI..................Set the Dialogue mode to GUI or TEXT
HELP.................Display HELP for a command or function
HUNT.................Hunt for a record by search all indexes
IF ELSE..............Evaluate a list of expressions based on a condition
INDEX FIELDS.........Create index tags for all fields in a database
INDEX ON.............Create an index
INKEY................Display Inkey() and AppEvent() values for pressed keys
INSERT...............Insert Blank or Virtual records in selected database
INTERPRET............Interpret a command string
LOCATE...............Locate a record
LOCK.................Lock the current record
LOCK EDIT............Maintain the "Lock" definition database
LOCK FILE............Lock the current file
LOG..................Write system status to a log file
LOGIN................Login to application to establish user rights
MENU CREATE..........Create a new menu with Menu Editor
MENU EDIT............A Complex Pull-Down Menu Editor
MODIFY STRUCTURE.....Modify the structure of a database
OBJ LOAD.............Dynamically load an Xbase++ compiled .OBJ for execution
PACK.................Pack the current database
PROGRAM..............Run a Program from the Program Dictionary
PROGRAM MAINTENANCE..Maintain the DCPROG.DBF Program Dictionary File
PURGE................Purge duplicate records from a database
RECALL...............Recall record(s) that were previously marked for deletion
REPLACE..............Assign new values to field variables
REPLACE VIRTUAL......Replace the current record contents with Virtual record arra
RESTORE ARRAY........Restore a multidimensional array from a binary file
RESTORE DATA.........Restore work areas
RESTORE SET..........Restore the SET environment from a file
SAVE ARRAY...........Save a multidimensional array to a binary file
SAVE DATA............Save info about all open workareas to an array
SAVE SET.............Save the SET environment to a file
SAVE VIRTUAL.........Save current record to Virtual record
SEARCH...............Search all fields in a set of databases for a value
SEEK.................Seek a record in a set of Scoped Records
SELECT...............Select a database from a picklist of open files
SET..................Pop up an editing screen for all SET environment variables
SET ............Set and/or view an environment variable
SET AUTOLOCK.........Toggle automatic File/Record locking
SET BATCH............Create a command to run a batch file
SET COMMAND..........Create a command to run an executable program
SET DBE | RDD........Select a database driver
SET DOSKEY...........Set Dot-Prompt command stack to DOS-Key emulation
SET DOTSTACK.........Set the size of the Dot-prompt command stack
SET EDITOR...........Establish the default source code editor
SET FLDKEY...........Establish the hot key for popping up a field list
SET GUI..............Set the Dialogue mode to GUI or TEXT
SET ODIR.............Establish the working directory for .OBJ files
SET ODPERCENT........Set percentage update of progress odometer
SET PDIR.............Establish the working directory for .PRG files
SET PROCEDURE........Create a command to run a function or procedure
SET PROMPT...........Establish the type of prompt for the Dot-prompt
SET RELATION.........Set a relation with a child scope
SET SCOPE............Set a scoping value for the current work area
SET STATUS...........Toggle display of GUI Status Window
SET TALK.............Toggle display of pre-processed output
SET USEEXCLDATA......Force Exclusive use of application databases
SET XPPOPT...........Set the default Compiler switches
SET XPPPATH..........Set the directory when the Compiler resides
SKIP.................Skip records in a set of Scoped Records
STACK................Display the callstack and optionally edit the source
SUM..................Sum numeric fields in selected database
TAG..................Build or add to a Record Tag Array
TAG CLEAR............Clear the Record Tag Array
UNLOCK...............Unlock the current record
USE..................Open a database file in a work area
USER EDIT............Maintain the DCUSERS.DBF User Database
UTIL.................A menu of database utilities
WHERE PUBLIC.........List .OBJ(s) that contain public function
WHERE SOURCE.........Display a list of .OBJ/.PRG files containing PUBLIC proc
ZAP..................Zap the database
USER-DEFINED COMMANDSCreate a User-Defined object for displaying with GUI reader
DBU..................A Gui Database Management Utility
DCAPICK..............A dialogue for choosing a item from an array pick list.
DCREPORT FORM........A Windows compatible replacement for REPORT FORM

DCTABLE

A command for creating a TABLE in HTML

Syntax:

   @ [ < nRow >, < nCol > ] DCTABLE         ;
         [OBJECT < oTable >               ;
         [BORDER < nBorder >]             ;
         [ROWS < nRows >]                 ;
         [COLS,COLUMNS < nCols >]         ;
         [TRIMROWS]                     ;
         [TRIMCOLS]                     ;
         [FILL < cFill >]                 ;
         [ALIGN < nAlign >]               ;
         [PARENT < oParent >]             ;
         [PARENTID < cPID >]              ;
         [BGCOLOR < xBGColor > ]          ;
         [BORDERCOLOR < xBorderColor >]   ;
         [BORDERCOLORLIGHT < xBorderColorLight >] ;
         [BORDERCOLORDARK < xBorderColorDark >]  ;
         [CELLPADDING < nCellPadding >]   ;
         [CELLSPACING < nCellSpacing >]   ;
         [HSPACE < nHspace >]             ;
         [VALIGN < nValign >]             ;
         [VSPACE < nVspace >]             ;
         [WIDTH < cWidth >]               ;
         [CLASS < cClass >]               ;
         [CARGO < xCargo >]               ;
         [PRE,PRETEXT < bcPreHTML >]      ;
         [POST,POSTTEXT < bcPostHTML >]   ;
         [HIDE < bHide >]                 ;
         [EVAL < bEval >]                 ;
         [TITLE < cTitle >]               ;
         [ID < cId >]                     ;
         [GROUP < cGroup >]
   

Arguments:

   < nRow > and < nCol > are the row number and column number of
   the table if the parent of this object is a DCTABLE. The
   text will be inserted in the cell of the table defined by
   the row/column.
   
   OBJECT < oTable > is the name of the variable to assign as a
   storage place for this object.
   
   PARENT < oParent > is the name of the variable that was
   assigned to the parent of this table. If this argument
   is not passed then the parent will be the object set with
   the DCSETPARENT command.
   
   PARENTID < cParentID > may be used in lieu of the PARENT < oParent >
   clause.  This identifies the ID of the parent instead of the
   parent's object variable name.
   
   TRIMCOLS will suppress writing < td >< /td > column tags
   that are empty when at the end of columns.
   
   TRIMROWS will suppress writing < tr >< /tr > column tags that
   are empty when at the end of rows.
   
   ROWS < nRows > is the number of rows in the table.
   
   COLS,COLUMNS < nCols > is the number of columns in the table.
   
   HSPACE < nHSpace > is the number of pixels of space on the
   outside of the table on both the left and right side.
   
   VSPACE < nVSpace > is the number of pixels of space on the
   outside of the table on both the top and bottom.
   
   FILL < cFill > is a character string to put into each table
   cell.  Any writing to the cells will be appended to the
   fill string.
   
   WIDTH < cWidth > is a character string defining the width of
   the table.  Values may be either an integer--interpreted
   as a number of pixels--or a character string defining a
   percentage of the horizontal or vertical space.   The
   value 50% means half the available space while 50 means
   50 pixels.
   
   CELLPADDING < nCellPadding > defines the amount of space within table
   cells (i.e., between the border and cell contents). The
   value may be given as a number of pixels or as a percentage,
   though most browsers do not support percentages, treating
   "20%" as if it were "20". A percentage value is relative to
   the vertical space available for vertical padding or spacing,
   and the amount is split evenly between the top and bottom.
   Horizontal padding and spacing behave similarly.  The padding
   or spacing is always applied to all four sides.
   
   CELLSPACING < nCellSpacing > defines the amount of space between
   table cells.
   
   Internet explorer lets you alter the colors that make up an
   individual cell's border - if border are turned on with the
   border attribute.  The values for BORDERCOLOR < xBorderColor >,
   BORDERCOLORDARK < xBorderColorDark > and
   BORDERCOLORLIGHT < xBorderColorLight > may be an RGB color
   value (#XXXXXX) , a standard color name, an RGB 3-element
   array or a numeric value defined in GRA.CH.  The different
   colors shade the edges of the border to give it a 3D
   appearance with < nBorderColor > shades the central body of
   the border.
   
   BORDER < nBorder > specifies the width in pixels of the border
   around the table.
   
   ALIGN < nAlign > specifies the default horizontal alignment of
   items in the table cells.  Possible values are left, right,
   and center.
   
   VALIGN < nVAlign > specifies the default vertical alignment of
   items in the table cells.  Possible values are top, bottom,
   and center.
   
   BGCOLOR < xBGColor > specifies the default background color for
   the entire table.  Value may be an RGB color value (#XXXXXX),
   a standard color name, an RGB 3-element array or a numeric
   value defined in GRA.CH.
   
   HEADERS < aHeaders > is an array of character strings
   containing the headers for each column in the table.  The
   length of the array should be equivalent to the number of
   columns.
   
   FOOTERS < aFooters > is an array of character strings
   containing the footers for each column in the table.  The
   length of the array should be equivalent to the number of
   columns.
   
   CLASS < cClass > sets a class name for the table. The class name
   is case sensitive.  A class is used with style sheets to
   give the table a pre-defined appearance.
   
   CARGO < xCargo > is any kind of data you wish to to add to the
   :cargo container of object created by this definition.
   
   PRE,PRETEXT < bcPreHTML > is a character string or a code block
   that returns a character string containing any HTML text
   that will precede the opening < table > tag in the source
   that is written.
   
   POST,POSTTEXT < bcPostHTML > is a character string or a code block
   that returns a character string containing any HTML text
   that will follow the closing < /table > tag in the source
   that is written.
   
   HIDE < bHide > is a code block that is evaluated at the
   time the :writeHtml() method is called for the class that
   supports this command.  If the code block returns a .TRUE.,
   then no HTML code will be written.
   
   EVAL < bEval > is a code block that is evaluated after the
   object is created in DC_ReadHtml().  A pointer to the
   object associated with this command is passed as an
   argument to the code block.
   
   ID < cId > is a unique identifier for this object.  This ID is used
   with functions like DC_GETOBJECT() to determine the status
   of a get object.
   
   TITLE < cTitle > is a title to assign to this object.  The title
   is not used in the HTML output but is simply a description of the
   get object which is saved in the GetList.
   
   GROUP < cGroup > is a "group" name (case-sensitive) to assign to
   this GetList object.  Assignment to a group makes it possible to
   perform operations only on GetList items which are members of a
   specified group.
   

Description:

    The command DCTABLE creates an HTML TABLE definition and
    adds the definition to the array named GETLIST which is later
    processed by the DC_READHTML() function or by the DCREAD HTML
    command.  The GETLIST array must be first declared and
    initialized to the value of {}.  The command DCREAD HTML
    creates all the DC_Html*() objects from the GetList array
    and then invokes the :writeHtml() method of the topmost
    parent object to generate the HTML code.
   
    A Getlist object remains stored as long as it is referenced
    in an array or by a variable.  The commands CLEAR and
    CLEAR GETS assign an empty array to the GetList variable.
    This also occurs after the completion of the DCREAD command
    if it is called without the SAVE option, causing all
    objects referenced by the GetList array to be released.
   
    Any other HTML element may be inserted into a table by
    simply addressing the table element with it's row number
    and column number.  See example.
   

Notes:

   DCTABLE uses the DC_HtmlTable() class to create the table
   object and write the HTML source.
   

Examples:

   /*
   This example will build a table with 4 sub-tables.
   */
   
   FUNCTION Xtest()
   
   LOCAL i, j, GetList[0], cHtml, oTable, nTable, aSubTables[2,2]
   
   DCTABLE OBJECT oTable1 ;
        ROWS 2 ;
        COLUMNS 2 ;
        BORDER 5 ;
        BORDERCOLOR '#336677' ;
        TRIMROWS ;
        TRIMCOLS ;
        BGCOLOR '#339977'
   
   nTable := 1
   FOR i := 1 TO 2
     FOR j := 1 TO 2
       @ i,j DCTABLE ;
         OBJECT aSubTables[i,j] ;
         BGCOLOR '#33AA77' ;
         ROWS 4 ;
         COLUMNS 4 ;
         FILL Alltrim(Str(i)) + '/' + Alltrim(Str(j)) ;
         PARENT oTable1
       @ 1,1 DCSAY '

' + Alltrim(Str(nTable++)) + ; '

' PARENT aSubTables[i,j] NEXT NEXT DCREAD HTML TO cHtml MemoWrit('TEST.HTM',cHtml) RETURN nil

Source/Library:

  DCHTML.CH

See Also:

   DCREAD HTML
   dc_html()
   dc_readhtml()
   dc_htmltable()



OVERVIEW_DUAL_COMM

Dual-Mode Commands

Description:

    DUAL-Mode commands have been designed to work in either
    TEXT mode or GUI mode.  Text mode is selected by calling
    DC_GUI(.f.) and GUI mode is selected by calling DC_GUI(.t.).
   

OVERVIEW_GUI_COMM

GUI commands

Description:

    GUI commands are designed to work only in GUI mode.  When any of
    these commands are used, the dialog reader should be invoked with
    the DCREAD GUI command or the DC_ReadGUI() function.
   

=> (ECHO)

Display the pre-processed output of a DOT PROMPT command

Syntax:

    = > < command >
   

Arguments:

   < command > is the command string to translate.
   

Description:

    The =þ> command is used to display the pre-processed output of
    commands entered at the dot prompt.
   

Examples:

    . => STACK
   DC_CallStack()
   
    . => CLOSE
   dbCloseArea()
   
    . => ? K_ESC
   Qout( 27 )
   

See Also:

   dc_dot()



@ DC3STATE

Create a 3-STATE object for displaying with the GUI reader

Syntax:

   @ < nRow >,< nCol > DC3STATE < uVar > ;
                   [PROMPT < aVar >] ;
                   [SIZE < nWidth > [,< nHeight >]] ;
                   [PARENT < oParent >] ;
                   [PARENTID < cParentID >] ;
                   [MESSAGE < bcMsg > [INTO < oMsg >]] ;
                   [COLOR < bncFgC > [,< ncBgC >] ] ;
                   [HELPCODE < cHelp >] ;
                   [DATALINK < bLink >] ;
                   [FONT < bocFont >] ;
                   [WHEN < bWhen >] ;
                   [PRESENTATION < aPres >] ;
                   [PIXEL] ;
                   [OBJECT < oObject >] ;
                   [TOOLTIP < bcToolTip >] ;
                   [CURSOR < nCursor >] ;
                   [CARGO < xCargo >] ;
                   [HIDE < bHide >] ;
                   [EDITPROTECT < bProtect >] ;
                   [PREEVAL < bPreEval >] ;
                   [EVAL < bEval >] ;
                   [TITLE < cTitle >] ;
                   [RELATIVE < oRel >] ;
                   [ID < cId >] ;
                   [ACCELKEY < anAccel >] ;
                   [GOTFOCUS < bGotFocus >] ;
                   [LOSTFOCUS < bLostFocus >] ;
                   [TABSTOP] ;
                   [NOTABSTOP] ;
                   [TABGROUP < nTabGroup >] ;
                   [VISIBLE] ;
                   [INVISIBLE] ;
                   [GROUP < cGroup >] ;
                   [VALID < bValid >]
   

Arguments:

   < nRow > and < nCol > are the row and column of the screen.
   Coordinates are always relative to position 0,0 ie. Top,Left
   of the parent object, unless the RELATIVE < oRel > argument is
   used.  If no parent is assigned, then the parent is the Dialog
   box. IF the PIXEL option is set to .TRUE. in DCGETOPTIONS,
   then the numbers are in pixels otherwise they are in standard
   text-based coordinates.  You can also force the pixel
   mode by including PIXEL as a command argument.
   
   < nVar > is the variable to GET.  This must be a initialized to
   a numerical value of 0, 1 or 2. It must not be a macro. < nVar >
   is automatically anchored via a Get-Set codeblock created by
   DC_GetAnchorCB() unless < nVar > is a custom Get-Set code block.
   Macros may be used in a custom Get-Set code block.
   
   OBJECT < oObject > is the variable to use as a container for the
   object after it is created by the GUI reader.
   
   RELATIVE < oRel > is an optional object in the Getlist which
   determines the start coordinates of this object.  If this
   option is used, then the < nSrow >, < nSCol > coordinates are
   relative to the starting coordinates of < oRel > rather than
   the parent object.
   
   PROMPT < aPrompt > is an array of 3 character strings, one for
   each state of the 3-state box, to display immediately to the
   right of the 3-state box.
   
   SIZE < nWidth >,< nHeight > is the width and height of the
   prompt.  If the PIXEL option is set to .TRUE. in DCGETOPTIONS,
   then the numbers are in pixels otherwise they are in standard
   text-based numbers.
   
   MESSAGE < bcMsg > is the message you want to display in the
   message area of the dialogue screen defined by the DCMESSAGEBOX
   command when the object is in focus.  Optionally, INTO < oMsgBox >
   will designate which message box to display the message into.
   If the INTO clause is not used, then the last message box in the
   GetList is the default.  < oMsgBox > may also be any object that
   supports the :setCaption() method.  If < bcMsg > is a code-block,
   it must return a character string.
   
   WHEN < bWhen > is a code block that is evaluated in the event loop.
   This code block must return a logical value.  If the value
   returned is .FALSE. then the object will be disabled and grayed.
   If the value returned is .TRUE. then the object will be enabled.
   
   HIDE < bHide > is a code block that is evaluated in the event loop.
   This code block must return a logical value.  If the value
   returned is .TRUE. then the object will be hidden from view.  If
   the value returned is .FALSE. then the object will be displayed.
   
   EDITPROTECT < bProtect > is an optional condition tested during the
   execution of the GUI gets by the DCREAD GUI command, before the
   object receives input focus (before it is activated). When the
   condition returns the value .T. (true), the object receives the
   input focus.  Otherwise, it is skipped. < bProtect > is a code
   block that must return a logical value when evaluated. The object
   is passed to the code block prior to the object receiving input
   focus. This clause behaves similar to the WHEN clause with the
   exception that the object is not disabled (grayed out).
   
   PREEVAL < bPreEval > is a code block to be evaluated by the GUI
   reader before the Xbase Parts object is created.  The object is
   passed to the code block.
   
   EVAL < bEval > is a code block to be evaluated by the GUI reader
   after the Xbase Parts object is created.  The object is passed
   to the code block.
   
   VALID < bValid > is an optional condition tested during the
   execution of the GUI gets by the READ command before a Get
   object loses input focus (before it is deactivated).  When
   the condition returns the value .T. (true), the Get object
   loses the input focus.  Otherwise, it remains active. < bValid >
   is a code block that must return a logical value when it is
   evaluated.  The Get object is passed to the code block prior
   to the Get object losing input focus.
   
   PARENT < oParent > is the name of the variable that was assigned to
   the parent object for this object.  Only use this clause if you
   are placing this object onto another dialogue object. If this
   argument is not passed then the parent will be the object set
   with the DCSETPARENT command.
   
   PARENTID < cParentID > may be used in lieu of the PARENT < oParent >
   clause.  This identifies the ID of the parent instead of the
   parent's object variable name.
   
   DATALINK < bLink > is an optional code block that is evaluated
   every time Get/Set codeblock is evaluated, ie when the data
   is read from the < uVar > into the object, except when using
   a user-defined Get/Set code block.  < bLink > is also
   evaluated when DC_GetRefresh() is called unless the < lDataLink >
   parameter of DC_GetRefresh() is .FALSE.
   
   FONT < cFont > is a character string defining an optional font.
   The font string must conform to the Xbase++ standard, ie.
   "10.Courier.Bold". It may also be a font object or a code block
   that returns a character string or a font object to later
   refresh with DC_GetRefresh().
   
   PRESENTATION < aPres > is a two-dimensional array. If specified,
   this contains presentation parameters for the CheckBox object.
   The first column of the array must contain #define constants
   from the XBP.CH file starting with the prefix XBP_PP_. These
   constants define the presentation parameters that can be set
   for the object and include colors and fonts. The second column
   of the array in < aPres > contains the value for each setting.
   These are also generally set using #define constants from the
   GRA.CH file.
   
   TOOLTIP < bcToolTip > is a character string which will display
   as a "Tool Tip" next to the object when the cursor is passed
   over the object. A semi-colon within the text indicates a new
   line.  If < bcToolTip > is a code-block, it must return a character
   string.  NOTE: The Tooltip painting method is run in another
   thread, therefore the codeblock should not run code that points
   to the current work area.  It may however, contain local, public
   or private variables.
   
   CURSOR < nCursor > is an optional mouse pointer to use for this
   object.  System mouse pointers start with XBPWINDOW_POINTERTYPE_
   and are defined in XPB.CH.  The default pointer is
   XBPWINDOW_POINTERTYPE_POINTER.  < nCursor > may also be a resource
   ID that points to a Bit-Map that has been compiled with the
   resource compiler and linked to the .EXE.
   
   COLOR < bncFGc >, < ncBGc > are foreground and background colors.
   They may be character strings representing valid text-based
   colors supported by SetColor() or they may be numeric constants
   which begin with either the prefix GRA_CLR_ or the prefix
   XBPSYSCLR_ as defined in GRA.CH or XBP.CH.  IF < bncFGc > is a
   code block is must return a 2-element array containing a
   foreground and background color.
   
   ID < cId > is a unique identifier for this object.  This ID is used
   with functions like DC_GETORIGUPDATED() to determine the status
   of a get object.
   
   CARGO < xCargo > is any kind of data you wish to to add to the
   :cargo container for this object.  The cargo may be accessed
   at any time via the :cargo exported variable, however it will not
   be stored in the same manner it is entered.  The :cargo container
   of DCDIALOG objects is an array of at least three elements:
   
     [1] - A numeric value that is a pointer to the Getlist array
           for this object.
   
     [2] - A pointer to the GetList array.
   
     [3] - The value of < xCargo >.
   
     [4] and up - optional values added by the GUI reader.
   
   TITLE < cTitle > is a title to assign to this object.  The title
   is not displayed on the screen but is simply a description of the
   get object which is saved in the GetList.
   
   ACCELKEY < anAccel > is a numeric "hot-key" assignment that will set
   focus to the checkbox object when the hot-key is pressed.  The key
   must be a valid key with the prefix xbeK_*.  These keys are
   defined in APPEVENT.CH.  < anAccel > may also be an array of numeric
   values to assign more than one key to the object.
   
   GOTFOCUS < bGotFocus > is a code block that is evaluated when this
   object receives input focus.
   
   LOSTFOCUS < bLostFocus > is a code block that is evaluated when this
   object loses input focus.
   
   TABSTOP will cause the object (Xbase Part) to be set when using
   the Tab key.  Note: When logical groups are defined in a dialog
   using TABGROUP < nTabGroup >, TABSTOP is usually set to .T. (true)
   for the first dialog element in the group.  This allows the first
   dialog element of a group to be activated using the Tab key.
   
   NOTABSTOP will cause the object (Xbase Part) to be ignored when
   using the Tab key. This clause is needed only to override any
   default setting of TabStop by the DCGETOPTIONS [TABSTOP] command.
   
   TABGROUP < nTabGroup > allows objects (Xbase Parts) that are created
   immediately after one another in the GetList to be combined into
   logical groups. This allows the user to navigate within a dialog
   from group to group by pressing the Tab key.  Within a group of
   dialog elements navigation is performed using the cursor keys.
   
   Only constants defined in the XBP.CH file can be used as values
   for this instance variable.  The following table lists the
   available constants:
   
   #define constants for < nTabGroup >:
   
     Constant             Description
   
     XBP_NO_GROUP     *)  Dialog element does not belong to a group
     XBP_BEGIN_GROUP      Dialog element is the first in a group
                          (this begins the definition of the group)
     XBP_WITHIN_GROUP     Dialog element is within a group
     XBP_END_GROUP        Dialog element is the last in a group
                          (this ends the definition of the group)
   
    *) Default value
   
   GROUP < cGroup > is a "group" name (case-sensitive) to assign to
   this GetList object.  Assignment to a group makes it possible to
   perform operations only on GetList items which are members of a
   specified group, using functions such as DC_GetRefresh() or
   DC_ReadGui().
   
   VISIBLE determines whether the object is visible immediately after
   the call to the method :create() . By default the object follows
   the VISIBLE clause of the DCGETOPTIONS command.  Use the
   INVISIBLE clause to override the VISIBLE clause of DCGETOPTIONS
   
   HELPCODE < cHelp > is a character string that is passed to the
   DC_HelpF1() function if F1 is pressed or the HELP button
   is clicked when this GET has focus.  This HELPCODE allows
   the Help system to override the passing of the Procedure and
   Varname for more specific context-help.
   

Description:

    The command @..DC3STATE creates a new 3-State definitiion
    and adds it to the array named GETLIST which is later
    processed by the DC_Read*() functions or by the DCREAD *
    command.  The GETLIST array must be first declared and
    initialized to the value of {}.
   
    The command DCREAD GUI creates the DC_Xbp*() objects and
    activates the edit mode for all definitions found in the
    GetList array.
   
    The command DCREAD HTML creates the DC_Html*() objects and
    writes the HTML source code.
   
    A Getlist object remains stored as long as it is referenced
    in an array or by a variable.  The commands CLEAR and
    CLEAR GETS assign an empty array to the GetList variable.
    This also occurs after the completion of the DCREAD command
    if it is called without the SAVE option, causing all Get
    objects referenced by the GetList array to be released.
   
    @..DC3STATE objects can be combined with any objects that
    that use the DCDIALOG system, such as @..DCSAY..GET,
    @..DCRADIO, @..DCPUSHBUTTON or @..DCTABPAGE.
   

Notes:

    The 3-state object created by @ DC3STATE is an object of the
    DC_Xbp3State() class which inherits from Xbp3State(), therefore
    it can be manipulated with any iVar or method supported by
    Xbp3State().
   

Examples:

    #include "dcdialog.ch"
   
    FUNCTION Xtest()
   
    LOCAL GetList := {}, aForSale, nForSale := 0, oMsgBox
   
    aForSale := { 'Not for Sale','For Sale','Not Sure' }
   
    @ 2,2 DC3STATE nForSale PROMPT aForSale ;
      SIZE 12 ;
      TABSTOP ;
      MESSAGE 'Is this article FOR SALE?' INTO oMsgBox ;
      TITLE '3-STATE - For Sale?' ;
      ID 'FOR_SALE'
   
    @ 4,2 DCMESSAGEBOX OBJECT oMsgBox SIZE 20,1
   
    DCREAD GUI FIT ADDBUTTONS
   
    RETURN nil
   

Source/Library:

  DCDIALOG.CH

@ DCAPPCRT

Create an APPLICATION CRT object for displaying with GUI reader

Syntax:

   @ < nRow >,< nCol > DCAPPCRT < oCrt > ;
     [SIZE < nHeight > [,< nWidth >]] ;
     [PARENT < oParent >] ;
     [PARENTID < cParentId >] ;
     [CAPTION < cCaption >] ;
     [BORDER < nB >] ;
     [FONT < bocFont >] ;
     [FONTSIZE < nFW >,< nFH >] ;
     [ACTION < bAction >] ;
     [COLOR < bncFgC > [,< ncBgC >] ] ;
     [CARGO < xCargo >] ;
     [THREAD < oThread >] ;
     [HIDE < bHide >] ;
     [PREEVAL < bPreEval >] ;
     [EVAL < bEval >] ;
     [PIXEL] ;
     [RELATIVE < oRel >]
   

Arguments:

   < nRow >, < nCol > are the coordinates on the screen.
   Coordinates are always relative to position 0,0 ie. Top,Left
   of the parent object, unless the RELATIVE < oRel > argument is
   used.  If no parent is assigned, then the parent is the Dialog
   box.  IF the PIXEL option is set to .TRUE. in DCGET OPTIONS,
   then the numbers are in pixels otherwise they are in standard
   text-based coordinates.  You can also force the pixel mode by
   including PIXEL as a command argument.
   
   < oCrt > is a local memory variable that will be used to store
   the reference to the CRT object.
   
   SIZE < nHeight > ,< nWidth > are the number of rows and
   columns.  The default is 25 rows by 80 columns.
   
   PARENT < oParent > is the name of the variable that was
   assigned to the parent TABPAGE or GROUP for this CRT Object.
   Only  use this command if you are placing this Browse onto
   another dialogue object.  If this argument is not passed then
   the parent will be the object set with the DCSETPARENT command. .
   
   PARENTID < cParentID > may be used in lieu of the PARENT < oParent >
   clause.  This identifies the ID of the parent instead of the
   parent's object variable name.
   
   CAPTION < cCaption > is the title to display in the title
   line of the CRT window.
   
   BORDER < nB > defines the border type of a CRT window. Constants
   defined in the XBP.CH file can be assigned to this instance
   variable. The following table shows the valid #define constants
   for BORDER .
   
   Constants for border types
   
    Constant                           Description
    --------------------------         ---------------------------
    XBPDLG_NO_BORDER                    No border
    XBPDLG_SIZEBORDER                   Window is sizeable
    XBPDLG_THINBORDER               *)  Thin border, window size
                                        can not be changed
    XBPDLG_DLGBORDER                    Thick border, window size
                                        can not be changed
    XBPDLG_RAISEDBORDERTHICK       **)  Thick, raised border
   
    XBPDLG_RAISEDBORDERTHIN         *)  Thin, raised border
    XBPDLG_RECESSEDBORDERTHICK          Thick, recessed border
    XBPDLG_RECESSEDBORDERTHIN       *)  Thin, recessed border
    XBPDLG_RAISEDBORDERTHICK_FIXED      Thick, raised border,
                                        size can not be changed
    XBPDLG_RAISEDBORDERTHIN_FIXED   *)  Thin, raised border,
                                        size can not be changed
   
    XBPDLG_RECESSEDBORDERTHICK_FIXED    Thick, recessed border,
                                        size can not be changed
    XBPDLG_RECESSEDBORDERTHIN_FIXED *)  Thin, recessed border,
                                        size can not be changed
   
   *) not supported by Windows    **) Default border
   
   FONT < cFont > sets the font for the text based display of
   characters in the CRT window. < cFont > is a character expression
   specifying the name of the font. The default value is
   "Alaska CRT". It may also be a font object or a code block
   that returns a character string or a font object to later
   refresh with DC_GetRefresh().
   
   If the requested font is not available, the font that provides
   the "best fit" is installed.
   
   FONTSIZE < nFW >,< nFH > is the Width and Height of the font.
   
   < nFW > sets the width of characters output in text mode (such as
   output by QOut() or @... SAY). The default value is 8.  The font
   width multiplied by the number of columns :maxCol+1 determines the
   width of the CRT window on the screen. The calculation is
   < nFW > * (:maxCol+1) == :xSize . The translation of text mode column
   coordinates to graphic x coordinates is done using < nFW >.
   
   < nFH > is used to set the font height for characters output in the
   text mode (such as output by QOut() or @... SAY). The default
   value is 16. The font height is multiplied by the number of
   rows :maxRow+1 to determine the height of the CRT window on the
   screen. The calculation used is  < nFH > * (:maxRow + 1) == :ySize.
   Translating row coordinates in the text mode to graphic y
   coordinates is also performed using < nFH >.
   
   NOTE: < nFW > and < nFH > are used to select a font with the
   corresponding character width and height.  This is done by the
   methods :create() and :configure() . If the corresponding font is
   not available, the font that provides the "best fit" is installed.
   
   ACTION < bAction > is the program to run in the CRT window when
   it is brought into focus.  If the program is to be run in
   another thread, then the THREAD < oThread > option must be used
   to start the application immediately in a new thread. < oThread >
   is the name of a local variable to store a reference to the
   thread object.
   
   COLOR < bncFgC >,< ncBgC >] is a default color to clear the CRT
   application screen.  The color string must conform to the colors
   supported by SetColor().
   
   CARGO < xCargo > is any kind of data you wish to to add to the
   :cargo container for this object.  The cargo may be accessed
   at any time via the < oCrt >:cargo exported variable, however
   it will not be stored in the same manner it is entered.  The
   :cargo container of DCDIALOG objects is an array of at least
   two elements:
   
    [1] - A numeric value that is a pointer to the Getlist array
          for this object.
   
    [2] - The value of < xCargo >.
   
    [3] and up - optional values added by the GUI reader.
   
   PREEVAL < bPreEval > is a code block to be evaluated by the GUI
   reader before the Xbase Parts object is created.  The object is
   passed to the code block.
   
   EVAL < bEval > is a code block to be evaluated by the GUI reader
   after the Xbase Parts object is created.  The object is passed
   to the code block.
   
   RELATIVE < oRel > is an optional object in the Getlist which
   determines the start coordinates of this object.  If this
   option is used, then the < nRow >, < nCol > coordinates are
   relative to the starting coordinates of < oRel > rather than
   the parent object.
   
   ID < cId > is a unique identifier for this object.  This ID is used
   with functions like DC_GETORIGUPDATED() to determine the status
   of a get object.
   
   HIDE < bHide > is a code block that is evaluated in the event loop.
   This code block must return a logical value.  If the value
   returned is .TRUE. then the object will be hidden from view.  If
   the value returned is .FALSE. then the object will be displayed.
   

Description:

    The command @..DCAPPCRT creates a new Application CRT object
    and adds the object to the array named GETLIST which is later
    processed by the DC_READGUI() function or by the DCREAD GUI
    command.  The GETLIST array must be first declared and
    initialized to the value of {}.  The command DCREAD GUI activates
    the edit mode for all objects found in the GetList array.
    A Getlist object remains stored as long as it is referenced
    in an array or by a variable.  The commands CLEAR and
    CLEAR GETS assign an empty array to the GetList variable.
    This also occurs after the completion of the DCREAD command
    if it is called without the SAVE option, causing all Get
    objects referenced by the GetList array to be released.
   
    A DCAPPCRT object is based on the XbpCrt class which is the GUI
    dialog used for applications partially programmed in text mode.
    An XbpCrt object provides a dialog window for text based and
    graphic oriented screen output.  Using XbpCrt objects,
    applications programmed for text mode can be transitioned into
    pure PM applications in a stepwise. manner.  An XbpCrt object
    can display text output using functions such as QOut() or
    DispOut() and can display Get data entry fields
    (command @... SAY... GET).  They can also include graphic dialog
    elements such as those provided by objects of the XbpPushButton
    and XbpMLE classes.  XbpCrt objects create what are called
    "hybrid" applications because they combine text and graphic
    oriented screen output.
   
    The DCAPPCRT object offers a straightforward way to transition
    existing text mode applications into GUI applications which use
    the eXPress++ dialog system.  An existing CA-Clipper application
    can run in an XbpCrt window after being compiled with Xbase++.
    The program code can be changed to use Xbase Parts that provide
    graphic dialog elements step by step as time permits.
   
    @..DCAPPCRT objects can be combined with any objects that
    that use the DCDIALOG system, such as @..DCSAY..GET,
    @..DCRADIO, @..DCPUSHBUTTON or @..DCMULTILINE.
   

Notes:

    The browse object created by @ DCAPPCRT is an object of the
    XbpCrt() class, therefore it can be manipulated with
    any iVar or method supported by XbpCrt().
   

Source/Library:

  DCDIALOG.CH

@ DCBROWSE

Create a BROWSE object for displaying with GUI reader

Syntax:

   @ < nRow >, < nCol > DCBROWSE < oBrowse > ;
       [DATA < xData > [ELEMENT < nElement >] ] ;
       [ALIAS < cAlias >] ;
       [SIZE < nWidth > [,< nHeight >]] ;
       [PARENT < oParent >] ;
       [PARENTID < cParentId >] ;
       [INTO < aVar >] ;
     * [POINTER < nVar >] ;
     * [DATALINK < bLink >] ;
     * [PRESENTATION < aPres >] ;
     * [CURSORMODE < nCursorMode >] ;
       [COLOR < bncFgC > [,< ncBgC >] ] ;
       [CARGO < xCargo >] ;
     * [PIXEL] ;
       [MESSAGE < bcMsg > [INTO < oMsgBox >]] ;
       [HIDE < bHide >] ;
       [WHEN < bWhen >] ;
     * [RBSELECT] ;
       [PREEVAL < bPreEval >] ;
       [EVAL < bEval >] ;
       [FONT < bocFont >] ;
     * [EDIT < nEditEvent > ;
          [ MODE < nEditMode >] ;
          [ ACTION < bEditAction >] ;
          [ EXIT < bEditExit > ] ] ;
     * [INSERT < nInsertEvent > ;
          [ INSMODE < nInsMode > ] ;
          [ DEFAULT < abDefault >] ;
          [ ACTION < bInsertAction >] ;
          [ EXIT < bInserExit >] ] ;
          [ APPEND < nAppendEvent >] [ APPMODE < nAppMode > ] ];
     * [DELETE < nDeleteEvent > ;
          [ ACTION < bDeleteAction >] ;
          [ EXIT < bDeleteExit > ] ] ;
     * [HANDLER < handler > [REFERENCE < xRef >]] ;
       [RELATIVE < oRel >] ;
     * [ITEMMARKED < bItemMarked >] ;
     * [ITEMSELECTED < bItemSelected >] ;
     * [MARK < nbMark >] ;
     * [MKCOLOR < nbMarkEval >, < nMFgC > [,< nMBgC >] ] ;
       [ID < cId >] ;
     * [FREEZELEFT < aColLeft >  ;
     * [FREEZERIGHT < aColRight >] ;
     * [ACCELKEY < nKey >] ;
     * [GOTFOCUS < bGotFocus >] ;
     * [LOSTFOCUS < bLostFocus >] ;
     * [TABSTOP] ;
     * [NOTABSTOP];
     * [TABGROUP < nTabGroup >] ;
     * [VISIBLE] ;
     * [INVISIBLE] ;
       [SCOPE] ;
     * [THUMBLOCK < nRecords >] ;
     * [NOVSCROLL] ;
     * [NOHSCROLL] ;
     * [NOSOFTTRACK] ;
     * [NOSIZECOLS] ;
       [GROUP < cGroup >] ;
     * [HEADLINES < nHeaderLines > [DELIMITER < cHeadDelim >]] ;
     * [FOOTLINES < nFooterLines > [DELIMITER < cFootDelim >]] ;
     * [FIT] ;
     * [OPTIMIZE] ;
       [TITLE < cTitle >] ;
     * [AUTOREFRESH < nTimer >] ;
       [SORTSCOLOR < anSortedColorFG > [,< anSortedColorBG >] ];
       [SORTUCOLOR < anUnSortedColorFG > [,< anUnSortedColorBG >] ] ;
       [SORTUPBITMAP < nBitmapSortUp >] ;
       [SORTDOWNBITMAP < nBitmapSortDown >] ;
       [DESCENDING]
   

Arguments:

   GUI applications:
   
   < nRow >, < nCol > are the coordinates on the screen.
   Coordinates are always relative to position 0,0 ie. Top,Left
   of the parent object, unless the RELATIVE < oRel > argument is
   used.  If no parent is assigned, then the parent is the Dialog
   box.  IF the PIXEL option is set to .TRUE. in DCGETOPTIONS,
   then the numbers are in pixels otherwise they are in standard
   text-based coordinates.  You can also force the pixel mode by
   including PIXEL as a command argument.
   
   HTML applications:
   
   < nRow > and < nCol > are the row number and column number of
   the table if the parent of this object is a DCTABLE. The
   text will be inserted in the cell of the table defined by
   the row/column.
   
   < oBrowse > is the name of the variable to assign as a storage
   place for this object.
   
   RELATIVE < oRel > is an optional object in the Getlist which
   determines the start coordinates of this object.  If this
   option is used, then the < nSrow >, < nSCol > coordinates are
   relative to the starting coordinates of < oRel > rather than
   the parent object.
   
   ALIAS < cAlias > defines the browse as a database browse. < cAlias)
   is a variable containing the alias of the database to browse.
   
     or
   
   DATA < aData > defines the browse as an array browse.  < aData > is
   a variable containing a pointer to the array to browse.  ELEMENT
   < nElement > is an optional clause defining the selected element of
   < aData >.  CAUTION: If a new array pointer is created that points
   to a different array, then DC_GetBrowArray() must be used to
   update the array pointer in the browse object.
   
   SIZE < nWidth >,< nHeight > is the width and height of the
   prompt.  If the PIXEL option is set to .TRUE. in DCGETOPTIONS,
   then the numbers are in pixels otherwise they are in standard
   text-based numbers.
   
   INTO < aVar > is a memory variable to store a sub-array. This clause
   is used only when browsing arrays.  Each time the user clicks on
   a new row of the array browse, the sub-array selected will be
   stored in < aVar >.  < aVar > must be initialized to an array.
   
   POINTER < nVar > is a memory variable to store the current array
   element pointer. This clause  is used only when browsing arrays.
   Each time the user clicks on a new row of the array browse, the
   browse row (element number) will be stored in < nVar >.  < nVar >
   must be initialized to a numeric value.
   
   PARENT < oParent > is the name of the variable that was assigned to
   the parent object for this object.  Only use this clause if you
   are placing this object onto another dialogue object.  If this
   argument is not passed then the parent will be the object set
   with the DCSETPARENT command.
   
   PARENTID < cParentID > may be used in lieu of the PARENT < oParent >
   clause.  This identifies the ID of the parent instead of the
   parent's object variable name.
   
   DATALINK < bDataLink > is an optional code block to evaluate
   whenever the user double-clicks the mouse or presses the ENTER key
   within the browse area.  The browse object is passed as a
   parameter to the code block.
   
   FONT < cFont > is a character string defining an optional font.
   The font string must conform to the Xbase++ standard, ie.
   "10.Courier.Bold". It may also be a font object or a code block
   that returns a character string or a font object to later
   refresh with DC_GetRefresh().
   
   EDIT < nEditEvent > is an optional clause that enables "cell-editing"
   of the browse cells whenever a specified event occurs that is
   associated with the browse object.  < nEditEvent > is a numeric
   value equivalent to an xbe* event or keyboard value which has
   been defined in APPEVENT.CH.  For example, cell editing will
   occur within the selected cell when < nEditEvent > is equal to
   xbeBRW_ItemSelected and the cell is selected with a mouse
   double-click or the ENTER key is pressed.  MODE < nEditMode > is
   the navigation mode within the cells.  < nEditMode > is a numeric
   value from the following table:
   
     < nEditMode >                 Description
     -----------                 ------------------------------------
     DCGUI_BROWSE_EDITEXIT       Exit cell editing after ENTER key
   
     DCGUI_BROWSE_EDITACROSS     Move to next column after ENTER key
   
     DCGUI_BROWSE_EDITDOWN       Move to next row after ENTER key
   
     DCGUI_BROWSE_EDITACROSSDOWN Move to next column after ENTER key
                                 and move to next row at end of column
   
     DCGUI_BROWSE_EDITACROSSDOWN_APPEND
                                 Move to next column after ENTER key
                                 and move to next row at end of column
                                 Pressing ENTER at last row/last column
                                 appends new element.  Pressing DOWN
                                 arrow key at last row appends new
                                 element.
   
   < bEditAction > is an optional code block that is evaluated before
   the cells are edited.  < bEditExit > is an optional code block that
   is evaluated after the cells are edited.  The browse object is
   passed as a parameter to < bEditAction > and < bEditExit >.
   
   INSERT < nInsertEvent > is an optional clause that enables the
   inserting of an element into the array and editing the cell
   items. < nInsertEvent > is a numeric value equivalent to an xbe*
   event or keyboard value which has been defined in APPEVENT.CH.
   For example, cell insertion will occur at the selected row of
   the browse when < nEditEvent > is equal to xbeK_INS and the browse
   is in focus and the INSERT key is pressed.  < bInsertAction > is an
   optional code block that is evaluated before a new element is
   inserted in the array.  < bInsertExit > is an optional code block
   that is evaluated after exiting the cell editor.  The Browse
   Object is passed as a parameter when evaluating < bInsertAction >
   and < bInsertExit >.  INSMODE < nInsMode > is an additional optional
   clause that can only be used with the INSERT clause.  < nInsMode >
   determines the behavior of insert mode.
   
     < nInsMode >             Description
     -----------            ------------------------------------
     DCGUI_BROWSE_SUBMODE_1 Up/Down arrow keys are ignored.
                            Enter key on last column exits insert.
   
     DCGUI_BROWSE_SUBMODE_2 Up/Down arrow key will move to previous
                            or next row respectively.  If down arrow
                            pressed in last row, will append new
                            element.
   
   APPEND < nAppendEvent > is an additional optional clause that can
   only be used with the INSERT clause.  < nAppendEvent > is a numeric
   value equivalent to an xbe* event or keyboard value. This event
   forces the insertion of the new element at the end of the array
   rather than at the selected row.  APPMODE < nAppMode > is an
   additional optional clause that can only be used with the APPEND
   clause.  < nAppMode > determines the behavior of append mode.
   
     < nAppMode >             Description
     -----------            ------------------------------------
     DCGUI_BROWSE_SUBMODE_1 Up/Down arrow keys are ignored.
                            Enter key on last column exits append.
   
     DCGUI_BROWSE_SUBMODE_2 Up/Down arrow key will move to previous
                            or next row respectively.  If down arrow
                            pressed in last row, will append new
                            element.
   
   
   DELETE < nDeleteEvent > is an optional clause that enables the
   deleting the current selected element (row) of an array or the
   currently selected record. < nDeleteEvent > is a numeric value
   equivalent to an xbe* event or keyboard value which has been
   defined in APPEVENT.CH.  For example, cell deletion will occur
   at the selected row of the browse when < nEditEvent > is equal to
   xbeK_DEL and the browse is in focus and the DELETE key is pressed.
   < bDeleteAction > is an optional code-block that is evaluated before
   the element is deleted.  < bDeleteExit > is an optional code block
   that is evaluated after the element is deleted.  The Browse Object
   is passed as a parameter when evaluating < bDeleteAction > and
   < bDeleteExit >.
   
   HANDLER < cEventHandler > is the name of a Function which points
   to a custom event handler.  The cell editor uses it's own, default
   event handler to manage the objects during the running of the
   program.  The default event handler makes a call to the
   custom event handler before processing it's default events.
   The custom event handler uses Appevent() to get information
   on the current event and passes the following parameters:
   
     1. nEvent   - The event type.
     2. mp1      - The first event parameter.
     3. mp2      - The second event parameter.
     4. oXbp     - A pointer to the object creating the event.
     5. oDlg     - A pointer to the main dialogue object.
     6. aGetlist - A pointer to the GetList array.
     7. aRef     - A pointer to an optional Reference array.
   
     The Function should look like this:
   
     STATIC FUNCTION MyHandler ( nEvent, mp1, mp2, oXbp, oDlg,
                                 aGetlist, aRef )
   
     /* custom code */
   
     RETURN DCGUI_NONE
   
    The function must return a numeric value which controls the
    behavior of the event loop as follows:
   
     Return Value   Behavior
     ------------   --------------------------------------------
     DCGUI_NONE     Continue processing the event
     DCGUI_IGNORE   Ignore event
     DCGUI_CLEAR    Ignore event and clear all events from queue
     DCGUI_EXIT     Exit the Cell editor
   
   REFERENCE < aRef > is any array to pass to the custom event handler.
   Programming dialogue systems that must manipulate many variables
   is much simpler if all the variables are placed into a single
   array and then passed to the dialogue system and its event
   handler.
   
   PRESENTATION < aPres > is a two-dimensional array. If specified,
   this contains presentation parameters for the Browse object.
   The first column of the array must contain #define constants
   from the XBP.CH file starting with the prefix XBP_PP_. These
   constants define the presentation parameters that can be set
   for the object and include colors and fonts. The second column
   of the array in < aPres > contains the value for each setting.
   these are also generally set using #define constants from the
   GRA.CH file.
   
   CURSORMODE < nCursorMode > determines the browse cursor to be
   displayed by the Browse object. #define constants from XBP.CH
   must be used for this mode:
   
     Constant            Description
   
     XBPBRW_CURSOR_NONE  No visible cursor
     XBPBRW_CURSOR_CELL  Cell cursor (default)
     XBPBRW_CURSOR_ROW   Row cursor
   
   PREEVAL < bPreEval > is a code block to be evaluated by the GUI
   reader before the Xbase Parts object is created.  The object is
   passed to the code block.
   
   EVAL < bEval > is a code block to be evaluated by the GUI reader
   after the Xbase Parts object is created.  The object is passed
   to the code block.
   
   CARGO < xCargo > is any kind of data you wish to to add to the
   :cargo container for this object.  The cargo may be accessed
   at any time via the :cargo exported variable, however it will not
   be stored in the same manner it is entered.  The :cargo container
   of DCDIALOG objects is an array of at least three elements:
   
     [1] - A numeric value that is a pointer to the Getlist array
           for this object.
   
     [2] - A pointer to the GetList array.
   
     [3] - The value of < xCargo >.
   
     [4] and up - optional values added by the GUI reader.
   
   COLOR < bncFGc >, < ncBGc > are foreground and background colors.
   They may be character strings representing valid text-based
   colors supported by SetColor() or they may be numeric constants
   which begin with either the prefix GRA_CLR_ or the prefix
   XBPSYSCLR_ as defined in GRA.CH or XBP.CH. IF < bncFGc > is a
   code block is must return a 2-element array containing a
   foreground and background color.
   
   ITEMMARKED < bItemMarked > is a code block to evaluate when a data
   row or a cell is highlighted in the browser.  The code block
   must be formatted as {| aRowCol, uNIL2, self | ... } where
   < aRowCol > is a two-element array { nRowPos, nColPos } which
   indicates the row and column position of the cell that is
   clicked with the left mouse button.
   
   ITEMSELECTED < bItemSelected > is a code block to evaluate when
   a data row is selected with a double-click of the left mouse
   button or by pressing the ENTER key in the browser.  The code
   block must be formatted as {| uNIL1, uNIL2, self | ... }.
   
   MARK < nbMark > is a numeric value or a code block.  A numeric
   value is used to point to the array sub-element which contains
   a logical value.  When the mouse is double-clicked in a browse
   column (item selected), the value in the sub-element is toggled
   between .TRUE. and .FALSE.  IF a code block is entered, then
   a double-click will evaluate the code block.  For example a
   code block can be used to toggle the value of a logical field
   in the selected record.
   
   MKCOLOR < nbMarkEval > is an optional code block to evaluate
   to display "marked" records or array elements.  This code block
   must return a LOGICAL value.  When the value returned is .TRUE.,
   the color of the entire row (all columns) is set to the < ncMFgC >
   and < ncMBgC > colors.  When the value returned is .FALSE., each
   column in the row is displayed in the color established for that
   individual row.
   
   < ncMFgC >, < ncMBgC > are foreground and background colors that
   are selected when < nbMarkEval > evaluates .TRUE.  They may be
   character strings representing valid text-based colors supported
   by SetColor() or they may be numeric constants which begin with
   either the prefix GRA_CLR_ or the prefix XBPSYSCLR_ as defined
   in GRA.CH or XBP.CH.
   
   ID < cId > is a unique identifier for this object.  This ID is used
   with functions like DC_GETORIGUPDATED() to determine the status
   of a get object.
   
   FREEZELEFT < aColsLeft > is an array of numeric values equal to
   the position of the columns in the browse which should be frozen
   at the left side of the browse window and prevented from
   scrolling off the screen.
   
   FREEZERIGHT < aColsRight > is an array of numeric values equal to
   the position of the columns in the browse which should be frozen
   at the right side of the browse window and prevented from
   scrolling off the screen.
   
   MESSAGE < bcMsg > is the message you want to display in the
   message area of the dialogue screen defined by the DCMESSAGEBOX
   command when the object is in focus.  Optionally, INTO < oMsgBox >
   will designate which message box to display the message into.
   If the INTO clause is not used, then the last message box in the
   GetList is the default.  If < bcMsg > is a code-block, it must
   return a character string.
   
   HIDE < bHide > is a code block that is evaluated in the event loop.
   This code block must return a logical value.  If the value
   returned is .TRUE. then the object will be hidden from view.  If
   the value returned is .FALSE. then the object will be displayed.
   
   WHEN < bWhen > is a code block that is evaluated in the event loop.
   This code block must return a logical value.  If the value
   returned is .FALSE. then the object will be disabled and grayed.
   If the value returned is .TRUE. then the object will be enabled.
   
   RBSELECT will cause the right button of the mouse to select a
   browse cell in the same manner as the left button.
   
   ACCELKEY < anAccel > is a numeric "hot-key" assignment that will set
   focus to the checkbox object when the hot-key is pressed.  The key
   must be a valid key with the prefix xbeK_*.  These keys are
   defined in APPEVENT.CH.  < anAccel > may also be an array of numeric
   values to assign more than one key to the object.
   
   GOTFOCUS < bGotFocus > is a code block that is evaluated when this
   object receives input focus.  < bGotFocus > := {|uNIL1,uNIL2,self|...}
   
   LOSTFOCUS < bLostFocus > is a code block that is evaluated when this
   object loses input focus. < bLostFocus > := {|uNIL1,uNIL2,self|...}
   
   TABSTOP will cause the object (Xbase Part) to be set when using
   the Tab key.  Note: When logical groups are defined in a dialog
   using TABGROUP < nTabGroup >, TABSTOP is usually set to .T. (true)
   for the first dialog element in the group.  This allows the first
   dialog element of a group to be activated using the Tab key.
   
   NOTABSTOP will cause the object (Xbase Part) to be ignored when
   using the Tab key. This clause is needed only to override any
   default setting of TabStop by the DCGETOPTIONS [TABSTOP] command.
   
   TABGROUP < nTabGroup > allows objects (Xbase Parts) that are created
   immediately after one another in the GetList to be combined into
   logical groups. This allows the user to navigate within a dialog
   from group to group by pressing the Tab key.  Within a group of
   dialog elements navigation is performed using the cursor keys.
   
   Only constants defined in the XBP.CH file can be used as values
   for this instance variable.  The following table lists the
   available constants:
   
    #define constants for < nTabGroup >:
   
     Constant             Description
   
     XBP_NO_GROUP     *)  Dialog element does not belong to a group
     XBP_BEGIN_GROUP      Dialog element is the first in a group
                          (this begins the definition of the group)
     XBP_WITHIN_GROUP     Dialog element is within a group
     XBP_END_GROUP        Dialog element is the last in a group
                          (this ends the definition of the group)
   
    *) Default value
   
   SCOPE is an optional argument that enables the browse to display only
   the records that adhere to a previous scope that has been set by
   DC_SetScope().  This feature utilizes the functions DC_dbGoTop(),
   DC_dbGoBottom(), DC_dbSkipper(), DC_KeyCount() and DC_KeyNo() in the
   navigation code blocks of the browse to stay in scope.  In addition, the
   vertical scrollbar will accurately show the record position within the
   current scope.
   
   If this argument is not used, the browse will utilize dbGoTop(),
   dbGoBottom(), dbSkipper(), OrdKeyNo() and a modified RecCount() in the
   navigation code blocks of the browse.  These functions will disregard any
   previous settings of DC_SetScope().  Additional filtering must be
   accomplished by using SET FILTER or conditional indexes.
   
   Note: When using the DBFNTX, DBFCDX or FOXCDX drivers,the eXPress++ scoping
   system can slow performance therefore it is recommended that you do not use
   it on large databases unless you also use the THUMBLOCK clause.  The
   eXPress++ scoping system has been designed for optimization, however, when
   using third-party DBE's such as COMIX and Advantage Server and will
   automatically detect that these drivers are being used.  SCOPE also utilizes
   the percentage method for determining the position of the scrollbar thumb by
   using the DC_KeyNo() and DC_KeyCount() functions. If the database contains
   more than 32000 records the thumb is scaled to compensate for the limitation
   of the XbpScrollbar class to only 32k positions. DC_KeyNo() is enabled with
   DC_KeyStat(.T.).
   
   NOTE: If DC_KeyStat() is set to .FALSE. or a Filter is set on the
         database, DC_KeyCount() will return a -1 thereby causing
         the vertical scrollbar thumb to occupy the entire scroll
         area.  It is not possible to determine the key count
         when a filter is set.
   
   THUMBLOCK < nRecords > should be used on very large databases which are
   indexed or on databases that have a filter. This option forces the
   thumb to remain locked in the middle of the vertical scrollbar region
   to prevent the user from forcing a skip request that can take a very
   long time or to move to an incorrect record when a filter is set on
   the database.  If the database contains more than < nRecords > the
   thumb will be locked however the user may still click above and below
   the thumb for page up/page down respectively.  The default is 32,000
   records.  NOTE: THUMBLOCK is ignored if the SCOPE clause is not used.
   
   NOVSCROLL will suppress the vertical scroll bar.
   
   NOHSCROLL will suppress the horizontal scroll bar.
   
   NOSOFTTRACK will force movement of the scroll bars to automatically refresh
   the browse while the bar is moving.
   
   NOSIZECOLS will prevent the user from sizing columns.
   
   VISIBLE determines whether the object is visible immediately after
   the call to the method :create() . By default the object follows
   the VISIBLE clause of the DCGETOPTIONS command.  Use the
   INVISIBLE clause to override the VISIBLE clause of DCGETOPTIONS
   
   GROUP < cGroup > is a "group" name (case-sensitive) to assign to
   this GetList object.  Assignment to a group makes it possible to
   perform operations only on GetList items which are members of a
   specified group, using functions such as DC_GetRefresh() or
   DC_ReadGui().
   
   HEADLINES < nHeaderLines > is the number of lines (rows) to use
   in the column headers.  The default is 1.  DELIMITER < cHeadDelim >
   is the delimiter character(s) which are used to denote the start
   of a new line in the HEADER clause of DCBROWSECOL.  The default
   delimiter is a semi-colon.
   
    Example: DCBROWSECOL HEADER 'Street Address;City/State'
   
   FOOTLINES < nFooterLines > is the number of lines (rows) to use
   in the column footers.  The default is 1.  DELIMITER < cFootDelim >
   is the delimiter character(s) which are used to denote the start
   of a new line in the FOOTER clause of DCBROWSECOL.  The default
   delimiter is a semi-colon.
   
   FIT will automatically size the WIDTH of the browse to the sum
   of the widths of all the columns.  CAUTION: this clause only
   overrides the browse width, not the height.  The SIZE clause must
   still be used to set the browse height and width or a runtime error
   will occur.
   
   OPTIMIZE will enable a double-click in the header column to
   resize the column to the optimum width so all items will fit in
   the column with no truncated items.  The OPTIMIZE clause will
   only work when browsing an array.
   
   TITLE < cTitle > is a title to assign to this object.  The title
   is not displayed on the screen but is simply a description of the
   get object which is saved in the GetList.
   
   AUTOREFRESH < nTimer > is used to set a timer event that automatically
   refreshes the browse window (when it is visible) every
   < nTimer >/100 seconds.
   
   SORTSCOLOR < anSortedColorFG > [,< anSortedColorBG >] is used to set
   the color of the column heading that is chosen as the controlling
   sort order when click the mouse in the column heading.  See the
   SORT clause of DCBROWSECOL.
   
   SORTUCOLOR < anUnSortedColorFG > [,< anUnSortedColorBG >] is used to
   set the color of the column headings that are not the controlling
   sort order.
   
   SORTUPBITMAP < nBitmapSortUp > is used to set the bitmap that is used
   in the column header of the sorted column when the controlling
   order is "ascending".
   
   SORTDOWNBITMAP < nBitmapSortDown > is used to set the bitmap that is used
   in the column header of the sorted column when the controlling
   order is "descending".
   
   DESCENDING is used to set the controlling sort order to descending.
   
   NOTE: The function DC_BrowseSort() is used to set the defaults
         for the SORT* clauses.
   

Description:

    The command @..DCBROWSE creates a new Browse definition and
    adds it to the array named GETLIST which is later processed
    by the DC_Read*() functions or by the DCREAD * commands.
    The GETLIST array must be first declared and initialized to
    the value of {}.
   
    The command DCREAD GUI creates the DC_Xbp*() objects and
    activates the edit mode for all definitions found in the
    GetList array.
   
    The command DCREAD HTML creates the DC_Html*() objects and
    writes the HTML source code.
   
    A Getlist object remains stored as long as it is referenced
    in an array or by a variable.  The commands CLEAR and
    CLEAR GETS assign an empty array to the GetList variable.
    This also occurs after the completion of the DCREAD command
    if it is called without the SAVE option, causing all Get
    objects referenced by the GetList array to be released.
   
    A DCBROWSE object is a parent to DCBROWSECOL objects (the
    columns of the browse).  DCBROWSE is used to browse either
    arrays or databases.
   
    @..DCSAY..GET objects can be combined with any objects that
    that use the DCDIALOG system, such as @..DCCHECKBOX,
    @..DCRADIO, @..DCBUTTON, @..DCTABPAGE, @..DCTABLE or @..DCHTML*.
   

Notes:

   Gui Applications :
   
   The browse object created by @ DCBROWSE is an object of the
   DC_XbpBrowse() class which inherits from the XbpBrowse()
   class, therefore it can be manipulated with any iVar or
   method supported by XbpBrowse().
   
   The browse navigation system for arrays looks like this.
   
     oXbp:skipBlock     := {|n,o| SkipArray( n, o:cargo ) }
     oXbp:goTopBlock    := {|o| o:cargo[4] := 1 }
     oXbp:goBottomBlock := {|o| o:cargo[4] := Len( o:cargo[5] ) }
     oXbp:posBlock      := {|o| o:cargo[4] }
     oXbp:phyPosBlock   := {|o| o:cargo[4] }
     oXbp:lastPosBlock  := {|o| Len( o:cargo[5] ) }
     oXbp:firstPosBlock := {|| 1 }
   
   
   The :cargo instance variable contains an array of pointers,
   VALID, HIDE, WHEN and FREEZE information.  When installing a custom
   "skipper" system, use :cargo[3] as a complete cargo sub-system.
   
   Here is the standard CARGO convention for all objects created by
   DC_ReadGUI():
   
   :cargo[1] is a pointer to the GetList number
   :cargo[2] is a pointer to the Getlist array
   :cargo[3] is USER-DEFINED cargo
   :cargo[4] and up are reserved.
   
   All custom skipper methods should use pointers in cargo[3].  A
   custom skipper system would be installed after the objects were
   created by DC_ReadGUI().  This can be accomplished by using the
   EVAL clause in the DCREAD GUI command to call a user-defined
   function.
   
   Example:
   
     oXbp:cargo[3]      := Array(2)
     oXbp:skipBlock     := {|n,o| MySkipArray( n, o:cargo ) }
     oXbp:goTopBlock    := {|o| o:cargo[3,1] := 1 }
     oXbp:goBottomBlock := {|o| o:cargo[3,1] := Len( o:cargo[3,2] ) }
     oXbp:posBlock      := {|o| o:cargo[3,1] }
     oXbp:phyPosBlock   := {|o| o:cargo[3,1] }
     oXbp:lastPosBlock  := {|o| Len( o:cargo[3,2] ) }
     oXbp:firstPosBlock := {|| 1 }
   
   /* ---------------------- */
   
   STATIC FUNCTION MySkipArray( nWantSkip, aCargo )
   
   LOCAL nDidSkip, nLastRec := Len( aCargo[3,2] )
   
      IF aCargo[3,1] + nWantSkip <þ 1              // "BoF"
         nDidSkip := 1 - aCargo[3,1]
      ELSEIF aCargo[3,1] + nWantSkip þ> nLastRec   // "EoF"
         nDidSkip := nLastRec - aCargo[3,1]
      ELSE
         nDidSkip := nWantSkip
      ENDIF
      aCargo[3,1] += nDidSkip
   
   RETURN nDidSkip
   
   /* ------------------------- */
   
   CAUTION:  When overloading the Skipper system, you must also
             overload the :itemSelected instance variable.  The
             default codeblock for :itemSelected refers to array
             elements in :cargo which have been previously set-up
             to work with the default Skipper.  If the :cargo array
             is modified, then a double-click on a browse column
             will cause a runtime error.
   
   ------------------------------
   
   HTML Applications :
   
   The browse object created by @ DCBROWSE is an object of the
   DC_HtmlBrowse() class.
   

Examples:

    /*
    This example demonstrates both a database browse and an
    array browse in the same dialogue screen.  The database
    browse is on Tab Page 1 and the Array browse (directory
    listing) is on Tab Page 2.
    */
   
    #include "dcdialog.ch"
    #include "xbp.ch"
   
   
    PROCEDURE Xtest()
   
    LOCAL GetList := {}, GetOptions, oTabPage1, oTabPage2, ;
          oBrowse, cAlias, aDirectory, oDirectory
   
    USE COLLECT NEW SHARED
   
    /* ---- Tab Page #1 ---- */
   
    @ 3,3 DCTABPAGE oTabPage1 CAPTION 'Browse' ;
      SIZE 60,12
   
    cAlias := "COLLECT"
   
    @ 2,2 DCBROWSE oBrowse PARENT oTabPage1  ;
          DATA cAlias SIZE 55,9 FREEZELEFT { 1, 2 }
   
    DCBROWSECOL FIELD COLLECT->descrip ;
      HEADER "Description" PARENT oBrowse
   
    DCBROWSECOL FIELD COLLECT->type ;
      HEADER "Type" PARENT oBrowse
   
    DCBROWSECOL FIELD COLLECT->sub_type ;
      HEADER "SubType" PARENT oBrowse
   
    DCBROWSECOL FIELD COLLECT->location ;
      HEADER "Location" PARENT oBrowse
   
    DCBROWSECOL DATA {|a|a:={'Yes','No','Not Sure'},a[COLLECT->for_sale+1]} ;
      HEADER "For Sale?" PARENT oBrowse
   
    DCBROWSECOL FIELD COLLECT->date_orig ;
      HEADER "Orig Date" PARENT oBrowse
   
    DCBROWSECOL FIELD COLLECT->date_acqu ;
      HEADER "Acqu Date" PARENT oBrowse
   
    DCBROWSECOL FIELD COLLECT->orig_price ;
      HEADER "Acqu Price" PARENT oBrowse
   
    DCBROWSECOL FIELD COLLECT->appr_value ;
      HEADER "Appr Value" PARENT oBrowse
   
    DCBROWSECOL FIELD COLLECT->condition ;
      HEADER "Condition" PARENT oBrowse
   
    DCBROWSECOL DATA {||IIF(COLLECT->original,'Yes','No')} ;
      HEADER "Orig Owner?" PARENT oBrowse
   
   
    /* ---- Tab Page #2 ---- */
   
    @  0,0 DCTABPAGE oTabPage2 CAPTION 'Directory' ;
       RELATIVE oTabPage1
   
    aDirectory := Directory()
   
    @ 2,2 DCBROWSE oDirectory PARENT oTabPage2 ;
          DATA aDirectory SIZE 55,9
   
    DCBROWSECOL ELEMENT 1 HEADER "Name" PARENT oDirectory WIDTH 10
   
    DCBROWSECOL ELEMENT 2 HEADER "Size" PARENT oDirectory WIDTH 8
   
    DCBROWSECOL ELEMENT 3 HEADER "Date" PARENT oDirectory WIDTH 8
   
    DCBROWSECOL ELEMENT 4 HEADER "Time" PARENT oDirectory WIDTH 8
   
    DCREAD GUI ;
      TITLE "My COLLECTION" ;
      FIT ;
      ADDBUTTONS ;
      EVAL {||oBrowse:hide(), oBrowse:show()}
   
    RETURN
   
    /*
    This example demonstrates an array browse with source
    written to HTML.
    */
   
   FUNCTION XTest2()
   
   LOCAL i, j, GetList[0], cHtml, oBrowse, aDir := Directory()
   
   @ 0,0 DCBROWSE oBrowse SIZE 4,10 DATA aDir
   
   DCBROWSECOL ELEMENT 1 HEADER 'File Name' PARENT oBrowse
   DCBROWSECOL ELEMENT 2 HEADER 'File Size' PARENT oBrowse
   DCBROWSECOL ELEMENT 3 HEADER 'File Date' PARENT oBrowse
   DCBROWSECOL ELEMENT 4 HEADER 'File Time' PARENT oBrowse
   
   DCREAD HTML TO cHtml
   MemoWrit('TEST.HTM',cHtml)
   
   RETURN nil
   

Source/Library:

  DCDIALOG.CH

See Also:

   DCBROWSECOL
   dc_getbrowarray()
   dc_browserow()
   dc_htmlbrowse()



@ DCCHECKBOX

Create a CHECKBOX object for displaying with GUI reader

Syntax:

   @ < nGetRow >,< nGetCol > DCCHECKBOX < uVar > ;
     [DELIMVAR < cDelim >] ;
     [PROMPT < bcPrompt >] ;
     [PARENT < oParent >] ;
     [PARENTID < cParentId >] ;
     [DATALINK < bLink >] ;
     [MESSAGE < bcMsg > [INTO < oMsgBox >]] ;
     [COLOR < bncFgC > [,< ncBgC >] ] ;
     [CARGO < xCargo >] ;
     [WHEN < bWhen >] ;
     [HIDE < bHide >] ;
     [EDITPROTECT < bProtect >] ;
     [FONT < bocFont >] ;
     [SIZE < nWidth >,< nHeight >] ;
     [PRESENTATION < aPres >] ;
     [PIXEL] ;
     [TOOLTIP < bcToolTip >] ;
     [OBJECT < oObject >] ;
     [CURSOR < naCursor >] ;
     [PREEVAL < bPreEval >] ;
     [EVAL < bEval,... >] ;
     [RELATIVE < oRel >] ;
     [ID < cId >] ;
     [TITLE < cTitle >] ;
     [ACCELKEY < anAccel >] ;
     [GOTFOCUS < bGotFocus >] ;
     [LOSTFOCUS < bLostFocus >] ;
     [TABSTOP] ;
     [NOTABSTOP] ;
     [TABGROUP < nTabGroup >] ;
     [VISIBLE] ;
     [INVISIBLE] ;
     [GROUP < cGroup >]
   

Arguments:

   GUI applications:
   
   < nRow > and < nCol > are the row and column of the screen.
   Coordinates are always relative to position 0,0 ie. Top,Left
   of the parent object, unless the RELATIVE < oRel > argument is
   used.  If no parent is assigned, then the parent is the Dialog
   box. IF the PIXEL option is set to .TRUE. in DCGETOPTIONS,
   then the numbers are in pixels otherwise they are in standard
   text-based coordinates.  You can also force the pixel
   mode by including PIXEL as a command argument.
   
   HTML applications:
   
   < nRow > and < nCol > are the row number and column number of
   the table if the parent of this object is a DCTABLE. The
   text will be inserted in the cell of the table defined by
   the row/column.
   
   < lVar > is the variable to GET.  This must be a initialized to
   a logical value. It must not be a macro. The < lVar > is
   automatically anchored via a Get-Set codeblock created by
   DC_GetAnchorCB() unless < lVar > is a custom Get-Set code block.
   Macros may be used in a custom Get-Set code block.
   
   OBJECT < oObject > is the variable to use as a container for the
   object after it is created by the GUI reader.
   
   RELATIVE < oRel > is an optional object in the Getlist which
   determines the start coordinates of this object.  If this
   option is used, then the < nSrow >, < nSCol > coordinates are
   relative to the starting coordinates of < oRel > rather than
   the parent object.
   
   DELIMVAR < cDelim > is for text-based screens only and is
   ignored when DC_GUI() is .TRUE.  This is a three character
   sequence to use for the checkbox - the default is (*).
   
   PROMPT < bcPrompt > is the prompt to display immediately to
   the right of the checkbox.  It may be a character string or a
   code block that returns a character string.
   
   SIZE < nWidth >,< nHeight > is the width and height of the
   prompt.  If the PIXEL option is set to .TRUE. in DCGETOPTIONS,
   then the numbers are in pixels otherwise they are in standard
   text-based numbers.
   
   MESSAGE < bcMsg > is the message you want to display in the
   message area of the dialogue screen defined by the DCMESSAGEBOX
   command when the object is in focus.  Optionally, INTO < oMsgBox >
   will designate which message box to display the message into.
   If the INTO clause is not used, then the last message box in the
   GetList is the default. < oMsgBox > may also be any object that
   supports the :setCaption() method.  If < bcMsg > is a code-block,
   it must return a character string.
   
   WHEN < bWhen > is a code block that is evaluated in the event loop.
   This code block must return a logical value.  If the value
   returned is .FALSE. then the object will be disabled and grayed.
   If the value returned is .TRUE. then the object will be enabled.
   The object is passed as a parameter to the code block.
   
   HIDE < bHide > is a code block that is evaluated in the event loop.
   This code block must return a logical value.  If the value
   returned is .TRUE. then the object will be hidden from view.  If
   the value returned is .FALSE. then the object will be displayed.
   The object is passed as a parameter to the code block.
   
   EDITPROTECT < bProtect > is an optional condition tested during the
   execution of the GUI gets by the DCREAD GUI command, before the
   object receives input focus (before it is activated). When the
   condition returns the value .T. (true), the object receives the
   input focus.  Otherwise, it is skipped. < bProtect > is a code
   block that must return a logical value when evaluated. The code
   block is evaluated prior to the object receiving input focus.
   This clause behaves similar to the WHEN clause with the exception
   that the object is not disabled (grayed out).  The object is
   passed as a parameter to the code block.
   
   PARENT < oParent > is the name of the variable that was assigned to
   the parent object for this object.  Only use this clause if you
   are placing this object onto another dialogue object.   If this
   argument is not passed then the parent will be the object set
   with the DCSETPARENT command.
   
   PARENTID < cParentID > may be used in lieu of the PARENT < oParent >
   clause.  This identifies the ID of the parent instead of the
   parent's object variable name.
   
   DATALINK < bLink > is an optional code block that is evaluated
   every time Get/Set codeblock is evaluated, ie when the data
   is read from the < uVar > into the object except when using
   a user-defined Get/Set code block. < bLink > is also
   evaluated when DC_GetRefresh() is called unless the < lDataLink >
   parameter of DC_GetRefresh() is .FALSE.
   
   FONT < cFont > is a character string defining an optional font.
   The font string must conform to the Xbase++ standard, ie.
   "10.Courier.Bold". It may also be a font object or a code block
   that returns a character string or a font object to later
   refresh with DC_GetRefresh().
   
   PRESENTATION < aPres > is a two-dimensional array. If specified,
   this contains presentation parameters for the CheckBox object.
   The first column of the array must contain #define constants
   from the XBP.CH file starting with the prefix XBP_PP_. These
   constants define the presentation parameters that can be set
   for the object and include colors and fonts. The second column
   of the array in < aPres > contains the value for each setting.
   These are also generally set using #define constants from the
   GRA.CH file.
   
   TOOLTIP < bcToolTip > is a character string which will display
   as a "Tool Tip" next to the object when the cursor is passed
   over the object. A semi-colon within the text indicates a new
   line.  If < bcToolTip > is a code-block, it must return a character
   string.  NOTE: The Tooltip painting method is run in another
   thread, therefore the codeblock should not run code that points
   to the current work area.  It may however, contain local, public
   or private variables.
   
   CURSOR < naCursor > may be either a numeric value or an array of
   3 elements which defines an optional mouse pointer to use for
   this object.  System mouse pointers start with
   XBPWINDOW_POINTERTYPE_ and are defined in XPB.CH.  The default
   pointer is XBPWINDOW_POINTERTYPE_POINTER.  < naCursor > may be a
   numeric resource ID that points to a Bit-Map that has been
   compiled with the resource compiler and linked to the .EXE.
   < naCursor > may be a 3-element array described as follows:
   
      Element  Type  Description
      -------  ---- ---------------------------------------------
        [1]      C   Optional name of .DLL containing the pointer
                     resource.
   
        [2]      N   The numeric resource ID of the pointer.  If
                     element 1 is a NIL, then this resource must be
                     linked into the .EXE.
   
        [3]      N   The type of resource as defined in XBP.CH.
   
   
   PREEVAL < bPreEval > is a code block to be evaluated by the GUI
   reader before the Xbase Parts object is created.  The object is
   passed to the code block.
   
   EVAL < bEval > is a code block to be evaluated by the GUI reader
   after the Xbase Parts object is created.  The object is passed
   to the code block.
   
   COLOR < ncFGc >, < ncBGc > are foreground and background colors.
   They may be character strings representing valid text-based
   colors supported by SetColor() or they may be numeric constants
   which begin with either the prefix GRA_CLR_ or the prefix
   XBPSYSCLR_ as defined in GRA.CH or XBP.CH. IF < bncFGc > is a
   code block is must return a 2-element array containing a
   foreground and background color.
   
   ID < cId > is a unique identifier for this object.  This ID is used
   with functions like DC_GETORIGUPDATED() to determine the status
   of a get object.
   
   CARGO < xCargo > is any kind of data you wish to to add to the
   :cargo container for this object.  The cargo may be accessed
   at any time via the :cargo exported variable, however it will not
   be stored in the same manner it is entered.  The :cargo container
   of DCDIALOG objects is an array of at least three elements:
   
     [1] - A numeric value that is a pointer to the Getlist array
           for this object.
   
     [2] - A pointer to the GetList array.
   
     [3] - The value of < xCargo >.
   
     [4] and up - optional values added by the GUI reader.
   
   TITLE < cTitle > is a title to assign to this object.  The title
   is not displayed on the screen but is simply a description of the
   get object which is saved in the GetList.
   
   ACCELKEY < anAccel > is a numeric "hot-key" assignment that will set
   focus to the checkbox object when the hot-key is pressed.  The key
   must be a valid key with the prefix xbeK_*.  These keys are
   defined in APPEVENT.CH.  < anAccel > may also be an array of numeric
   values to assign more than one key to the object.
   
   GOTFOCUS < bGotFocus > is a code block that is evaluated when this
   object receives input focus. < bGotFocus > := {|uNIL1,uNIL2,self|...}
   
   LOSTFOCUS < bLostFocus > is a code block that is evaluated when this
   object loses input focus.  < bLostFocus > := {|uNIL1,uNIL2,self|...}
   
   TABSTOP will cause the object (Xbase Part) to be set when using
   the Tab key.  Note: When logical groups are defined in a dialog
   using TABGROUP < nTabGroup >, TABSTOP is usually set to .T. (true)
   for the first dialog element in the group.  This allows the first
   dialog element of a group to be activated using the Tab key.
   
   NOTABSTOP will cause the object (Xbase Part) to be ignored when
   using the Tab key. This clause is needed only to override any
   default setting of TabStop by the DCGETOPTIONS [TABSTOP] command.
   
   TABGROUP < nTabGroup > allows objects (Xbase Parts) that are created
   immediately after one another in the GetList to be combined into
   logical groups. This allows the user to navigate within a dialog
   from group to group by pressing the Tab key.  Within a group of
   dialog elements navigation is performed using the cursor keys.
   
   Only constants defined in the XBP.CH file can be used as values
   for this instance variable.  The following table lists the
   available constants:
   
    #define constants for < nTabGroup >:
   
     Constant             Description
   
     XBP_NO_GROUP     *)  Dialog element does not belong to a group
     XBP_BEGIN_GROUP      Dialog element is the first in a group
                          (this begins the definition of the group)
     XBP_WITHIN_GROUP     Dialog element is within a group
     XBP_END_GROUP        Dialog element is the last in a group
                          (this ends the definition of the group)
   
    *) Default value
   
   GROUP < cGroup > is a "group" name (case-sensitive) to assign to
   this GetList object.  Assignment to a group makes it possible to
   perform operations only on GetList items which are members of a
   specified group, using functions such as DC_GetRefresh() or
   DC_ReadGui().
   
   VISIBLE determines whether the object is visible immediately after
   the call to the method :create() . By default the object follows
   the VISIBLE clause of the DCGETOPTIONS command.  Use the
   INVISIBLE clause to override the VISIBLE clause of DCGETOPTIONS
   

Description:

    The command @..DCCHECKBOX creates a new Check Box definition
    and it to the array named GETLIST which is later processed by
    the DC_Read*() functions or by the DCREAD * commands.  The
    GETLIST array must be first declared and initialized to the
    value of {}.
   
    The command DCREAD GUI creates the DC_Xbp*() objects and
    activates the edit mode for all definitions found in the
    GetList array.
   
    The command DCREAD HTML creates the DC_Html*() objects and
    writes the HTML source code.
   
    A Getlist object remains stored as long as it is referenced
    in an array or by a variable.  The commands CLEAR and
    CLEAR GETS assign an empty array to the GetList variable.
    This also occurs after the completion of the DCREAD command
    if it is called without the SAVE option, causing all
    objects referenced by the GetList array to be released.
   
     @..DCCHECKBOX objects can be combined with any objects that
    that use the DCDIALOG system, such as @..DCSAY..GET,
    @..DCRADIO, @..DCTABLE, @..DCPUSHBUTTON or @..DCTABPAGE.
   

Notes:

    GUI Applications :
   
    The checkbox object created by @ DCCHECKBOX is an object of the
    DC_XbpCheckBox() class which inherits from the XbpCheckBox()
    class, therefore it can be manipulated with any iVar or method
    supported by XbpCheckBox().
   
    --------------------
   
    HTML Applications :
   
    The checkbox object created by @ DCCHECKBOX is an object
    of the DC_HtmlCheckBox() class.
   

Examples:

   /*  (Simple Check Boxes in GUI)  */
   
   #include "dcdialog.ch"
   
   
   PROCEDURE Xtest()
   
   LOCAL lDict := .f., lSource := .t., lBackup := .f., ;
         lPack := .t.,  GetList := {}
   
   @ 5,10 DCCHECKBOX lDict   PROMPT 'Save to Dictionary'
   @ 5,40 DCCHECKBOX lSource PROMPT 'Save to Source Code'
   @ 7,10 DCCHECKBOX lBackUp PROMPT 'Make a Backup file'
   @ 7,40 DCCHECKBOX lPack   PROMPT 'Pack the File'
   
   DCREAD GUI FIT ADDBUTTONS
   
   RETURN
   
   
   /* Simple Checkboxes in HTML */
   
   #include "dcdialog.ch"
   #include "dchtml.ch"
   
   FUNCTION Xtest()
   
   LOCAL i, GetList[0], oForm, cHtml, oTable, lCheck1, lCheck2, lCheck3
   
   DCFORM OBJECT oForm
   DCTABLE OBJECT oTable PARENT oForm ROWS 3 COLUMNS 1
   lCheck1 := .t.
   lCheck2 := .f.
   lCheck3 := .f.
   @ 1,1 DCCHECKBOX lCheck1 PROMPT 'Check me first' PARENT oTable
   @ 2,1 DCCHECKBOX lCheck2 PROMPT 'Check me second' PARENT oTable
   @ 3,1 DCCHECKBOX lCheck3 PROMPT 'Check me third' PARENT oTable
   
   DCREAD HTML TO cHtml
   
   MemoWrit('TEST.HTM',cHtml)
   
   RETURN cHtml
   

Source/Library:

  DCDIALOG.CH                                                     I

See Also:

   dc_htmlcheckbox()
   dc_readgui()
   dc_readhtml()
   DCREAD GUI
   DCREAD HTML



@ DCCOMBOBOX

Create a COMBOBOX object for displaying with GUI reader

Syntax:

   @ < nRow >,< nCol > DCCOMBOBOX < uOutVar > LIST < aVar > ;
       [TYPE < nType >] ;
       [SIZE < nGetWidth > [,< nGetHeight >]] ;
       [PIXEL] ;
       [REFRESH] ;
       [PARENT < oParent >] ;
       [PARENTID < cParentId >] ;
       [FONT < bocFont >] ;
       [MESSAGE < bcMsg > [INTO < oMsgBox >]] ;
       [WHEN < bWhen >] ;
       [HIDE < bHide >] ;
       [EDITPROTECT < bProtect >] ;
       [VALID < bValid >] ;
       [HELPCODE < cHelp >] ;
       [PRESENTATION < aPres >] ;
       [TOOLTIP < bcToolTip >] ;
       [CURSOR < naCursor >] ;
       [PREEVAL < bPreEval >] ;
       [EVAL < bEval >] ;
       [DATALINK < bLink >] ;
       [OBJECT < oObject >] ;
       [RELATIVE < oRel >] ;
       [CARGO < xCargo >] ;
       [COLOR < bncFgC > [,< ncBgC >] ] ;
       [ID < cId >] ;
       [TITLE < cTitle >] ;
       [ACCELKEY < anAccel >] ;
       [GOTFOCUS < bGotFocus >] ;
       [LOSTFOCUS < bLostFocus >] ;
       [TABSTOP] ;
       [NOTABSTOP] ;
       [TABGROUP < nTabGroup >] ;
       [VISIBLE] ;
       [INVISIBLE] ;
       [GROUP < cGroup >
   

Arguments:

   GUI applications:
   
   < nRow > and < nCol > are the row and column of the screen.
   Coordinates are always relative to position 0,0 ie. Top,Left
   of the parent object, unless the RELATIVE argument is used.
   If no parent is assigned, then the parent is the Dialog box.
   IF the PIXEL option is set to .TRUE. in DCGETOPTIONS, then
   the numbers are in pixels otherwise they are in standard
   text-based coordinates.  You can also force the pixel
   mode by including PIXEL as a command argument.
   
   HTML applications:
   
   < nRow > and < nCol > are the row number and column number of
   the table if the parent of this object is a DCTABLE. The
   text will be inserted in the cell of the table defined by
   the row/column.
   
   < aVar > is a single-dimensional array of character strings
   which is used as the list box of items.
   
   < cOutVar > is the input/output variable.  This should be
   initialized to a character string. It must not be a macro,
   however it may be a code block that contains a macro. The < uVar >
   is automatically anchored via a Get-Set codeblock created by
   DC_GetAnchorCB() unless < uVar > is a custom Get-Set code block.
   
   TYPE < nType > is a numeric constant which is defined in the XBP.CH
   file and are listed in the following table:
   
     Constant                Description
   
     XBPCOMBO_SIMPLE         List box is always dropped down
     XBPCOMBO_DROPDOWN   *)  List box dropped down via a mouse click
     XBPCOMBO_DROPDOWNLIST   List box dropped down via a mouse click
                             and keyboard input in the entry field is
                             not allowed
   
     *) Default value
   
   SIZE < nWidth >,< nHeight > is the width and height of the
   combobox.  If the PIXEL option is set to .TRUE. in DCGETOPTIONS,
   then the numbers are in pixels otherwise they are in standard
   text-based numbers.  Note:  The height value  determines the total
   height of the combo box including the pull-down listbox.
   
   PARENT < oParent > is the name of the variable that was assigned to
   the parent object for this object.  Only use this clause if you
   are placing this object onto another dialogue object.  If this
   argument is not passed then the parent will be the object set
   with the DCSETPARENT command.
   
   PARENTID < cParentID > may be used in lieu of the PARENT < oParent >
   clause.  This identifies the ID of the parent instead of the
   parent's object variable name.
   
   REFRESH will force a refresh of the GetList each time an item is
   chosen from the pick-list.  Use this clause if other objects in
   the GetList contain a WHEN or HIDE clause which is dependent on
   the value picked.
   
   OBJECT < oObject > is the variable to use as a container for the
   object after it is created by the GUI reader.
   
   FONT < cFont > is a character string defining an optional font.
   The font string must conform to the Xbase++ standard, ie.
   "10.Courier.Bold". It may also be a font object or a code block
   that returns a character string or a font object to later
   refresh with DC_GetRefresh().
   
   MESSAGE < bcMsg > is the message you want to display in the
   message area of the dialogue screen defined by the DCMESSAGEBOX
   command when the object is in focus.  Optionally, INTO < oMsgBox >
   will designate which message box to display the message into.
   If the INTO clause is not used, then the last message box in the
   GetList is the default.  < oMsgBox > may also be any object that
   supports the :setCaption() method.  < bcMsg > may be a code block
   that returns a character value.
   
   WHEN < bWhen > is a code block that is evaluated in the event loop.
   This code block must return a logical value.  If the value
   returned is .FALSE. then the object will be disabled and grayed.
   If the value returned is .TRUE. then the object will be enabled.
   The object is passed as a parameter to the code block.
   
   HIDE < bHide > is a code block that is evaluated in the event loop.
   This code block must return a logical value.  If the value
   returned is .TRUE. then the object will be hidden from view.  If
   the value returned is .FALSE. then the object will be displayed.
   the object is passed as a parameter to the code block.
   
   EDITPROTECT < bProtect > is an optional condition tested during the
   execution of the GUI gets by the DCREAD GUI command, before the
   object receives input focus (before it is activated). When the
   condition returns the value .T. (true), the object receives the
   input focus.  Otherwise, it is skipped. < bProtect > is a code
   block that must return a logical value when evaluated. The code
   block is evaluated prior to the object receiving input focus.
   This clause behaves similar to the WHEN clause with the exception
   that the object is not disabled (grayed out).  The object is
   passed as a parameter to the code block.
   
   VALID < bValid > is an optional condition tested during the
   execution of the GUI gets by the READ command before a Get
   object loses input focus (before it is deactivated).  When
   the condition returns the value .T. (true), the Get object
   loses the input focus.  Otherwise, it remains active. < bValid >
   is a code block that must return a logical value when it is
   evaluated.  The object passed as a parameter to the code block.
   
   HELPCODE < cHelp > is a character string that is passed to the
   DC_HelpF1() function if F1 is pressed or the HELP button
   is clicked when this GET has focus.  This HELPCODE allows
   the Help system to override the passing of the Procedure and
   Varname for more specific context-help.
   
   PRESENTATION < aPres > is a two-dimensional array. If specified,
   this contains presentation parameters for the ComboBox object.
   The first column of the array must contain #define constants
   from the XBP.CH file starting with the prefix XBP_PP_. These
   constants define the presentation parameters that can be set
   for the object and include colors and fonts. The second column
   of the array in < aPres > contains the value for each setting.
   These are also generally set using #define constants from the
   GRA.CH file.
   
   TOOLTIP < bcToolTip > is a character string which will display
   as a "Tool Tip" next to the object when the cursor is passed
   over the object. A semi-colon within the text indicates a new
   line.  If < bcToolTip > is a code-block, it must return a character
   string.  NOTE: The Tooltip painting method is run in another
   thread, therefore the codeblock should not run code that points
   to the current work area.  It may however, contain local, public
   or private variables.
   
   CURSOR < naCursor > may be either a numeric value or an array of
   3 elements which defines an optional mouse pointer to use for
   this object.  System mouse pointers start with
   XBPWINDOW_POINTERTYPE_ and are defined in XPB.CH.  The default
   pointer is XBPWINDOW_POINTERTYPE_POINTER.  < naCursor > may be a
   numeric resource ID that points to a Bit-Map that has been
   compiled with the resource compiler and linked to the .EXE.
   < naCursor > may be a 3-element array described as follows:
   
      Element  Type  Description
      -------  ---- ---------------------------------------------
        [1]      C   Optional name of .DLL containing the pointer
                     resource.
   
        [2]      N   The numeric resource ID of the pointer.  If
                     element 1 is a NIL, then this resource must be
                     linked into the .EXE.
   
        [3]      N   The type of resource as defined in XBP.CH.
   
   PREEVAL < bPreEval > is a code block to be evaluated by the GUI
   reader before the Xbase Parts object is created.  The object is
   passed to the code block.
   
   EVAL < bEval > is a code block to be evaluated by the GUI reader
   after the Xbase Parts object is created.  The object is passed
   to the code block.
   
   DATALINK < bLink > is an optional code block that is evaluated
   every time Get/Set codeblock is evaluated, ie when the data
   is read from the < uVar > into the object except when using
   a user-defined Get/Set code block. < bLink > is also
   evaluated when DC_GetRefresh() is called unless the < lDataLink >
   parameter of DC_GetRefresh() is .FALSE.
   
   RELATIVE < oRel > is an optional object in the Getlist which
   determines the start coordinates of this object.  If this
   option is used, then the < nSrow >, < nSCol > coordinates are
   relative to the starting coordinates of < oRel > rather than
   the parent object.
   
   CARGO < xCargo > is any kind of data you wish to to add to the
   :cargo container for this object.  The cargo may be accessed
   at any time via the :cargo exported variable, however it will not
   be stored in the same manner it is entered.  The :cargo container
   of DCDIALOG objects is an array of at least three elements:
   
     [1] - A numeric value that is a pointer to the Getlist array
           for this object.
   
     [2] - A pointer to the GetList array.
   
     [3] - The value of < xCargo >.
   
     [4] and up - optional values added by the GUI reader.
   
   COLOR < ncFGc >, < ncBGc > are foreground and background colors.
   They may be character strings representing valid text-based
   colors supported by SetColor() or they may be numeric constants
   which begin with either the prefix GRA_CLR_ or the prefix
   XBPSYSCLR_ as defined in GRA.CH or XBP.CH.  IF < bncFGc > is a
   code block is must return a 2-element array containing a
   foreground and background color.
   
   ID < cId > is a unique identifier for this object.  This ID is used
   with functions like DC_GETORIGUPDATED() to determine the status
   of a get object.
   
   TITLE < cTitle > is a title to assign to this object.  The title
   is not displayed on the screen but is simply a description of the
   get object which is saved in the GetList.
   
   ACCELKEY < anAccel > is a numeric "hot-key" assignment that will set
   focus to the checkbox object when the hot-key is pressed.  The key
   must be a valid key with the prefix xbeK_*.  These keys are
   defined in APPEVENT.CH.  < anAccel > may also be an array of numeric
   values to assign more than one key to the object.
   
   GOTFOCUS < bGotFocus > is a code block that is evaluated when this
   object receives input focus.  < bGotFocus > := {|uNIL1,uNIL2,self|...}
   
   LOSTFOCUS < bLostFocus > is a code block that is evaluated when this
   object loses input focus.  < bLostFocus > := {|uNIL1,uNIL2,self|...}
   
   TABSTOP will cause the object (Xbase Part) to be set when using
   the Tab key.  Note: When logical groups are defined in a dialog
   using TABGROUP < nTabGroup >, TABSTOP is usually set to .T. (true)
   for the first dialog element in the group.  This allows the first
   dialog element of a group to be activated using the Tab key.
   
   NOTABSTOP will cause the object (Xbase Part) to be ignored when
   using the Tab key. This clause is needed only to override any
   default setting of TabStop by the DCGETOPTIONS [TABSTOP] command.
   
   TABGROUP < nTabGroup > allows objects (Xbase Parts) that are created
   immediately after one another in the GetList to be combined into
   logical groups. This allows the user to navigate within a dialog
   from group to group by pressing the Tab key.  Within a group of
   dialog elements navigation is performed using the cursor keys.
   
   Only constants defined in the XBP.CH file can be used as values
   for this instance variable.  The following table lists the
   available constants:
   
    #define constants for < nTabGroup >:
   
     Constant             Description
   
     XBP_NO_GROUP     *)  Dialog element does not belong to a group
     XBP_BEGIN_GROUP      Dialog element is the first in a group
                          (this begins the definition of the group)
     XBP_WITHIN_GROUP     Dialog element is within a group
     XBP_END_GROUP        Dialog element is the last in a group
                          (this ends the definition of the group)
   
    *) Default value
   
   GROUP < cGroup > is a "group" name (case-sensitive) to assign to
   this GetList object.  Assignment to a group makes it possible to
   perform operations only on GetList items which are members of a
   specified group, using functions such as DC_GetRefresh() or
   DC_ReadGui().
   
   VISIBLE determines whether the object is visible immediately after
   the call to the method :create() . By default the object follows
   the VISIBLE clause of the DCGETOPTIONS command.  Use the
   INVISIBLE clause to override the VISIBLE clause of DCGETOPTIONS
   

Description:

    The command @..DCCOMBOBOX creates a new Combo Box definition
    and adds it to the array named GETLIST which is later
    processed by the DC_Read*() functions or by the DCREAD *
    commands.  The GETLIST array must be first declared and
    initialized to the value of {}.
   
    The command DCREAD GUI creates the DC_Xbp*() objects and
    activates the edit mode for all definitions found in the
    GetList array.
   
    The command DCREAD HTML creates the DC_Html*() objects and
    writes the HTML source code.
   
    A Getlist object remains stored as long as it is referenced
    in an array or by a variable.  The commands CLEAR and
    CLEAR GETS assign an empty array to the GetList variable.
    This also occurs after the completion of the DCREAD command
    if it is called without the SAVE option, causing all Get
    objects referenced by the GetList array to be released.
   
    @..DCCOMBOBOX objects can be combined with any objects that
    that use the DCDIALOG system, such as @..DCSAY..GET,
    @..DCRADIO, @..DCPUSHBUTTON, @..DCCHECKBOX or @..DCTABPAGE.
   

Notes:

    GUI Appications :
   
    The combobox object created by @ DCCOMBOBOX is an object of
    the DC_XbpComboBox() class which inhertis from XbpComboBox(),
    therefore it can be manipulated with any iVar or method
    supported by XbpComboBox().
   
    -----------------------------------
   
    HTML Applications :
   
    The combobox object created by @ DCCOMBOBOX is an object of
    the DC_HtmlComboBox() class.
   

Examples:

   -- Example 1 (GUI combobox) ---
   
   #include "dcdialog.ch"
   
   PROCEDURE Xtest()
   
   LOCAL aFields, Getlist := {}, cField
   
   USE Customer
   aFields := Array(FCount())
   AFields( aFields ) // fill array with field list.
   cField := Space(10)
   
   @ 5,10 DCCOMBOBOX cField LIST aFields FONT "10.Courier"  ;
       SIZE 15,20
   
   DCREAD GUI FIT ADDBUTTONS
   
   RETURN
   
   -- Example 2 (HTML checkboxes) --
   
   #include "dcdialog.ch"
   #include "dchtml.ch"
   
   FUNCTION Xtest()
   
   LOCAL GetList[0], oForm, cHtml, oTable, aList1, ;
         aList2, cVar1, cVar2
   
   DCFORM OBJECT oForm
   DCTABLE OBJECT oTable PARENT oForm ROWS 2 COLUMNS 1
   cVar1 := Space(10)
   cVar2 := Space(12)
   aList1 := { 'Men','Women','Dogs','Cats','Mice','Geese','Turkeys' }
   aList2 := { 'Democrat','Republican','HandyMan','Doctor','Plumber','Programmer'
   }
   
   @ 1,1 DCSAY 'Pick a group' PARENT oTable
   @ 1,1 DCCOMBOBOX cVar1 LIST aList1 PARENT oTable
   @ 2,1 DCSAY 'Pick a profession' PARENT oTable
   @ 2,1 DCCOMBOBOX cVar2 LIST aList2 PARENT oTable
   
   DCREAD HTML TO cHtml
   
   MemoWrit('TEST.HTM',cHtml)
   
   RETURN cHtml
   

Source/Library:

  DCDIALOG.CH

See Also:

   @ DCLISTBOX
   dc_vartolistbox()
   dc_readgui()
   dc_readhtml()
   dc_htmlcombobox()



@ DCCUSTOM

Create a CUSTOM object for displaying with GUI reader

Syntax:

   @ < nRow >,< nCol > DCCUSTOM < bCustom > ;
       [SIZE < nWidth > [,< nHeight >]] ;
       [VAR < uVar >] ;
       [PARENT < oParent >] ;
       [PARENTID < cParentId >] ;
       [CAPTION < cCaption >] ;
       [PRESENTATION < aPres >] ;
       [TYPE < nType >] ;
       [OBJECT < oCustom >] ;
       [COLOR < bncFgC > [,< ncBgC >] ] ;
       [OPTIONS < aOptions >] ;
       [DATALINK < bLink >] ;
       [FONT < bocFont >] ;
       [MESSAGE < bcMsg > [INTO < oMsgBox >]] ;
       [HIDE < bHide >] ;
       [WHEN < bWhen >] ;
       [EDITPROTECT < bProtect >] ;
       [VALID < bValid >] ;
       [HELPCODE < cHelpCode >] ;
       [TOOLTIP < bcToolTip >] ;
       [ACTION < bAction >] ;
       [CURSOR < naCursor >] ;
       [CARGO < xCargo >] ;
       [PREEVAL < bPreEval >] ;
       [EVAL < bEval] ;
       [PIXEL] ;
       [RELATIVE < oRel >] ;
       [ID < cId >] ;
       [TITLE < cTitle >] ;
       [ACCELKEY < anAccel >] ;
       [GOTFOCUS < bGotFocus >] ;
       [LOSTFOCUS < bLostFocus >] ;
       [TABSTOP] ;
       [NOTABSTOP] ;
       [TABGROUP < nTabGroup >] ;
       [VISIBLE] ;
       [INVISIBLE] ;
       [GROUP < cGroup >]
   

Arguments:

   < nRow >, < nCol > are the coordinates on the screen.
   Coordinates are always relative to position 0,0 ie. Top,Left
   of the parent object, unless the RELATIVE < oRel > argument is
   used.  If no parent is assigned, then the parent is the Dialog
   box.  IF the PIXEL option is set to .TRUE. in DCGETOPTIONS,
   then the numbers are in pixels otherwise they are in standard
   text-based coordinates.  You can also force the pixel mode by
   including PIXEL as a command argument.
   < nRow > is stored in element nGETLIST_STARTROW.
   < nCol > is stored in element nGETLIST_STARTCOL.
   
   < bCustom > is a required code block.  This is the code block
   that is evaluated to create the custom object.  It requires
   the following form:
   
     { | < a > | < MyFunc >( < a > ) }
   
     < a > is an array of information that is passed to the custom
     function.
   
   
     Element  Type Description
     -------  ---- ------------------------------------------------
   
       [1]     A   The GetList array
   
       [2]     N   The GetList pointer (the element containing this
                   object).
   
       [3]     O   The Parent object
   
       [4]     A   A two element array containing the start column
                   and start row.  The values will be converted to
                   pixel coordinates.
   
       [5]     A   A two element array containing the width and
                   height of the object.  The values will be
                   converted to pixels.
   
       [6]     A   Optional Presentation Parameters
   
       [7]     L   A .TRUE. if the object is VISIBLE.
   
   RELATIVE < oRel > is an optional object in the Getlist which
   determines the start coordinates of this object.  If this
   option is used, then the < nSrow >, < nSCol > coordinates are
   relative to the starting coordinates of < oRel > rather than
   the parent object.
   
   SIZE < nWidth >, < nHeight > defines the size of the object.
   IF the PIXEL option is set to .TRUE. in DCGETOPTIONS, then
   the numbers are in pixels otherwise they are in standard
   text-based coordinates.  You can also force the pixel mode by
   including PIXEL in the command.
   < nWidth > is stored in element nGETLIST_WIDTH
   < nHeight > is stored in element nGETLIST_HEIGHT
   
   VAR < uVar > is an optional memory variable that is used with
   this object.  It is converted to a code block using the
   function DC_GetAnchorCB() and stored in element bGETLIST_VAR.
   This code block is usually attached to the :dataLink instance
   var of an Xbase Parts object.  If < uVar > is a code block, then
   it will not be converted by DC_GetAnchorCB().  In this case, it
   must be a valid Get-Set code block.
   
   PARENT < oParent > is the name of the variable that was assigned to
   the parent object for this object.  Only use this clause if you
   are placing this object onto another dialogue object.  If this
   clause is not used, then the object will be displayed in the
   top-level dialogue screen or in the object set with the
   DCSETPARENT command. This is converted to a code-block by
   the function DC_GetAnchorCB() and is stored in element
   oGETLIST_PARENT.
   
   PARENTID < cParentID > may be used in lieu of the PARENT < oParent >
   clause.  This identifies the ID of the parent instead of the
   parent's object variable name.
   
   < oGroup > is the name of the variable to assign as a storage
   place for this object.  It is converted to a code-block by
   the function DC_GetAnchorCB() and is stored in element
   oGETLIST_GROUP.
   
   CAPTION < cCaption > is the caption to use with the object
   and is stored in element cGETLIST_CAPTION.
   
   PRESENTATION < aPres > is a two-dimensional array. If specified,
   this contains presentation parameters for the object.
   The first column of the array must contain #define constants
   from the XBP.CH file starting with the prefix XBP_PP_. These
   constants define the presentation parameters that can be set
   for the object and include colors and fonts. The second column
   of the array in < aPres > contains the value for each setting.
   These are also generally set using #define constants from the
   GRA.CH file.  The array is stored in element
   aGETLIST_PRESENTATION.
   
   TYPE < nType > defines the "type" of the object and is stored
   in element nGETLIST_TYPE.
   
   OBJECT < oObject > is a local variable to store a reference to
   this object.  It is converted to a code-block by the function
   DC_GetAnchorCB() and is stored in element oGETLIST_OBJECT.
   
   COLOR < cColor > is a text-based color string for the object
   that is stored in element cGETLIST_COLOR.
   
   OPTIONS < xOptions > can be any type of variable.  It is stored
   in element xGETLIST_OPTIONS.
   
   DATALINK is an optional code block that is attached to the
   < uVar > via the function DC_GetAnchorCB().  This code block is
   evaluated when the :dataLink var is evaluated by an Xbase
   Parts object.
   
   FONT < cFont > is a font to use with this object and is stored
   in element cGETLIST_FONT. It may be a character string, a font
   object or a code block that returns a character string or a font
   object to later refresh with DC_GetRefresh().
   
   MESSAGE < cMsg > is the message you want to display in the
   message area of the dialogue screen defined by the DCMESSAGEBOX
   command when the object is in focus.  Optionally, INTO < oMsgBox >
   will designate which message box to display the message into.
   If the INTO clause is not used, then the last message box in the
   GetList is the default. < oMsgBox > may also be any object that
   supports the :setCaption() method.  If < bcMsg > is a code-block,
   it must return a character string.
   
   PICTURE < cPict > is a character string specifying formatting
   options for the value of < uVar > during display and editing.
   It is stored in element cGETLIST_PICTURE.
   
   WHEN < bWhen > is a code block that is evaluated in the event loop.
   This code block must return a logical value.  If the value
   returned is .FALSE. then the object will be disabled and grayed.
   If the value returned is .TRUE. then the object will be enabled.
   The code block is stored in element bGETLIST_WHEN.
   The object is passed as a parameter to the code block.
   
   HIDE < bHide > is a code block that is evaluated in the event loop.
   This code block must return a logical value.  If the value
   returned is .TRUE. then the object will be hidden from view.  If
   the value returned is .FALSE. then the object will be displayed.
   The object is passed as a parameter to the code block.
   
   EDITPROTECT < bProtect > is an optional condition tested during the
   execution of the GUI gets by the DCREAD GUI command, before the
   object receives input focus (before it is activated). When the
   condition returns the value .T. (true), the object receives the
   input focus.  Otherwise, it is skipped. < bProtect > is a code
   block that must return a logical value when evaluated. The code
   block is evaluated prior to the object receiving input focus.
   This clause behaves similar to the WHEN clause with the exception
   that the object is not disabled (grayed out).  The object is
   passed as a parameter to the code block.
   
   VALID < bValid > is an optional condition tested during the
   navigation through the dialog objects when an object loses
   focus (before it is deactivated).  If the condition returns the
   value .T. (true), the object loses the input focus, otherwise,
   it remains active. < bValid > is a code block that must return a
   logical value when it is evaluated.  The object is passed to the
   code block prior to the object losing input focus.  The
   code block is stored in element bGETLIST_VALID.
   
   HELPCODE < cHelp > is a character string that is passed to the
   DC_HelpF1() function if F1 is pressed or the HELP button
   is clicked when this object has focus.  This HELPCODE allows
   the Help system to override the passing of the Procedure and
   Varname for more specific context-help.  The help code is
   stored in element cGETLIST_HELPCODE.
   
   TOOLTIP < bcToolTip > is a character string which will display
   as a "Tool Tip" next to the object when the cursor is passed
   over the object. A semi-colon within the text indicates a new
   line.  If < bcToolTip > is a code-block, it must return a character
   string.  NOTE: The Tooltip painting method is run in another
   thread, therefore the codeblock should not run code that points
   to the current work area.  It may however, contain local, public
   or private variables.
   
   CURSOR < naCursor > may be either a numeric value or an array of
   3 elements which defines an optional mouse pointer to use for
   this object.  System mouse pointers start with
   XBPWINDOW_POINTERTYPE_ and are defined in XPB.CH.  The default
   pointer is XBPWINDOW_POINTERTYPE_POINTER.  < naCursor > may be a
   numeric resource ID that points to a Bit-Map that has been
   compiled with the resource compiler and linked to the .EXE.
   < naCursor > may be a 3-element array described as follows:
   
     Element  Type  Description
     -------  ---- ---------------------------------------------
       [1]      C   Optional name of .DLL containing the pointer
                    resource.
   
       [2]      N   The numeric resource ID of the pointer.  If
                    element 1 is a NIL, then this resource must be
                    linked into the .EXE.
   
       [3]      N   The type of resource as defined in XBP.CH.
   
   CARGO < xCargo > is any kind of data you wish to to add to the
   :cargo container for this object.  The cargo may be accessed
   at any time via the :cargo exported variable, however it will not
   be stored in the same manner it is entered.  The :cargo container
   of DCDIALOG objects is an array of at least three elements:
   
    [1] - A numeric value that is a pointer to the Getlist array
          for this object.
   
    [2] - A pointer to the GetList array.
   
    [3] - The value of < xCargo >.
   
    [4] and up - optional values added by the GUI reader.
   
   < xCargo > is stored in element xGETLIST_CARGO.
   
   ACTION < bAction > is a code-block to be used with objects
   that execute an action, like push-buttons.  This code block
   is stored in element bGETLIST_ACTION.
   
   COLOR < ncFGc >, < ncBGc > are foreground and background colors.
   They may be character strings representing valid text-based
   colors supported by SetColor() or they may be numeric constants
   which begin with either the prefix GRA_CLR_ or the prefix
   XBPSYSCLR_ as defined in GRA.CH or XBP.CH.
   
   ID < cId > is a unique identifier for this object.  This ID is used
   with functions like DC_GETORIGUPDATED() to determine the status
   of a get object.
   
   TITLE < cTitle > is a title to assign to this object.  The title
   is not displayed on the screen but is simply a description of the
   get object which is saved in the GetList.
   
   ACCELKEY < anAccel > is a numeric "hot-key" assignment that will set
   focus to the checkbox object when the hot-key is pressed.  The key
   must be a valid key with the prefix xbeK_*.  These keys are
   defined in APPEVENT.CH.  < anAccel > may also be an array of numeric
   values to assign more than one key to the object.
   
   GOTFOCUS < bGotFocus > is a code block that is evaluated when this
   object receives input focus.  < bGotFocus > := {|uNIL1,uNIL2,self|...}
   
   LOSTFOCUS < bLostFocus > is a code block that is evaluated when this
   object loses input focus.  < bLostFocus > := {|uNIL1,uNIL2,self|...}
   
   TABSTOP will cause the object (Xbase Part) to be set when using
   the Tab key.  Note: When logical groups are defined in a dialog
   using TABGROUP < nTabGroup >, TABSTOP is usually set to .T. (true)
   for the first dialog element in the group.  This allows the first
   dialog element of a group to be activated using the Tab key.
   
   NOTABSTOP will cause the object (Xbase Part) to be ignored when
   using the Tab key. This clause is needed only to override any
   default setting of TabStop by the DCGETOPTIONS [TABSTOP] command.
   
   TABGROUP < nTabGroup > allows objects (Xbase Parts) that are created
   immediately after one another in the GetList to be combined into
   logical groups. This allows the user to navigate within a dialog
   from group to group by pressing the Tab key.  Within a group of
   dialog elements navigation is performed using the cursor keys.
   
   Only constants defined in the XBP.CH file can be used as values
   for this instance variable.  The following table lists the
   available constants:
   
   #define constants for < nTabGroup >:
   
    Constant             Description
   
    XBP_NO_GROUP     *)  Dialog element does not belong to a group
    XBP_BEGIN_GROUP      Dialog element is the first in a group
                         (this begins the definition of the group)
    XBP_WITHIN_GROUP     Dialog element is within a group
    XBP_END_GROUP        Dialog element is the last in a group
                         (this ends the definition of the group)
   
   *) Default value
   
   GROUP < cGroup > is a "group" name (case-sensitive) to assign to
   this GetList object.  Assignment to a group makes it possible to
   perform operations only on GetList items which are members of a
   specified group, using functions such as DC_GetRefresh() or
   DC_ReadGui().
   
   VISIBLE determines whether the object is visible immediately after
   the call to the method :create() . By default the object follows
   the VISIBLE clause of the DCGETOPTIONS command.  Use the
   INVISIBLE clause to override the VISIBLE clause of DCGETOPTIONS
   
   PREEVAL < bPreEval > is a code block to be evaluated by the GUI
   reader before the Xbase Parts object is created.  The object is
   passed to the code block.
   
   EVAL < bEval > is a code block to be evaluated by the GUI reader
   after the Xbase Parts object is created.  The object is passed
   to the code block.
   

Description:

    The command DCCUSTOM is used to create a reference to a
    custom object and adds it to the array named GETLIST which is
    later processed by the DC_READGUI() function or by the DCREAD GUI
    command.  The GETLIST array must be first declared and
    initialized to the value of {}.  The command DCREAD GUI activates
    the edit mode for all objects found in the GetList array.
    A Getlist object remains stored as long as it is referenced
    in an array or by a variable.  The commands CLEAR and
    CLEAR GETS assign an empty array to the GetList variable.
    This also occurs after the completion of the DCREAD command
    if it is called without the SAVE option, causing all Get
    objects referenced by the GetList array to be released.
   
    DCCUSTOM is used add a reference to a "custom" object.  This
    command is used when there is a requirement to use a custom
    class or to manipulate an Xbase Parts class in a manner that
    is not currently supported by the DCDIALOG system.  The
    DCCUSTOM command allows the programmer to combine any type
    of dialog object with stand DC* objects using a common dialog
    management system.  Think of DCCUSTOM as an "extend" system
    for the eXPress++ dialog system.
   

Notes:

   Another method of creating "custom" eXPress++ commands is to
   create "User-Defined Commands" which operate on the GetList
   system and are processed by DC_ReadGUI().
   

Examples:

    #include "dcdialog.ch"
   
    PROCEDURE Xtest()
   
    LOCAL GetList := {}, oBanner, bCustom, oTabPage
   
    @ 3,3 DCTABPAGE oTabPage CAPTION 'Banner'  SIZE 70, 10
   
    bCustom := {|a,b,c,d,e|DemoBanner(a,b,c,d,e)}
   
    @ 4,5 DCSAY 'Move the mouse across the banner' PARENT oTabPage
   
    @ 5,5 DCCUSTOM bCustom PARENT oTabPage OBJECT oBanner ;
      CAPTION 'This is a custom Banner object that scrolls from left to ' + ;
              'right and right to left when the mouse is moved across the banner'
   ;
      SIZE 62,2 FONT "20.Helv.Bold" ;
      PRESENTATION { { XBP_PP_FGCLR, GRA_CLR_DARKRED }, ;
                     { XBP_PP_BGCLR, GRA_CLR_WHITE } }
   
    DCREAD GUI ;
      TITLE 'Banner on a Tabpage' ;
      FIT ;
      ADDBUTTONS
   
    RETURN
   
   
   /* ---- Custom Class ----------------- */
   
   CLASS XbpBanner FROM XbpStatic
   
      EXPORTED:
   
      VAR    ScrollMouseCol          // Last Scroll Mouse Column
      VAR    ScrollType              // Scroll Type
      VAR    ScrollPos               // Scroll Position
      VAR    ScrollCaption           // Scroll Caption
      VAR    ScrollNum               // Scroll number
   
      METHOD Init, Create
      METHOD Scroll
   
   ENDCLASS
   
   /* ------------------- */
   
   METHOD XbpBanner:Create( oParent, oOwner, aPos, aSize, aPP, lVisible )
   
   ::XbpStatic:Create( oParent, oOwner, aPos, aSize, aPP, lVisible )
   
   RETURN self
   
   /* --------------------- */
   
   METHOD XbpBanner:Init( oParent, oOwner, aPos, aSize, aPP, lVisible )
   
   DEFAULT aPP := {}
   
   * initialize base class
   ::XbpStatic:init( oParent, oOwner, aPos, aSize, aPP, lVisible )
   
   ::scrollPos       := 1
   ::scrollType      := 1
   ::scrollCaption   := ''
   ::scrollMouseCol  := 0
   ::scrollNum       := 3
   ::motion := { | aPos | ::Scroll( aPos[1] ) }
   
   RETURN self
   
   /* --------------------- */
   
   METHOD XbpBanner:Scroll( nMouseCol )
   
   ::SetCaption( Substr(::scrollCaption,::scrollPos) )
   IF nMouseCol > ::scrollMouseCol .AND. ::scrollPos < Len(::scrollCaption)-15
     ::scrollPos += ::scrollNum
     ELSEIF nMouseCol < ::scrollMouseCol .AND. ::scrollPos > 1
     ::scrollPos -= ::scrollNum
   ENDIF
   ::scrollMouseCol := nMouseCol
   RETURN self
   
   /* --------------------- */
   
   STATIC FUNCTION ;
     DemoBanner ( GetList, nGetPointer, oParent, aPos, aSize, aLocals )
   
   LOCAL oXbp
   
   oXbp := XbpBanner():new( oParent, , aPos, aSize, ;
             GetList[nGetPointer,aGETLIST_PRESENTATION], .t., ;
             GetList, nGetPointer )
   
   oXbp:scrollType    := Getlist[nGetPointer,nGETLIST_SUBTYPE]
   oXbp:scrollCaption := GetList[nGetPointer,cGETLIST_CAPTION]
   oXbp:scrollNum     := 10
   IF !Empty(Getlist[nGetPointer,cGETLIST_FONT])
     oXbp:SetFontCompoundName( Getlist[nGetPointer,cGETLIST_FONT] )
   ENDIF
   oXbp:clipSiblings := .T.
   oXbp:caption := oXbp:scrollCaption
   oXbp:create()
   RETURN oXbp
   

Source/Library:

  DCDIALOG.CH

See Also:

   USER-DEFINED COMMANDS



@ DCDIALOG

Create a DIALOG object for displaying with GUI reader

Syntax:

    @ < nRow >,< nCol > DCDIALOG < oDialog >  ;
      [DRAWINGAREA < oDrawingArea >] ;
      [FONT < bocFont >] ;
      [CAPTION,TITLE < cTitle >] ;
      [BITMAP < nBitMap >] ;
      [ICON < nIcon >] ;
      [COLOR < bncFgC > [,< ncBgC >] ] ;
      [PARENT < oParent >] ;
      [PARENTID < cParentId >] ;
      [SIZE < nWidth > [,< nHeight >]] ;
      [PIXEL] ;
      [PRESENTATION < aPres >] ;
      [CARGO < xCargo >] ;
      [CURSOR < naCursor >] ;
      [PREEVAL < bPreEval >] ;
      [EVAL < bEval >] ;
      [RELATIVE < oRel >] ;
      [WHEN < bWhen >] ;
      [HIDE < bHide >] ;
      [ID < cId >] ;
      [MODAL] ;
      [VISIBLE] ;
      [INVISIBLE] ;
      [NOMINBUTTON,NOMINIMIZE] ;
      [NOMAXBUTTON,NOMAXIMIZE] ;
      [GROUP < cGroup >] ;
      [MENU < acMenu > [MSGBOX < oMsgBox >]] ;
      [BORDER < nBorder >]                 ;
      [NOTITLEBAR]         ;
      [NORESIZE]             ;
      [NOTASKLIST]         ;
      [MINSIZE < nMinCol >, < nMinRow >]     ;
      [MAXSIZE < nMaxCol >, < nMaxRow >] ;
      [AUTORESIZE] ;
      [FIT [FITPAD < nFitPad >]] ;
      [SETAPPWINDOW]
   

Arguments:

   < nRow >, < nCol > are the coordinates on the screen.
   Coordinates are always relative to position 0,0 ie. Top,Left
   of the parent object, unless the RELATIVE < oRel > argument is
   used.  If no parent is assigned, then the parent is the Dialog
   box.  IF the PIXEL option is set to .TRUE. in DCGETOPTIONS,
   then the numbers are in pixels otherwise they are in standard
   text-based coordinates.  You can also force the pixel mode by
   including PIXEL as a command argument.
   
   < oDialog > is the name of the variable to assign as a storage
   place for this object or the drawingArea of this object.  If
   the DRAWINGAREA < oDrawingArea > clause is used, then < oDrawingArea >
   will contain a pointer to XbpDialog():drawingArea and
   < oDialog > will contain a point to XbpDialog().  If the
   DRAWINGAREA clause is not used, then < oDialog > will contain a
   pointer to XbpDialog():drawingArea and the only method for
   obtaining a pointer to the XbpDialog() will be via
   < oDialog >:setParent().
   
   SIZE < nWidth >,< nHeight > is the width and height of the
   prompt.  If the PIXEL option is set to .TRUE. in DCGETOPTIONS,
   then the numbers are in pixels otherwise they are in standard
   text-based numbers.
   
   FONT < cFont > is a character string defining an optional font.
   The font string must conform to the Xbase++ standard, ie.
   "10.Courier.Bold". It may also be a font object or a code block
   that returns a character string or a font object to later
   refresh with DC_GetRefresh().
   
   CAPTION < cTitle > is the title which is displayed in the title
   area of the Dialog window.
   
   BITMAP < nBitmap > is the resource ID of a Bitmap that is linked
   into the .EXE.  This bitmap will be sized to fill the main dialog
   window.
   
   ICON < nIcon > is the resource ID of the ICON to place in the upper
   left corner of the dialog window.
   
   COLOR < ncFGc >, < ncBGc > are foreground and background colors.
   They may be character strings representing valid text-based
   colors supported by SetColor() or they may be numeric constants
   which begin with either the prefix GRA_CLR_ or the prefix
   XBPSYSCLR_ as defined in GRA.CH or XBP.CH.  If < bncFGc > is a
   code block is must return a 2-element array containing a
   foreground and background color.
   
   PARENT < oParent > is the name of the variable that was assigned to
   the parent object for this object.  Only use this clause if you
   are placing this object onto another dialogue object.  If this
   argument is not passed then the parent will be the object set
   with the DCSETPARENT command.
   
   PARENTID < cParentID > may be used in lieu of the PARENT < oParent >
   clause.  This identifies the ID of the parent instead of the
   parent's object variable name.
   
   RELATIVE < oRel > is an optional object in the Getlist which
   determines the start coordinates of this object.  If this
   option is used, then the < nSrow >, < nSCol > coordinates are
   relative to the starting coordinates of < oRel > rather than
   the parent object.
   
   PRESENTATION < aPres > is a two-dimensional array. If specified,
   this contains presentation parameters for the Browse object.
   The first column of the array must contain #define constants
   from the XBP.CH file starting with the prefix XBP_PP_. These
   constants define the presentation parameters that can be set
   for the object and include colors and fonts. The second column
   of the array in < aPres > contains the value for each setting.
   These are also generally set using #define constants from the
   GRA.CH file.
   
   PREEVAL < bPreEval > is a code block to be evaluated by the GUI
   reader before the Xbase Parts object is created.  The object is
   passed to the code block.
   
   EVAL < bEval > is a code block to be evaluated by the GUI reader
   after the Xbase Parts object is created.  The object is passed
   to the code block.
   
   CARGO < xCargo > is any kind of data you wish to to add to the
   :cargo container for this object.  The cargo may be accessed
   at any time via the :cargo exported variable, however it will not
   be stored in the same manner it is entered.  The :cargo container
   of DCDIALOG objects is an array of at least three elements:
   
    [1] - A numeric value that is a pointer to the Getlist array
          for this object.
   
    [2] - A pointer to the GetList array.
   
    [3] - The value of < xCargo >.
   
    [4] and up - optional values added by the GUI reader.
   
   
   ID < cId > is a unique identifier for this object.  This ID is used
   with functions like DC_GETORIGUPDATED() to determine the status
   of a get object.
   
   TITLE < cTitle > is a title to assign to this object.  The title
   is not displayed on the screen but is simply a description of the
   get object which is saved in the GetList.
   
   WHEN < bWhen > is a code block that is evaluated in the event loop.
   This code block must return a logical value.  If the value
   returned is .FALSE. then the object will be disabled and grayed.
   If the value returned is .TRUE. then the object will be enabled.
   The object is passed as a parameter to the code block.
   
   HIDE < bHide > is a code block that is evaluated in the event loop.
   This code block must return a logical value.  If the value
   returned is .TRUE. then the object will be hidden from view.  If
   the value returned is .FALSE. then the object will be displayed.
   The object is passed as a parameter to the code block.
   
   ACCELKEY < nKey > is a numeric "hot-key" assignment that will set
   focus to the browse object when the hot-key is pressed.  The key
   must be a valid key with the prefix xbeK_*.  These keys are
   defined in APPEVENT.CH.
   
   GOTFOCUS < bGotFocus > is a code block that is evaluated when this
   object receives input focus.  < bGotFocus > := {|uNIL1,uNIL2,self|...}
   
   LOSTFOCUS < bLostFocus > is a code block that is evaluated when this
   object loses input focus.  < bLostFocus > := {|uNIL1,uNIL2,self|...}
   
   CURSOR < naCursor > may be either a numeric value or an array of
   3 elements which defines an optional mouse pointer to use for
   this object.  System mouse pointers start with
   XBPWINDOW_POINTERTYPE_ and are defined in XPB.CH.  The default
   pointer is XBPWINDOW_POINTERTYPE_POINTER.  < naCursor > may be a
   numeric resource ID that points to a Bit-Map that has been
   compiled with the resource compiler and linked to the .EXE.
   < naCursor > may be a 3-element array described as follows:
   
     Element  Type  Description
     -------  ---- ---------------------------------------------
       [1]      C   Optional name of .DLL containing the pointer
                    resource.
   
       [2]      N   The numeric resource ID of the pointer.  If
                    element 1 is a NIL, then this resource must be
                    linked into the .EXE.
   
       [3]      N   The type of resource as defined in XBP.CH.
   
   TABSTOP will cause the object (Xbase Part) to be set when using
   the Tab key.  Note: When logical groups are defined in a dialog
   using TABGROUP < nTabGroup >, TABSTOP is usually set to .T. (true)
   for the first dialog element in the group.  This allows the first
   dialog element of a group to be activated using the Tab key.
   
   NOTABSTOP will cause the object (Xbase Part) to be ignored when
   using the Tab key. This clause is needed only to override any
   default setting of TabStop by the DCGETOPTIONS [TABSTOP] command.
   
   TABGROUP < nTabGroup > allows objects (Xbase Parts) that are created
   immediately after one another in the GetList to be combined into
   logical groups. This allows the user to navigate within a dialog
   from group to group by pressing the Tab key.  Within a group of
   dialog elements navigation is performed using the cursor keys.
   
   Only constants defined in the XBP.CH file can be used as values
   for this instance variable.  The following table lists the
   available constants:
   
   #define constants for < nTabGroup >:
   
    Constant             Description
   
    XBP_NO_GROUP     *)  Dialog element does not belong to a group
    XBP_BEGIN_GROUP      Dialog element is the first in a group
                         (this begins the definition of the group)
    XBP_WITHIN_GROUP     Dialog element is within a group
    XBP_END_GROUP        Dialog element is the last in a group
                         (this ends the definition of the group)
   
   *) Default value
   
   GROUP < cGroup > is a "group" name (case-sensitive) to assign to
   this GetList object.  Assignment to a group makes it possible to
   perform operations only on GetList items which are members of a
   specified group, using functions such as DC_GetRefresh() or
   DC_ReadGui().
   
   VISIBLE determines whether the object is visible immediately after
   the call to the method :create() . By default the object follows
   the VISIBLE clause of the DCGETOPTIONS command.  Use the
   INVISIBLE clause to override the VISIBLE clause of DCGETOPTIONS
   
   MENU < acMenu > is a multi-dimensional array containing an optional
   menu to attach to the top of the dialog window.  The menu must
   conform to the specifications of menus returned by the menu
   dictionary system.  This may also be a character string of up to
   8 characters containing the NAME of the menu.  See DC_MenuLoad().
   MSGBOX < oMsgBox > is the message box object which will receive
   PROMPT messages from the menu when the user navigates throug the
   menu.
   
   NOMINBUTTON will suppress the painting of a minimize button on
   the dialog window.
   
   NOMAXBUTTON will suppress the painting of a maximize button on
   the dialog window.
   
   BORDER < nBorder > defines the border type of the dialog window.
   Constants defined in the XBP.CH file can be assigned to < nBorder >.
   The following table shows the valid #define constants.
   
    Constant                            Description
   
    XBPDLG_NO_BORDER                    No border
    XBPDLG_SIZEBORDER                   Window is sizeable
    XBPDLG_THINBORDER               *)  Thin border, window size
                                        cannot be changed
    XBPDLG_DLGBORDER                    Thick border, window size
                                        cannot be changed
    XBPDLG_RAISEDBORDERTHICK       **)  Thick, raised border
   
    XBPDLG_RAISEDBORDERTHIN         *)  Thin, raised border
    XBPDLG_RECESSEDBORDERTHICK          Thick, recessed border
    XBPDLG_RECESSEDBORDERTHIN       *)  Thin, recessed border
    XBPDLG_RAISEDBORDERTHICK_FIXED      Thick, raised border,
                                        size cannot be changed
    XBPDLG_RAISEDBORDERTHIN_FIXED   *)  Thin, raised border,
                                        size cannot be changed
   
    XBPDLG_RECESSEDBORDERTHICK_FIXED    Thick, recessed border,
                                        size cannot be changed
    XBPDLG_RECESSEDBORDERTHIN_FIXED *)  Thin, recessed border,
                                        size cannot be changed
   
   *) not supported by Windows    **) Default border
   
   If a dialog is embedded as MDI client within another dialog,
   Windows ignores all border styles except XBPDLG_RAISEDBORDERTHICK
   and XBPDLG_RECESSDBORDERTHICK. In all other cases, a border is
   displayed for MDI clients that corresponds to
   XBPDLG_RAISEDBORDERTHICK.
   
   NOTASKLIST will insure that the dialog window is not placed on
   the Windows task bar.
   
   MINSIZE < nMinWidth >, < nMinHeight >  is used to establish the
   minimum size of the dialog window, in pixels,  if the operator
   attempts to resize the window.  A value of -1 will set the height
   or width to the height or width that was automatically set by the
   FIT clause of DCREAD GUI.
   
   MAXSIZE < nMaxWidth >, < nMaxHeight > is used to establish the
   maximum size of tyhe dialog window, in pixels,  if the operator
   attempts to resize the window. A value of -1 will set the height
   or width to the height or width that was automatically set by the
   FIT clause of DCREAD GUI.
   
   NORESIZE will prevent the operator from resizing the dialog
   window.
   
   NOTITLEBAR will prevent a titlebar from displaying on the
   dialog window.  This will also prevent the minimize, maximize,
   and close buttons from appearing.
   
   AUTORESIZE is used to automatically resize and reposition all
   child objects so they use the real estate of the parent dialog
   in the same proportions as the child objects before the parent
   was resized.  The complete childlist tree is resized.  If it
   is desired to NOT resize ToolBars and Pushbuttons, then the
   :resize callback of the dialog object must be overwritten
   rather than using the AUTORESIZE clause as shown:
   
    bReSize :=  {|a,b,o,x|x := SetAppFocus(), ;
                               o:drawingArea:hide(), ;
                               DC_AutoReSize(a,b,o,GetList,.f.), ;
                               o:drawingArea:show(), ;
                               SetAppFocus(x) }
   
    @ .. DCDIALOG .. EVAL {|o| o:resize := bReSize }
   
   NOTE: AUTORESIZE will not resize or reposition anything on a
   dialog that was painted with a Gra*() function or a DCGRA*
   command.
   
   FIT will automatically form the dialog screen to fit comfortably
   around the objects within the dialog.  This option allows the
   programmer to use coordinates on dialog objects for relative
   addressing only without worrying about how the objects relate to
   the borders of the main dialog.  After all the objects are
   created, the main dialog borders will be sized to fit the
   objects.  The amount of dead space padding is set by using the
   FITPAD clause.  The default is 10 pixels.
   
   SETAPPWINDOW is important for proper modality.  If your dialog
   calls popup windows in validations, popup buttons, etc. you
   will want to insure that the called window is MODAL.  If you
   use the MODAL clause in the DCREAD GUI command of a popup
   window it will not work properly unless the calling window is
   the "application window".  This is accomplished with the
   SETAPPWINDOW clause.  When returning from DCREAD GUI the
   application window will be restored to the previous setting.
   

Description:

    The command @..DCDIALOG creates a new Dialog object and
    adds the object to the array named GETLIST which is later
    processed by the DC_READGUI() function or by the DCREAD GUI
    command.  The GETLIST array must be first declared and
    initialized to the value of {}.  The command DCREAD GUI activates
    the edit mode for all objects found in the GetList array.
    A Getlist object remains stored as long as it is referenced
    in an array or by a variable.  The commands CLEAR and
    CLEAR GETS assign an empty array to the GetList variable.
    This also occurs after the completion of the DCREAD command
    if it is called without the SAVE option, causing all Get
    objects referenced by the GetList array to be released.
   
    @..DCDIALOG objects can be combined with any objects that
    that use the DCDIALOG system, such as @..DCSAY..GET,
    @..DCRADIO, @..DCPUSHBUTTON, @..DCMULTILINE, etc.
   

Notes:

    The dialog object created by @ DCDIALOG is an object of the
    XbpDialog() class, therefore it can be manipulated with
    any iVar or method supported by XbpDialog().
   

Examples:

    /*
    This example demonstrates both a database browse and an
    array browse in the same dialogue screen.  The database
    browse is on Tab Page 1 and the Array browse (directory
    listing) is on Tab Page 2.
    */
   
    #include "dcdialog.ch"
    #include "xbp.ch"
   
   
    PROCEDURE Xtest()
   
    LOCAL GetList := {}, GetOptions, oTabPage1, oTabPage2, ;
          oBrowse, cAlias, aDirectory, oDirectory
   
    USE COLLECT NEW SHARED
   
    /* ---- Tab Page #1 ---- */
   
    @ 3,3 DCTABPAGE oTabPage1 CAPTION 'Browse' ;
      SIZE 60,12
   
    cAlias := "BASEBALL"
   
    @ 2,2 DCBROWSE oBrowse PARENT oTabPage1  ;
          DATA cAlias SIZE 55,9 FREEZELEFT { 1, 2 }
   
    DCBROWSECOL FIELD COLLECT->descrip ;
      HEADER "Description" PARENT oBrowse
   
    DCBROWSECOL FIELD COLLECT->type ;
      HEADER "Type" PARENT oBrowse
   
    DCBROWSECOL FIELD COLLECT->sub_type ;
      HEADER "SubType" PARENT oBrowse
   
    DCBROWSECOL FIELD COLLECT->location ;
      HEADER "Location" PARENT oBrowse
   
    DCBROWSECOL DATA {|a|a:={'Yes','No','Not Sure'},a[COLLECT->for_sale+1]} ;
      HEADER "For Sale?" PARENT oBrowse
   
    DCBROWSECOL FIELD COLLECT->date_orig ;
      HEADER "Orig Date" PARENT oBrowse
   
    DCBROWSECOL FIELD COLLECT->date_acqu ;
      HEADER "Acqu Date" PARENT oBrowse
   
    DCBROWSECOL FIELD COLLECT->orig_price ;
      HEADER "Acqu Price" PARENT oBrowse
   
    DCBROWSECOL FIELD COLLECT->appr_value ;
      HEADER "Appr Value" PARENT oBrowse
   
    DCBROWSECOL FIELD COLLECT->condition ;
      HEADER "Condition" PARENT oBrowse
   
    DCBROWSECOL DATA {||IIF(COLLECT->original,'Yes','No')} ;
      HEADER "Orig Owner?" PARENT oBrowse
   
   
    /* ---- Tab Page #2 ---- */
   
    @  0,0 DCTABPAGE oTabPage2 CAPTION 'Directory' ;
       RELATIVE oTabPage1
   
    aDirectory := Directory()
   
    @ 2,2 DCBROWSE oDirectory PARENT oTabPage2 ;
          DATA aDirectory SIZE 55,9
   
    DCBROWSECOL ELEMENT 1 HEADER "Name" PARENT oDirectory WIDTH 10
   
    DCBROWSECOL ELEMENT 2 HEADER "Size" PARENT oDirectory WIDTH 8
   
    DCBROWSECOL ELEMENT 3 HEADER "Date" PARENT oDirectory WIDTH 8
   
    DCBROWSECOL ELEMENT 4 HEADER "Time" PARENT oDirectory WIDTH 8
   
    DCREAD GUI ;
      TITLE "My COLLECTION" ;
      FIT ;
      ADDBUTTONS ;
      EVAL {||oBrowse:hide(), oBrowse:show()}
   
    RETURN
   

Source/Library:

  DCDIALOG.CH

@ DCDIRTREE

Create a DIRECTORY TREE object for displaying with GUI reader

Syntax:

   @ < nRow >, < nCol > DCDIRTREE ;
       [DIRS < oDirs > [VAR < cDirVar >] [DATALINK < bDirLink >]] ;
       [FILES < oFiles > [VAR < cFileVar >] [DATALINK < bFileLink >]] ;
       [PARENT < oParent >] ;
       [EXT < ExtList,... >] ;
       [COLOR < bfgC > [, < bgC > ]] ;
       [WHEN < bWhen >] ;
       [HIDE < bHide >] ;
       [FONT < bocFont >] ;
       [SIZE < nWidth > [,< nHeight >]] ;
       [DIRSIZE < nDirWidth > [,< nDirHeight >] ;
       [DIRPOS < nDirCol >, < nDirRow > ] ;
       [FILESIZE < nDirWidth > [,< nDirHeight >] ;
       [FILEPOS < nDirCol >, < nDirRow > ] ;
       [AVAILDRIVES < cAvailDrives >] ;
       [TITLE < title >] ;
       [PREEVAL < bPreEval >] ;
       [EVAL < bEval >] ;
       [RELATIVE < oRel >] ;
       [ID < cId >] ;
       [TITLE < cTitle >] ;
       [GOTFOCUS < bGotFocus >] ;
       [LOSTFOCUS < bLostFocus >]  ;
       [TABSTOP] ;
       [NOTABSTOP] ;
       [TABGROUP < nTabGroup >] ;
       [GROUP < cGroup >] ;
       [VISIBLE] ;
       [INVISIBLE]
   

Arguments:

   < nRow >, < nCol > are the coordinates on the screen.
   Coordinates are always relative to position 0,0 ie. Top,Left
   of the parent object, unless the RELATIVE < oRel > argument is
   used.  If no parent is assigned, then the parent is the Dialog
   box.  IF the PIXEL option is set to .TRUE. in DCGETOPTIONS,
   then the numbers are in pixels otherwise they are in standard
   text-based coordinates.  You can also force the pixel mode by
   including PIXEL as a command argument.
   
   DIRECTORY COMPONENT
   
     DIRS < oDirs > is a local variable name to store the pointer
     to the object for the Directory portion of the dialog.
   
     VAR < cDirVar > is a local variable name to store the value
     of the directory that is chosen by the user.
   
     DATALINK < bDirLink > is a code block that is evaluated when
     a new directory is selected by the user.
   
   
   FILES COMPONENT
   
     FILES < oFiles > is a local variable name to store the pointer
     to the object for the FILES portion of the dialog.
   
     VAR < cFileVar > is a local variable name to store the value
     of the file that is chosen by the user.
   
     DATALINK < bFileLink > is a code block that is evaluated when
     a new file is selected by the user.
   
   PARENT < oParent > is the name of the variable that was assigned to
   the parent object for this object.  Only use this command if you
   are placing this object onto another dialogue object.  If this
   argument is not passed then the parent will be the object set
   with the DCSETPARENT command.
   
   EXT < ExtList,... > is a comma-delimited list of file extensions
   that will display in a picklist below the FILES portion of the
   directory tree dialog.  When the user selects one of the
   extensions, only files with the chosen extension will be
   displayed.
   
   COLOR < ncFGc >, < ncBGc > are foreground and background colors.
   They may be character strings representing valid text-based
   colors supported by SetColor() or they may be numeric constants
   which begin with either the prefix GRA_CLR_ or the prefix
   XBPSYSCLR_ as defined in GRA.CH or XBP.CH.
   
   FONT < font > is the name of the font to use for both the
   directory and file dialog boxes. It may also be a a character
   string, a font object or a code block that returns a character
   string or a font object to later refresh with DC_GetRefresh().
   
   SIZE < nWidth >,< nHeight > is the width and height of the
   listbox.  If the PIXEL option is set to .TRUE. in DCGETOPTIONS,
   then the numbers are in pixels otherwise they are in standard
   text-based numbers.  The DIRECTORY dialog component occupies
   60% of the total width and the FILES dialog component occupies
   40% of the total width unless a DIRSIZE argument is used.
   
   DIRPOS < nDirCol > and < nDirRow > is the position within the window
   of the DIRECTORY component.
   
   DIRSIZE < nDirWidth > and < nDirHeight > is the size of the
   DIRECTORY dialog component.  If the PIXEL option is set to
   .TRUE. in DCGETOPTIONS, then the width is is pixels otherwise
   it is in standard text-based numbers.  If < nDirWidth > is equal
   to or greater than < nWidth > above, then there will be no FILE
   COMPONENT displayed.
   
   FILEPOS < nFileCol > and < nFileRow > is the position within the window
   of the FILES component.
   
   FILESIZE < nFileWidth > and < nFileHeight > is the size of the
   FILES dialog component.  If the PIXEL option is set to
   .TRUE. in DCGETOPTIONS, then the width is is pixels otherwise
   it is in standard text-based numbers.
   
   AVAILDRIVES < cAvailDrives > is a character string containing the
   letters of all drives which are available for browsing.  For
   example the string "CDEHIJK" will prevent the floppy drives
   (A and B) from being accessed.  The default is all drives.
   
   PREEVAL < bPreEval > is a code block to be evaluated by the GUI
   reader before the Xbase Parts object is created.  The object is
   passed to the code block.
   
   EVAL < bEval > is a code block to be evaluated by the GUI reader
   after the Tree View objects are created.  The FILE object is
   passed to the code block.
   
   CARGO < xCargo > is any kind of data you wish to to add to the
   :cargo container for this object.  The cargo may be accessed
   at any time via the :cargo exported variable, however it will not
   be stored in the same manner it is entered.  The :cargo container
   of DCDIALOG objects is an array of at least three elements:
   
    [1] - A numeric value that is a pointer to the Getlist array
          for this object.
   
    [2] - A pointer to the GetList array.
   
    [3] - The value of < xCargo >.
   
    [4] and up - optional values added by the GUI reader.
   
   ID < cId > is a unique identifier for this object.  This ID is used
   with functions like DC_GETORIGUPDATED() to determine the status
   of a get object.
   
   TITLE < cTitle > is a title to assign to this object.  The title
   is not displayed on the screen but is simply a description of the
   get object which is saved in the GetList.
   
   HIDE < bHide > is a code block that is evaluated in the event loop.
   This code block must return a logical value.  If the value
   returned is .TRUE. then the object will be hidden from view.  If
   the value returned is .FALSE. then the object will be displayed.
   The object is passed as a parameter to the code block.
   
   WHEN < bWhen > is a code block that is evaluated in the event loop.
   This code block must return a logical value.  If the value
   returned is .FALSE. then the object will be disabled and grayed.
   If the value returned is .TRUE. then the object will be enabled.
   The object is passed as a parameter to the code block.
   
   GOTFOCUS < bGotFocus > is a code block that is evaluated when this
   object receives input focus.  < bGotFocus > := {|uNIL1,uNIL2,self|...}
   
   LOSTFOCUS < bLostFocus > is a code block that is evaluated when this
   object loses input focus.  < bLostFocus > := {|uNIL1,uNIL2,self|...}
   
   TABSTOP will cause the object (Xbase Part) to be set when using
   the Tab key.  Note: When logical groups are defined in a dialog
   using TABGROUP < nTabGroup >, TABSTOP is usually set to .T. (true)
   for the first dialog element in the group.  This allows the first
   dialog element of a group to be activated using the Tab key.
   
   NOTABSTOP will cause the object (Xbase Part) to be ignored when
   using the Tab key. This clause is needed only to override any
   default setting of TabStop by the DCGETOPTIONS [TABSTOP] command.
   
   TABGROUP < nTabGroup > allows objects (Xbase Parts) that are created
   immediately after one another in the GetList to be combined into
   logical groups. This allows the user to navigate within a dialog
   from group to group by pressing the Tab key.  Within a group of
   dialog elements navigation is performed using the cursor keys.
   
   Only constants defined in the XBP.CH file can be used as values
   for this instance variable.  The following table lists the
   available constants:
   
   #define constants for < nTabGroup >:
   
    Constant             Description
   
    XBP_NO_GROUP     *)  Dialog element does not belong to a group
    XBP_BEGIN_GROUP      Dialog element is the first in a group
                         (this begins the definition of the group)
    XBP_WITHIN_GROUP     Dialog element is within a group
    XBP_END_GROUP        Dialog element is the last in a group
                         (this ends the definition of the group)
   
   *) Default value
   
   GROUP < cGroup > is a "group" name (case-sensitive) to assign to
   this GetList object.  Assignment to a group makes it possible to
   perform operations only on GetList items which are members of a
   specified group, using functions such as DC_GetRefresh() or
   DC_ReadGui().
   
   VISIBLE determines whether the object is visible immediately after
   the call to the method :create() . By default the object follows
   the VISIBLE clause of the DCGETOPTIONS command.  Use the
   INVISIBLE clause to override the VISIBLE clause of DCGETOPTIONS
   

Description:

    The command @..DCDIRTREE creates a new Directory Tree object
    and adds the object to the array named GETLIST which is later
    processed by the DC_READGGUI() function or by the DCREAD GUI
    command.  The GETLIST array must be first declared and
    initialized to the value of {}.  The command DCREAD GUI activates
    the edit mode for all objects found in the GetList array.
    A Getlist object remains stored as long as it is referenced
    in an array or by a variable.  The commands CLEAR and
    CLEAR GETS assign an empty array to the GetList variable.
    This also occurs after the completion of the DCREAD command
    if it is called without the SAVE option, causing all Get
    objects referenced by the GetList array to be released.
   
    DCDIRTREE is a dialog that consists of two parts, a DIRECTORY
    component and a FILES component.  The directory component
    contains a Tree View of the directory and drives of the
    computer and the FILES component contains a list of the files
    in the selected directory that match the selected wildcard
    extension.
   
    @..DCDIRTREE objects can be combined with any objects that
    that use the DCDIALOG system, such as @..DCSAY..GET,
    @..DCRADIO, @..DCPUSHBUTTON, @..DCCHECKBOX or @..DCTABPAGE.
   

Notes:

    The Directory object and File object created by @ DCDIRTREE are
    objects of the XbpTreeView() class, therefore they can be manipulated with
    any iVar or method supported by XbpTreeView().
   

Examples:

   #include "dcdir.ch"
   
   PROCEDURE XTest( )
   
   LOCAL GetList := {}, oDirs, oFiles, cFileName, ;
         oFileName, cDirectory
   
   cFileName := Space(30)
   cDirectory := ''
   
   @ 2,1 DCGET cFileName GETSIZE 40 GETOBJECT oFileName
   
   @ 3.5,1 DCDIRTREE ;
          DIRS oDirs VAR cDirectory ;
          FILES oFiles VAR cFileName DATALINK {||oFileName:SetData()} ;
          SIZE 40,10.5 ;
          EXT '*.ICO','*.BMP','*.JPG','*.*'
   
   DCREAD GUI ;
      TITLE 'eXPress++ Demo Program' ;
      FIT ;
      ADDBUTTONS
   
   
   RETURN
   

Source/Library:

  DCDIR.CH

See Also:

   dc_popdir()



@ DCFINDBROWSE

A browse-window find utility that uses AutoSeek

Syntax:

    @ [ < nRow >,< nCol > ] DCFINDBROWSE          ;
            FIELDS < aFields >                  ;
            [PARENT < oParent >]                ;
            [SIZE < nWidth >, < nHeight >]        ;
            [TITLE < cTitle >]                  ;
            [AUTOSEEK]                        ;
            [PIXEL]                           ;
            [DATA < acbData >]                  ;
            [POINTER < nPointer >]              ;
            [EVAL < bEval >]                    ;
            [PRESENTATION < aPres >]            ;
            [NOHEADERS]                       ;
            [NOHSCROLL]                       ;
            [NOVSCROLL]                       ;
            [EXIT]                            ;
            [SEEKDELAY < nDelay >]              ;
            [TO < lStatus >]                    ;
            [FONT < cFont >]                    ;
            [LEFTBUTTONSORT]                  ;
            [POPUP < bPopUp >]
   

Arguments:

   FIELDS < aFields > is a multidimensional array that defines the
   columns of data to browse.
   
   Element   Type   Description
   -------   ----- ---------------------------------------------
     [1]       B    Code Block (ex: {||CUSTOMER- >name})
   
     [2]       C    Header (ex: "Customer Name")
   
     [3]       N    Column Width (ex: 10)
   
     [4]       C    Index Name or Tag (ex: "CUSTNAME")
   
     [5]       C    Index Prompt (ex: "Customer Name")
   
     [6]      C/B   Prefix for AutoSeek
   
     [7]       B    Seek string code block. User input buffer
                    is passed to this code block and return
                    value of code block is used for the seek.
                    ex: {|c|Right(Space(7)+Alltrim(cString),7)}
   
   Note: Only elements 1 and 2 are required.
   
   PARENT < oParent > is the Parent window to paint the objects.
   If no parameter is passed a  modal window will be created.
   
   < nRow > and < nCol > are the starting coordinates from the top
   left of the parent window to paint the objects. These are text
   based coordinates which may include decimals.  If no parent
   parameter is passed, these arguments are not needed.
   
   SIZE < nWidth >, < nHeight > are the width and height of the window
   in text-based coordinates.  The defaults are 65 columns and
   15 rows.
   
   TITLE < cTitle > is the title to display in the titlebar area of the
   dialog window.
   
   AUTOSEEK will include a GET for the user to enter keys to seek
   automatically.  If this argument is not used then only a browse
   will be displayed.  The prefix value of the selected column is
   inserted before the seek string.  This may be a code block or
   a string.  If it is a code block it must return a string when
   evaluated.
   
   NOHEADERS will suppress the display of headers and the horizontal
   scroll bar in the browse.
   
   PIXEL assumes coordinates are pixel-based, otherwise they are
   text-based.
   
   DATA < acbData > is the data source.  If it is a code block it
   must return an Alias() or an array when evaluated.  If it is
   an alias the database must already be opened.  If it is an
   array, the array must be two-dimensional.
   
   POINTER @< nPointer > is a numeric variable (passed by reference)
   to store the array element selected when the user double-clicks
   on the browse or presses ENTER.  Used when browsing arrays only.
   
   EVAL < bEval > is a code block to evaluate after the Browse
   object is created and just before invoking the event handler.
   The parent dialog object and the browse object are passed as
   parameters: {|oDlg,oBrowse|...}
   
   PRESENTATION < aPres > is a two-element array of two subarrays.
   The first element is a Presentation Parameters array that
   follows the Xbase++ specification for Browse Presentation
   parameters.  The second element is a two-element array :
   
   { aHeaderFG, aHeaderBG }
   
    < aHeaderFG > and < aHeaderBG > are the foreground and background
    colors of the selected column.  This is the column selected by
    the user for sorting or selecting an index.
   
   NOHSCROLL will suppress the horizontal scrollbar and not allow
   resizing of columns.
   
   NOVSCROLL will suppress the vertical scroll bar.
   
   EXIT exit without destroying the dialog window.
   
   SEEKDELAY < nSeekDelay > is the number of seconds after a key is
   pressed to wait before performing the seek.  This allows a
   string to be typed without performing a seek everytime a key
   is pressed. The default is .1 seconds.  If < nSeekDelay > is 0
   then the seek is not performed until the ENTER key is pressed.
   
   TO < lStatus > is a variable to store a logical value that is
   returned by the DC_FindBrowse() function.  If the user exits
   by selecting an item, < lStatus > will contain a .TRUE. value
   otherwise it will be .FALSE.
   
   FONT < cFont > is the Font Compound Name to use for the browse
   columns.
   
   LEFTBUTTONSORT will allow the operator to use the left mouse
   button on the column headers to select the sort order, otherwise
   only the right button will be enabled for sorting and the left
   button will allow for sizing the columns.
   
   POPUP < bPopUp > is a code block to evaluate.  If this variable is
   a code block, a popup button will be placed to the right of the
   GET used for entering a seek value.  If the user clicks on this
   button or presses CTRL-ENTER while in the GET, the code block
   will be evaluated.  The value in the GET is passed to the code
   block and the value returned by the code block is stuffed back
   into the GET.
   

Description:

   @ DCFINDBROWSE is a utility command that paints a browse
   with user-defined columns and a entry GET for the user to
   enter keyboard characters.  The keys entered will automatically
   seek the selected index and refresh the browse.  The user can
   click the right mouse button on a column heading to select a
   different index.  The Up, Down, Page Up, Page Down, Ctrl Page Up,
   Ctrl Page Down and Enter keys are all enabled while the user
   is in the entry GET to allow the user to navigate the browse
   with keys or the mouse or enter keys for seeking.
   

Examples:

   // Example 1 - Popup a Browse with multiple columns and AutoSeek
   
   FUNCTION XTest()
   
   LOCAL GetList := {}, oBrowse, aFields, aHeaders, aPres, nRecord
   
   SET DEFA TO ..\XDOC
   USE EXPRESS VIA FOXCDX EXCLUSIVE ALIAS 'XDOC'
   SET INDEX TO EXPRESS.CDX
   OrdSetFocus('COMMAND')
   SET DEFA TO
   
   aFields := {}
   
   DCFINDADDCOL DATA {||XDOC->command} TAG 'COMMAND' PROMPT 'Command' ;
      HEADER 'Command' TO aFields
   
   DCFINDADDCOL DATA {||XDOC->short} HEADER 'Short' TO aFields
   
   DCFINDADDCOL DATA {||XDOC->type} HEADER 'Type' TO aFields  ;
      TAG 'TYPE' PROMPT 'Type'
   
   DCFINDADDCOL DATA {||XDOC->module} HEADER 'Module' TO aFields  ;
      TAG 'TYPE' PROMPT 'Type' TO aFields
   
   DCFINDADDCOL DATA {||XDOC->see_also} HEADER 'See Also' TO aFields
   
   @ DCFINDBROWSE FIELDS aFields DATA 'XDOC' SIZE 50,10 AUTOSEEK
   
   
   RETURN nil
   

Source/Library:

  DCDIALOG.CH

See Also:

   dc_findbrowse()
   DCFINDADDCOL



@ DCGET

Create a GET object for displaying with the text/GUI reader

Syntax:

   @ < nRow >,< nCol > DCGET < uVar > ;
     * [DATALINK < bLink >] ;
       [GETCOLOR < bncFgC >,[< ncBgC >] ] ;
     * [GETSIZE < nWidth > [,< nHeight >]] ;
       [PARENT < oParent >] ;
       [PARENTID < cParentId >] ;
       [MESSAGE < bcMsg > [INTO < oMsgBox >]] ;
       [VALID < bValid >] ;
       [POPUP < bPopUp >] ;
          [POPCAPTION < ncaCaption] ;
          [POPFONT < cPopFont >] ;
          [POPWIDTH < nPopWidth >] ;
          [POPHEIGHT < nPopHeight >] ;
          [POPSTYLE < nPopStyle >] ;
          [POPKEY < anPopKey > ;
          [POPTABSTOP] ;
          [POPGLOBAL] ]  ;
          [POPTOOLTIP < bcPopToolTip >] ;
       [HELPCODE < cHelp >] ;
     * [PICTURE < cPict >] ;
       [GETFONT < bocFont >] ;
     * [UNREADABLE] ;
     * [CONFIRM] ;
     * [NOCONFIRM] ;
       [HIDE < bHide >] ;
       [WHEN < bWhen >] ;
     * [EDITPROTECT < bProtect >] ;
     * [PIXEL] ;
     * [GETPRESENTATION < aPres >] ;
       [GETTOOLTIP < bcToolTip >] ;
       [GETOBJECT < oObject >] ;
     * [CURSOR < naCursor >] ;
       [CARGO < xCargo >] ;
       [PREEVAL < bPreEval >] ;
       [EVAL < bEval >] ;
       [RELATIVE < oRel >] ;
       [GETID < cId >] ;
       [TITLE < cTitle >] ;
     * [ACCELKEY < anAccel >] ;
     * [GOTFOCUS < bGotFocus >] ;
     * [LOSTFOCUS < bLostFocus >] ;
     * [TABSTOP]  ;
     * [NOTABSTOP];
     * [TABGROUP < nTabGroup >] ;
     * [VISIBLE] ;
     * [INVISIBLE] ;
       [GROUP < cGroup >] ;
     * [KEYBLOCK < bKeyBlock >] ;
     * [PROPER [PROPOPTIONS < aPropOptions >]] ;
       [COMBO ;
          [HEIGHT < nComboHeight >] ;
          [DATA < acbComboData >]        ;
          [FIELD < bField >] ;
          [ELEMENT < nElement >] ;
          [RETURN < bReturn >] ;
          [CAPTION < oncComboCaption >] ;
          [FONT < ocComboFont >] ;
          [HOTKEY < nComboHotKey >] ] ;
       [NAME < cVarName >]
   

Arguments:

   GUI applications:
   
   < nRow > and < nCol > are the row and column of the screen.
   Coordinates are always relative to position 0,0 ie. Top,Left
   of the parent object, unless the RELATIVE < oRel > argument is
   used.  If no parent is assigned, then the parent is the Dialog
   box. IF the PIXEL option is set to .TRUE. in DCGETOPTIONS,
   then the numbers are in pixels otherwise they are in standard
   text-based coordinates.  You can also force the pixel
   mode by including PIXEL as a command argument.
   
   < nRow > may be assigned the value DCGUI_ROW.  This will paint
   the object at the same row as the previous object.  It is
   provided to emulate the Row() function in text-based applications.
   
   < nCol > may be assigned the value DCGUI_COL + < nOffset >.  This
   will paint the object immediately to the right of the previous
   object plus < nOffset > pixels.  It is provided to emulate the Col()
   function in text-based applications.
   
   HTML applications:
   
   < nRow > and < nCol > are the row number and column number of
   the table if the parent of this object is a DCTABLE. The
   text will be inserted in the cell of the table defined by
   the row/column.
   
   GET < uVar > is the variable to GET.  This may be a variable
   of any type except an object or array. It must not be a macro.
   The < uVar > is automatically anchored via a Get-Set codeblock
   created by DC_GetAnchorCB() unless < uVar > is a custom Get-Set
   code block. Macros may be used in a custom Get-Set code block.
   
   OBJECT | GETOBJECT < oObject > is the variable to use as a container
   for the object after it is created by the GUI reader.
   
   RELATIVE < oRel > is an optional object in the Getlist which
   determines the start coordinates of this object.  If this
   option is used, then the < nSrow >, < nSCol > coordinates are
   relative to the starting coordinates of < oRel > rather than
   the parent object.
   
   DATALINK < bLink > is an optional code block that is evaluated
   every time Get/Set codeblock is evaluated, ie when the data
   is read from the < uVar > into the object except when using
   a user-defined Get/Set code block.  < bLink > is also
   evaluated when DC_GetRefresh() is called unless the < lDataLink >
   parameter of DC_GetRefresh() is .FALSE.
   
   CARGO | GETCARGO < xCargo > is any kind of data you wish to to add
   to the :cargo container for this object.  The cargo may be
   accessed at any time via the :cargo exported variable, however
   it will not be stored in the same manner it is entered.  The
   :cargo container of DCDIALOG objects is an array of at least
   three elements:
   
    [1] - A numeric value that is a pointer to the Getlist array
          for this object.
   
    [2] - A pointer to the GetList array.
   
    [3] - The value of < xCargo >.
   
    [4] and up - optional values added by the GUI reader.
   
   FONT | GETFONT < cFont > is a character string defining an optional
   font. The font string must conform to the Xbase++ standard, ie.
   "10.Courier.Bold". It may also be a font object or a code block
   that returns a character string or a font object to later
   refresh with DC_GetRefresh().
   
   SIZE | GETSIZE < nGetWidth > [,< nGetHeight >]] is the size to
   allocate to the GET variable.  If the PIXEL option is set to
   .TRUE. in DCGETOPTIONS, then the size must be entered in
   pixels otherwise it must be entered in standard text
   length.  If no GETSIZE argument is used, then the get will
   be automatically sized to the size established by transforming
   the contents of of the get variable to a string to determine
   the length of the get.   The default font for GETS in
   eXpress++ is 12.Courier because this provides the best user
   font for data-entry, so it is usually not necessary to use
   this option unless you are also using the FONT parameter.
   
   PARENT < oParent > is the name of the variable that was assigned to
   the parent object for this object.  Only use this clause if you
   are placing this object onto another dialogue object.  If this
   argument is not passed then the parent will be the object set
   with the DCSETPARENT command.
   
   PARENTID < cParentID > may be used in lieu of the PARENT < oParent >
   clause.  This identifies the ID of the parent instead of the
   parent's object variable name.
   
   MESSAGE < bcMsg > is the message you want to display in the
   message area of the dialogue screen defined by the DCMESSAGEBOX
   command when the object is in focus.  Optionally, INTO < oMsgBox >
   will designate which message box to display the message into.
   If the INTO clause is not used, then the last message box in the
   GetList is the default. < oMsgBox > may also be any object that
   supports the :setCaption() method.  If < bcMsg > is a code-block,
   it must return a character string.
   
   PICTURE < cPict > is a character string specifying formatting
   options for the value of < VarName > during display and editing.
   
   POPUP < bPopUp > will paint a mouse button at the end of the GET
   variable on the screen which informs the operator than an
   additional picklist will pop-up if the operator single-clicks on
   the button or if the operator presses the CTRL-J or CTRL-ENTER
   key while the GET has input focus.  The code block will be
   evaluated when the button is clicked.  The following three
   parameters are passed to the codeblock :
   
     1. The value in the current GET
     2. A pointer to the GET object
     3. The reference value established by the REFERENCE clause
   
   The value returned by the code block will be placed back in the
   GET.  The code block may return an optional array of two
   elements rather than a single value to store to the GET.  If a
   two-element array is returned, the first element must be the
   value to store in the GET and the second element must be a
   pointer to the object which is to receive focus. This provides
   for the ability to force the focus to a different object on a
   POPUP  other than the GET.
   
   The POPUP clause is used for popups like calendars, calculators,
   picklists, etc.  The default caption on the button is three dots.
   To change the caption or button display options, use the
   function DC_GetPopupCaption().
   
   POPCAPTION < ncaCaption > is the optional caption of the button.
   This will override the DC_PopupCaption() setting.   This will override the
   DC_GetPopupCaption() setting. If < ncaCaption > is an array, it
   must be an array of 2 elements where the first element is the
   bitmap resource number of the caption to display when the GET is
   enabled and the second element is the bitmap resource number of
   the caption to display when the GET is disabled with the WHEN
   clause.
   
   POPFONT < cFont > is the optional font of the button.  This will override the
   DC_GetPopupCaption() setting.
   
   POPWIDTH < nWidth > is the width (in pixels) of the button.  This
   will override the default width.
   
   POPHEIGHT < nHeight > is the height (in pixels) of the button.
   This will override the default height. POPSTYLE < nStyle > is the
   style of the popup button:
   
     POPSTYLE < nStyle >          Description
     -------------------------  ----------------------------------
     DCGUI_POPUPSTYLE_OUTSIDE   Button is outside and to the right
                                of the GET.
     DCGUI_POPUPSTYLE_IMBEDDED  Button is imbedded within the GET.
   
   POPKEY < anPopKey > is a numeric key value or an array of numeric
   key values that may be assigned to invoke the popup button when
   the key is pressed.  An additional POPGLOBAL clause may be used
   to establish that the assigned key is active regardless of the
   object that is in focus, otherwise the key will be active only
   when the associated get has focus.  Key values are defined in
   APPEVENT.CH and start with the definition xbeK_*.
   
   POPTABSTOP will cause the TABSTOP key to be active on the popup
   button so the user may tab from the GET to the popup button.
   
   POPTOOLTIP < bcPopToolTip > is a character string which will display
   as a "Tool Tip" next to the popup button the mouse is passed
   over the popup button. A semi-colon within the text indicates a new
   line.  If < bcToolTip > is a code-block, it must return a character
   string.  NOTE: The Tooltip painting method is run in another
   thread, therefore the codeblock should not run code that points
   to the current work area.  It may however, contain local, public
   or private variables.
   
   The UNREADABLE clause will cause text to be displayed as asterisks
   (*) for inputting sensitive data such as passwords.
   
   The NOCONFIRM clause will cause the GET to be exited when the
   cursor reaches the end of the buffer during keyboard entry.
   Normally, the GET can be exited only by pressing the ENTER key,
   TAB key, UP key, DOWN key or clicked on another object.  This
   overrides the setting of CONFIRM in DCGETOPTIONS.
   
   The CONFIRM clause will cause the GET to be exited by pressing
   the ENTER key.  This overrides the setting of NOCONFIRM in
   DCGETOPTIONS.
   
   WHEN < bWhen > is a code block that is evaluated in the event loop.
   This code block must return a logical value.  If the value
   returned is .FALSE. then the object will be disabled and grayed.
   If the value returned is .TRUE. then the object will be enabled.
   The object is passed as a parameter to the code block.
   
   HIDE < bHide > is a code block that is evaluated in the event loop.
   This code block must return a logical value.  If the value
   returned is .TRUE. then the object will be hidden from view.  If
   the value returned is .FALSE. then the object will be displayed.
   The object is passed as a parameter to the code block.
   
   EDITPROTECT < bProtect > is an optional condition tested during the
   execution of the GUI gets by the DCREAD GUI command, before the
   object receives input focus (before it is activated). When the
   condition returns the value .T. (true), the object receives the
   input focus.  Otherwise, it is skipped. < bProtect > is a code
   block that must return a logical value when evaluated. The code
   block is evaluated prior to the object receiving input focus.
   This clause behaves similar to the WHEN clause with the exception
   that the object is not disabled (grayed out).  The object is
   passed as a parameter to the code block.
   
   VALID < bValid > is an optional condition tested during the
   execution of the GUI gets by the READ command before a Get
   object loses input focus (before it is deactivated).  When
   the condition returns the value .T. (true), the Get object
   loses the input focus.  Otherwise, it remains active. < bValid >
   is a code block that must return a logical value when it is
   evaluated.  The object passed as a parameter to the code block.
   
   HELPCODE < cHelp > is a character string that is passed to the
   DC_HelpF1() function if F1 is pressed or the HELP button
   is clicked when this GET has focus.  This HELPCODE allows
   the Help system to override the passing of the Procedure and
   Varname for more specific context-help.
   
   GETPRESENTATION < aGetPres > is a two-dimensional array. If
   specified, this contains presentation parameters for the GET
   object.  The first column of the array must contain #define
   constants from the XBP.CH file starting with the prefix
   XBP_PP_. These constants define the presentation parameters
   that can be set for the object and include colors and fonts.
   The second column of the array in < aSayPres > contains the value
   for each setting.  These are also generally set using #define
   constants from the GRA.CH file.
   
   TOOLTIP | GETTOOLTIP < bcGetToolTip > is a character string which
   will display as a "Tool Tip" next to the object when the cursor
   is passed over the object. A semi-colon within the text indicates
   a new line.  If < bcToolTip > is a code-block, it must return a
   character string.  NOTE: The Tooltip painting method is run in
   another thread, therefore the codeblock should not run code that
   points to the current work area.  It may however, contain local,
   public or private variables.
   
   CURSOR | GETCURSOR < naCursor > may be either a numeric value or
   an array of 3 elements which defines an optional mouse pointer
   to use for this object.  System mouse pointers start with
   XBPWINDOW_POINTERTYPE_ and are defined in XPB.CH.  The default
   pointer is XBPWINDOW_POINTERTYPE_POINTER.  < naCursor > may be a
   numeric resource ID that points to a Bit-Map that has been
   compiled with the resource compiler and linked to the .EXE.
   < naCursor > may be a 3-element array described as follows:
   
     Element  Type  Description
     -------  ---- ---------------------------------------------
       [1]      C   Optional name of .DLL containing the pointer
                    resource.
   
       [2]      N   The numeric resource ID of the pointer.  If
                    element 1 is a NIL, then this resource must be
                    linked into the .EXE.
   
       [3]      N   The type of resource as defined in XBP.CH.
   
   COLOR | GETCOLOR < ncFGc >, < ncBGc > are foreground and background
   colors. They may be character strings representing valid text-based
   colors supported by SetColor() or they may be numeric constants
   which begin with either the prefix GRA_CLR_ or the prefix
   XBPSYSCLR_ as defined in GRA.CH or XBP.CH. If < bncFGc > is a
   code block is must return a 2-element array containing a
   foreground and background color.
   
   GETID < cId > is a unique identifier for this object.  This ID is used
   with functions like DC_GETORIGUPDATED() to determine the status
   of a get object.
   
   PREEVAL < bPreEval > is a code block to be evaluated by the GUI
   reader before the Xbase Parts object is created.  The object is
   passed to the code block.
   
   EVAL < bEval > is a code block to be evaluated by the GUI reader
   after the Xbase Parts object is created.  The object is passed
   to the code block.
   
   ACCELKEY < anAccel > is a numeric "hot-key" assignment that will set
   focus to the checkbox object when the hot-key is pressed.  The key
   must be a valid key with the prefix xbeK_*.  These keys are
   defined in APPEVENT.CH.  < anAccel > may also be an array of numeric
   values to assign more than one key to the object.
   
   GOTFOCUS < bGotFocus > is a code block that is evaluated when this
   object receives input focus.  < bGotFocus > := {|uNIL1,uNIL2,self|...}
   
   LOSTFOCUS < bLostFocus > is a code block that is evaluated when this
   object loses input focus.  < bLostFocus > := {|uNIL1,uNIL2,self|...}
   
   TABSTOP will cause the object (Xbase Part) to be set when using
   the Tab key.  Note: When logical groups are defined in a dialog
   using TABGROUP < nTabGroup >, TABSTOP is usually set to .T. (true)
   for the first dialog element in the group.  This allows the first
   dialog element of a group to be activated using the Tab key.
   
   NOTABSTOP will cause the object (Xbase Part) to be ignored when
   using the Tab key. This clause is needed only to override any
   default setting of TabStop by the DCGETOPTIONS [TABSTOP] command.
   
   TABGROUP < nTabGroup > allows objects (Xbase Parts) that are created
   immediately after one another in the GetList to be combined into
   logical groups. This allows the user to navigate within a dialog
   from group to group by pressing the Tab key.  Within a group of
   dialog elements navigation is performed using the cursor keys.
   
   Only constants defined in the XBP.CH file can be used as values
   for this instance variable.  The following table lists the
   available constants:
   
   #define constants for < nTabGroup >:
   
    Constant             Description
   
    XBP_NO_GROUP     *)  Dialog element does not belong to a group
    XBP_BEGIN_GROUP      Dialog element is the first in a group
                         (this begins the definition of the group)
    XBP_WITHIN_GROUP     Dialog element is within a group
    XBP_END_GROUP        Dialog element is the last in a group
                         (this ends the definition of the group)
   
   *) Default value
   
   GROUP < cGroup > is a "group" name (case-sensitive) to assign to
   this GetList object.  Assignment to a group makes it possible to
   perform operations only on GetList items which are members of a
   specified group, using functions such as DC_GetRefresh() or
   DC_ReadGui().
   
   VISIBLE determines whether the object is visible immediately after
   the call to the method :create() . By default the object follows
   the VISIBLE clause of the DCGETOPTIONS command.  Use the
   INVISIBLE clause to override the VISIBLE clause of DCGETOPTIONS
   
   KEYBLOCK < bKeyBlock > is a code block to evaluate when a key is
   pressed in the GET.  The code block should be formatted as follows:
   {|mp1,xNil,oXbp|MyFunc(mp1,xNil,oXbp)} where < mp1 > is the
   numeric value (defined in APPEVENT.CH) of the key pressed and
   oXbp is the GET object.
   
   PROPER will cause the first character of each word to be
   capitalized and all other characters to be lower case.  The
   optional clause PROPOPTIONS designates a two element array
   for alternate behavior:
   
   { lProperLow, cTriggers }
   
   lProperLow - Logical.  Force upper case characters to lower case
                If not First character in field or following trigger
                character.
   
   cTriggers  - A list of characters after which a capital is desired.
                (ie. " '-1234567890" capitalize after space, apostrophe,
                hyphen, or any number)
   
   COMBO is used to create a ComboBox-Style Get with a pull-down
   picklist from an array or database.  HEIGHT < nComboHeight > is
   the Height of the Picklist area in text rows or in pixels if
   the PIXEL clause is used.  The width of the picklist will be the
   same as the width of the Get.  DATA < acbComboData > is the data
   source of the picklist.  < acbComboData > must be a character
   string containing the Alias() of the database, a single-dimension
   array, a multi-dimensional array or a code-block which returns
   an alias or array. FIELD < bField > is a code block containing the
   field name of the data to be shown in the picklist (when browsing
   a database) or ELEMENT < nElement > is the numeric value of the
   column in the array to be shown in the picklist (when browsing an
   array). RETURN < bReturn > is a code block to evaluate on return.
   If this optional parameter is used, then the return value of the
   code block is what is returned to the Get.  If the combo picklist
   is an array, then the numeric pointer to the element selected
   is passed to the code block.  NOTE: Use the function
   DC_GetComboMode() to set the mouse mode for selecting and item.
   (Single click or Double click). CAPTION < oncComboCaption > is used
   to set the caption of the dropdown button.  FONT < ocComboFont > is
   used to set the font of the dropdown button.  HOTKEY < nComboHotKey >
   is used to set a hotkey to invoke the dropdown when the get has
   focus.
   
   TITLE < cTitle > is a title to assign to this object.  The title
   is not displayed on the screen but is simply a description of the
   get object which is saved in the GetList.
   
   NAME < cVarName > is the variable name to assign to the GET
   object (for HTML based applications.)
   

Description:

    The command @..DCSAY...GET creates a new GET definition
    and adds it to the array named GETLIST which is later
    processed by the DC_Read*() functions or by the DCREAD *
    commands.  The GETLIST array must be first declared and
    initialized to the value of {}.
   
    The command DCREAD GUI creates the DC_Xbp*() objects and
    activates the edit mode for all definitions found in the
    GetList array.
   
    The command DCREAD HTML creates the DC_Html*() objects and
    writes the HTML source code.
   
    A Get object remains stored as long as it is referenced
    in an array or by a variable.  The commands CLEAR and
    CLEAR GETS assign an empty array to the GetList variable.
    This also occurs after the completion of the DCREAD command
    if it is called without the SAVE option, causing all Get
    objects referenced by the GetList array to be released.
   
    @..DCSAY..GET works nearly identical to the standard
    Xbase++ command @..SAY..GET except for a major difference.
    The GetList array has a new structure that supports a more
    robust dialog system.
   
    @..DCSAY..GET objects can be combined with any objects that
    that use the DCDIALOG system, such as @..DCCHECKBOX,
    @..DCRADIO, @..DCBUTTON or @..DCTABPAGE.
   

Notes:

    Clauses marked by an asterisk ( * ) are not supported by
    DCREAD HTML or DC_ReadHtml().
   
    ------------------
   
    GUI applications:
   
    The GET object created by @ DCSAY..GET is an object of the DC_XbpGet()
    class, therefore it can be manipulated with any iVar or method
    supported by DC_XbpGet().  DC_XbpGet() is a non-supported class which
    is provided with Xbase++ as an example.  This class inherits
    from the XbpSle() class and the Get() class.  It has been modified
    to support features required by eXPress++.  The source for DC_XbpGet()
    is in _DCXBPGT.PRG.
   
    If the CHECKGET option of GETOPTIONS is used, then the GET object
    is an object of the DC_XbpCheckBox() class.
   
    -----------------
   
    HTML Applications
   
    The GET object created by @ DCSAY..GET is an object of the
    DC_HtmlGet() class.
   

Examples:

   /*  Example 1 (Simple Gets - GUI) */
   
   #include "dcdialog.ch"
   
   PROCEDURE Xtest_1()
   
   LOCAL GetList := {}, cLastName := Space(15), cFirstName := Space(15),;
         cCompany := Space(25), cStreet := Space(25), cCity := Space(25),;
         cState := Space(2), cCountry := Space(20), cPhone := Space(15),;
         GetOptions
   
   @ 5,10 DCSAY ' Last Name' GET cLastName
   @ 5,40 DCSAY 'First Name' GET cFirstName
   @ 7,10 DCSAY '   Company' GET cCompany
   @ 8,10 DCSAY '    Street' GET cStreet
   @ 9,10 DCSAY '      City' GET cCity
   @11,10 DCSAY '     State' GET cState
   @11,40 DCSAY '   Country' GET cCountry
   @13,10 DCSAY '     Phone' GET cPhone PICT '(999)-999-9999'
   
   DCGETOPTIONS SAYRIGHTJUST
   
   DCREAD GUI ;
       FIT ;
       ADDBUTTONS ;
       OPTIONS GetOptions
   
   RETURN
   
   
   /*  Example 2 (Gets with Whens, Hides, Validations and Pop-ups (GUI))  */
   
   PROCEDURE Xtest_2()
   
   LOCAL GetList := {}, cLastName := Space(15), cFirstName := Space(15),;
         cCompany := Space(25), cStreet := Space(25), cCity := Space(25),;
         cState := Space(2), cCountry := Space(20), cPhone := Space(15),;
         dDate1 := Date(), dDate2 := Date()+1, GetOptions
   
   @ 5,10 DCSAY ' Last Name' GET cLastName ;
          VALID {||DC_ReadEmpty(cLastName)}
   
   @ 5,40 DCSAY 'First Name' GET cFirstName ;
          VALID {||DC_ReadEmpty(cFirstName)}
   
   @ 7,10 DCSAY '   Company' GET cCompany
   
   @ 8,10 DCSAY '    Street' GET cStreet ;
          VALID {||DC_ReadEmpty(cStreet)}
   
   @ 9,10 DCSAY '      City' GET cCity ;
          VALID {||DC_ReadEmpty(cCity)}
   
   @11,10 DCSAY '     State' GET cState PICT '@!' ;
          VALID {||DC_ReadEmpty(cState)} ;
          WHEN {||!Empty(cCity)}
   
   @11,40 DCSAY '   Country' GET cCountry
   
   @13,10 DCSAY '     Phone' GET cPhone PICT '(999)-999-9999'
   
   @15,10 DCSAY 'Start Date' GET dDate1 ;
          POPUP {|d|DC_PopDate(d)}
   
   @16,10 DCSAY '  End Date' GET dDate2 ;
          HIDE {||dDate1 = Date()}
   
   DCGETOPTIONS SAYRIGHTJUST
   
   DCREAD GUI ;
       FIT ;
       ADDBUTTONS ;
       OPTIONS GetOptions
   
   RETURN
   
   
   /* Example 3 (Says and Gets in HTML) */
   
   #include "dcdialog.ch"
   #include "dchtml.ch"
   
   PROCEDURE Xtest_3()
   
   LOCAL i, GetList[0], oForm, cHtml, oTable, cUserId, cPassword
   
   DCFORM OBJECT oForm
   DCTABLE OBJECT oTable PARENT oForm ROWS 2 COLUMNS 2 WIDTH '200'
   
   cUserId := Space(10)
   cPassword := Space(10)
   
   @ 1,1 DCSAY 'User ID' PARENT oTable
   @ 1,2 DCGET cUserId PARENT oTable NAME 'App.User'
   @ 2,1 DCSAY 'Password' PARENT oTable
   @ 2,2 DCGET cUserId PARENT oTable NAME 'App.Password' PASSWORD
   
   DCREAD GUI HTML TO cHtml
   
   MemoWrit('TEST.HTM',cHtml)
   
   RETURN
   

Source/Library:

  DCDIALOG.CH

See Also:

   dc_getpopupcaption()
   @ DCSAY
   dc_getcombomode()



@ DCGRABOX

Draw a Box

Syntax:

   @ < nSRow >,< nSCol > TO < nERow >,< nECol > DCGRABOX ;
     [COLOR < ncFgC > [,< ncBgC >] ] ;
     [PARENT < oParent >] ;
     [PIXEL] ;
     [ATTRIBUTE < aAttr >] ;
     [RELATIVE < oRel >] ;
     [TITLE < cTitle >] ;
     [ID < cId >] ;
     [GROUP < cGroup >] ;
     [FILL < nFill >] ;
     [HRADIUS < nHrad >] ;
     [VRADIUS < nVrad >]
   

Arguments:

   < nSRow >, < nSCol >, < nERow >, < nECol > are the row and column of
   the screen.  Coordinates are always relative to position 0,0
   ie. Top,Left of the parent object, unless the RELATIVE < oRel >
   argument is used.  If no parent is assigned, then the parent
   is the Dialog box. IF the PIXEL option is set to .TRUE. in
   DCGETOPTIONS, then the numbers are in pixels otherwise they
   are in standard text-based coordinates.  You can also force
   the pixel mode by including PIXEL as a command argument.
   
   RELATIVE < oRel > is an optional object in the Getlist which
   determines the start coordinates of this object.  If this
   option is used, then the < nSrow >, < nSCol > coordinates are
   relative to the starting coordinates of < oRel > rather than
   the parent object.
   
   PARENT < oParent > is the name of the variable that was assigned to
   the parent object for this object.  Only use this clause if you
   are placing this object onto another dialogue object.  If this
   argument is not passed then the parent will be the object set
   with the DCSETPARENT command.
   
   COLOR < nFGc > is the color of the box to be drawn. It must be
   a numeric constant which begin with either the prefix
   GRA_CLR_ or the prefix XBPSYSCLR_ as defined in GRA.CH or
   XBP.CH.
   
   ID < cId > is a unique identifier for this object.
   
   GROUP < cGroup > is a "group" name (case-sensitive) to assign to
   this GetList object.  Assignment to a group makes it possible to
   perform operations only on GetList items which are members of a
   specified group, using functions such as DC_GetRefresh(),
   DC_PaintGraControls() or DC_ReadGui().
   
   ATTRIBUTE < aAttr > is an array of attributes that meets the
   specification for area attributes such as color, mixmode,
   pattern, etc.
   
   < aAttr > := Array( GRA_AA_COUNT )
   
   < aAttr > is an array whose elements contain the attributes for
   character strings drawn by the function GraBoxLine().
   
   #define constants of the attribute array for lines.
   
   These contants are defined in GRA.CH.
   
   #define constants of the attribute array for areas
   
    Array element     #define | value  Default value
   
    GRA_AA_COLOR      GRA_CLR_*        GRA_CLR_NEUTRAL
    GRA_AA_BACKCOLOR  GRA_CLR_*        GRA_CLR_BACKGROUND
    GRA_AA_MIXMODE    GRA_FGMIX_*      GRA_FGMIX_OVERPAINT
    GRA_AA_BGMIXMODE  GRA_BGMIX_*      GRA_BGMIX_LEAVEALONE
    GRA_AA_SYMBOL     GRA_SYM_*        GRA_SYM_SOLID
   
   Attributes for areas
   
    Array element     Description
   
    GRA_AA_COLOR      Foreground color
    GRA_AA_BACKCOLOR  Background color
    GRA_AA_MIXMODE    Color mix attribute for foreground
    GRA_AA_BGMIXMODE  Color mix attribute for background
    GRA_AA_SYMBOL     Fill pattern
   
   FILL < nFill > specifies whether the rectangle is drawn as an
   outline or is filled. The following table shows the #define
   constants from the GRA.CH file to use for < nFill > :
   
   
   Fill attributes for GraBox()
   
    Constant         Description
   
    GRA_FILL         Fills rectangle
    GRA_OUTLINE *)   Only draws rectangle border
    GRA_OUTLINEFILL  Draws rectangle border and fills
   
    *) Default value
   
   HRADIUS < nHRad > and VRADIUS < nVRad > determine how much to
   round the corners of the rectangle. Both are positive integers
   which, taken together, determine the distance (radius of
   curvature) from a corner to the middle of the rectangle. This
   distance provides the measure from which the corners are
   rounded. < nHRad > indicates the horizontal distance. When
   < nHRad > is equal to < nVRad > , the corners are rounded by a
   90o arc.  < nVRad > determines the vertical curvature radius for
   rounding the corners. For rounded corners, both parameters
   < nHRad > and < nVRad > must be greater than 0.
   
   TITLE < cTitle > is a title to assign to this object.  The title
   is not displayed on the screen but is simply a description of the
   get object which is saved in the GetList.
   

Description:

    The command @..DCGRABOX creates a new GraBox() object
    and adds the object to the array named GETLIST which is later
    processed by the DC_READGUI() function or by the DCREAD GUI
    command.  The GETLIST array must be first declared and
    initialized to the value of {}.  The command DCREAD GUI activates
    the display/edit mode for all objects found in the GetList array.
    A Get object remains stored as long as it is referenced
    in an array or by a variable.  The commands CLEAR and
    CLEAR GETS assign an empty array to the GetList variable.
    This also occurs after the completion of the DCREAD GUI command
    if it is called without the SAVE option, causing all Get
    objects referenced by the GetList array to be released.
   
    @..DCGRABOX objects can be combined with any objects that
    that use the DCDIALOG system, such as @..DCSAY, @..DCCHECKBOX,
    @..DCRADIO, @..DCBUTTON or @..DCTABPAGE.
   

Notes:

    The @ DCGRABOX command uses the function GraBox() to draw the
    box therefore it does not create an object.
   
    CAUTION: Do not use DCGRA* commands with the FIT clause of
             DCREAD GUI or the AUTORESIZE clause of DCGETOPTIONS,
             unless the DCGRA* object is drawn on an object that
             does not get resized or repositioned at a later time.
             Auto-Sizing and Auto-Fitting is accomplished by
             traversing child list of the Parent object and reading
             the size and/or coordinates of all objects.  DCGRA*
             commands are not objects, therefore they cannot be
             repositioned correctly.
   

Examples:

   #include "dcgra.ch"
   LOCAL GetList := {}, GetOptions, i
   
   @ .5,3 DCGRASTRING ;
      {'DCGRA* commands are useful when creating dialogs that require', ;
       'a lot of text, images, lines, boxes or other graphic primitives.', ;
       'These commands automatically handle locking of presentation space', ;
       'and repainting of the graphic area' } ;
      FONT '12.Arial Bold Italic' COLOR GRA_CLR_BLUE ROWSPACE 18
   
   @ 5,4 TO 10,76 DCGRABOX FILL GRA_OUTLINEFILL COLOR GRA_CLR_YELLOW
   
   @ 6.2,15 DCGRAPROC {|o,c,r|_BitMaps(o,c,r)}
   
   FOR i := 1 TO 15
     @ 10.5, i*4 TO 13.5, i*4 DCGRALINE COLOR i
     @ 10.3 + (.22*i),4 TO 10.3 + (.22*i),56 DCGRALINE COLOR i
   NEXT
   
   DCGETOPTIONS ;
      WINDOWHEIGHT 400 ;
      WINDOWWIDTH 600
   
   DCREAD GUI ;
      OPTIONS GetOptions ;
      ADDBUTTONS
   
   RETURN nil
   
   
   /* -------------------- */
   
   STATIC FUNCTION _Bitmaps( oPresSpace, nCol, nRow )
   
   LOCAL aTarget, aSource, oBitMap, nResource, i, nSaveCol
   
   nSaveCol := nCol
   
   FOR nResource := 7110 TO 7119
     oBitMap := XbpBitMap():new():create(oPresSpace)
     oBitMap:load( NIL, nResource )
     aTarget := {nCol,nRow,nCol+oBitmap:xSize,nRow+oBitmap:ySize}
     aSource := {0,0,oBitmap:xSize,oBitmap:ySize}
     nCol += oBitmap:xSize + 5
     IF nResource = 7114
       nRow -= 40
       nCol := nSaveCol
     ENDIF
     oBitmap:draw( oPresSpace, aTarget, aSource, , GRA_BLT_BBO_IGNORE )
     oBitmap:destroy()
   NEXT
   
   RETURN nil
   

Source/Library:

  DCGRA.CH

See Also:

   @ DCGRASTRING
   @ DCGRALINE



@ DCGRALINE

Draw a line

Syntax:

   @ < nSRow >,< nSCol > TO < nERow >,< nECol > DCGRALINE ;
       [COLOR < ncFgC >] ;
       [PARENT < oParent >] ;
       [PIXEL]  ;
       [ATTRIBUTE < aAttr >] ;
       [RELATIVE < oRel >] ;
       [TITLE < cTitle >] ;
       [ID < cId >] ;
       [GROUP < cGroup >]                                            ;
   

Arguments:

   < nSRow >, < nSCol >, < nERow >, < nECol > are the row and column of
   the screen.  Coordinates are always relative to position 0,0
   ie. Top,Left of the parent object, unless the RELATIVE < oRel >
   argument is used.  If no parent is assigned, then the parent
   is the Dialog box. IF the PIXEL option is set to .TRUE. in
   DCGETOPTIONS, then the numbers are in pixels otherwise they
   are in standard text-based coordinates.  You can also force
   the pixel mode by including PIXEL as a command argument.
   
   RELATIVE < oRel > is an optional object in the Getlist which
   determines the start coordinates of this object.  If this
   option is used, then the < nSrow >, < nSCol > coordinates are
   relative to the starting coordinates of < oRel > rather than
   the parent object.
   
   PARENT < oParent > is the name of the variable that was assigned to
   the parent object for this object.  Only use this clause if you
   are placing this object onto another dialogue object.  If this
   argument is not passed then the parent will be the object set
   with the DCSETPARENT command.
   
   COLOR < nFGc > is the color of the line to be drawn. It must be
   a numeric constant which begin with either the prefix
   GRA_CLR_ or the prefix XBPSYSCLR_ as defined in GRA.CH or
   XBP.CH.
   
   ID < cId > is a unique identifier for this object.
   
   GROUP < cGroup > is a "group" name (case-sensitive) to assign to
   this GetList object.  Assignment to a group makes it possible to
   perform operations only on GetList items which are members of a
   specified group, using functions such as DC_GetRefresh(),
   DC_PaintGraControls() or DC_ReadGui().
   
   ATTRIBUTE < aAttr > is an array of attributes that meets the
   specification for line attributes such as color, mixmode,
   line width, line type, etc.
   
   < aAttr > := Array( GRA_AL_COUNT )
   
   < aAttr > is an array whose elements contain the attributes for
   character strings drawn by the function GraLine().
   
   #define constants of the attribute array for lines.
   
   These contants are defined in GRA.CH.
   
   #define constants of the attribute array for lines
   
    Array element   #define group    Default value
   
    GRA_AL_COLOR    GRA_CLR_*        GRA_CLR_NEUTRAL
    GRA_AL_MIXMODE  GRA_FGMIX_*      GRA_FGMIX_OVERPAINT
    GRA_AL_WIDTH    GRA_LINEWIDTH_*  GRA_LINEWIDTH_NORMAL
    GRA_AL_TYPE     GRA_LINETYPE_*   GRA_LINETYPE_SOLID
   
   
   Attributes for lines
   
    Array element   Description
   
    GRA_AL_COLOR    Foreground color
    GRA_AL_MIXMODE  Color mix attribute for foreground
    GRA_AL_WIDTH    Line width
    GRA_AL_TYPE     Line type
   
   TITLE < cTitle > is a title to assign to this object.  The title
   is not displayed on the screen but is simply a description of the
   get object which is saved in the GetList.
   

Description:

    The command @..DCGRALINE creates a new GraLine() object
    and adds the object to the array named GETLIST which is later
    processed by the DC_READGUI() function or by the DCREAD GUI
    command.  The GETLIST array must be first declared and
    initialized to the value of {}.  The command DCREAD GUI activates
    the display/edit mode for all objects found in the GetList array.
    A Get object remains stored as long as it is referenced
    in an array or by a variable.  The commands CLEAR and
    CLEAR GETS assign an empty array to the GetList variable.
    This also occurs after the completion of the DCREAD GUI command
    if it is called without the SAVE option, causing all Get
    objects referenced by the GetList array to be released.
   
    @..DCGRALINE objects can be combined with any objects that
    that use the DCDIALOG system, such as @..DCSAY, @..DCCHECKBOX,
    @..DCRADIO, @..DCBUTTON or @..DCTABPAGE.
   

Notes:

    The @ DCGRALINE command uses the function GraLine() to draw the
    line therefore it does not create an object.
   
    CAUTION: Do not use DCGRA* commands with the FIT clause of
             DCREAD GUI or the AUTORESIZE clause of DCGETOPTIONS,
             unless the DCGRA* object is drawn on an object that
             does not get resized or repositioned at a later time.
             Auto-Sizing and Auto-Fitting is accomplished by
             traversing child list of the Parent object and reading
             the size and/or coordinates of all objects.  DCGRA*
             commands are not objects, therefore they cannot be
             repositioned correctly.
   

Examples:

   #include "dcgra.ch"
   
   PROCEDURE Xtest()
   
   LOCAL GetList := {}, GetOptions, i
   
   FOR i := 1 TO 15
     @ 1.5, i*4 TO 4.5, i*4 DCGRALINE COLOR i
     @ 1.3 + (.22*i),4 TO 1.3 + (.22*i),56 DCGRALINE COLOR i
   NEXT
   
   DCGETOPTIONS ;
     WINDOWWIDTH 500 ;
     WINDOWHEIGHT 200
   
   DCREAD GUI ADDBUTTONS OPTIONS GetOptions
   
   RETURN
   

Source/Library:

  DCGRA.CH

See Also:

   @ DCGRASTRING
   @ DCGRABOX



@ DCGRAPROC

Draw a screen object with a custom procedure

Syntax:

   @ < nRow >,< nCol >  DCGRAPROC < bProc > ;
      [PARENT < oParent >]              ;
      [PIXEL]                         ;
      [ID < cId >]                      ;
      [GROUP < cGroup >]
   

Arguments:

   < nSRow >, < nSCol > are the row and column coordinates of
   the screen.  Coordinates are always relative to position 0,0
   ie. Top,Left of the parent object.  If no parent is assigned,
   then the parent is the Dialog box. IF the PIXEL option is set
   to .TRUE. in DCGETOPTIONS, then the numbers are in pixels
   otherwise they are in standard text-based coordinates.  You
   can also force the pixel mode by including PIXEL as a command
   argument.
   
   PARENT < oParent > is the name of the variable that was assigned to
   the parent object for this object.  Only use this clause if you
   are placing this object onto another dialogue object.  If this
   argument is not passed then the parent will be the object set
   with the DCSETPARENT command.
   
   ID < cId > is a unique identifier for this object.
   
   GROUP < cGroup > is a "group" name (case-sensitive) to assign to
   this GetList object.  Assignment to a group makes it possible to
   perform operations only on GetList items which are members of a
   specified group, using functions such as DC_GetRefresh(),
   DC_PaintGraControls() or DC_ReadGui().
   

Description:

    The command @..DCGRAPROC creates a custom Gra*() object
    and adds the object to the array named GETLIST which is later
    processed by the DC_READGUI() function or by the DCREAD GUI
    command.  The GETLIST array must be first declared and
    initialized to the value of {}.  The command DCREAD GUI activates
    the display/edit mode for all objects found in the GetList array.
    A Get object remains stored as long as it is referenced
    in an array or by a variable.  The commands CLEAR and
    CLEAR GETS assign an empty array to the GetList variable.
    This also occurs after the completion of the DCREAD GUI command
    if it is called without the SAVE option, causing all Get
    objects referenced by the GetList array to be released.
   
    @..DCGRAPROC objects can be combined with any objects that
    that use the DCDIALOG system, such as @..DCSAY, @..DCCHECKBOX,
    @..DCRADIO, @..DCBUTTON or @..DCTABPAGE.
   

Notes:

    CAUTION: Do not use DCGRA* commands with the FIT clause of
             DCREAD GUI or the AUTORESIZE clause of DCGETOPTIONS,
             unless the DCGRA* object is drawn on an object that
             does not get resized or repositioned at a later time.
             Auto-Sizing and Auto-Fitting is accomplished by
             traversing child list of the Parent object and reading
             the size and/or coordinates of all objects.  DCGRA*
             commands are not objects, therefore they cannot be
             repositioned correctly.
   

Examples:

   #include "dcgra.ch"
   
   LOCAL GetList := {}, GetOptions, i
   
   @ .5,3 DCGRASTRING ;
      {'DCGRA* commands are useful when creating dialogs that require', ;
       'a lot of text, images, lines, boxes or other graphic primitives.', ;
       'These commands automatically handle locking of presentation space', ;
       'and repainting of the graphic area' } ;
       FONT '12.Arial Bold Italic' COLOR GRA_CLR_BLUE ROWSPACE 18
   
   @ 5,4 TO 10,76 DCGRABOX FILL GRA_OUTLINEFILL COLOR GRA_CLR_YELLOW
   
   @ 6.2,15 DCGRAPROC {|o,c,r|_BitMaps(o,c,r)}
   
   FOR i := 1 TO 15
     @ 10.5, i*4 TO 13.5, i*4 DCGRALINE COLOR i
     @ 10.3 + (.22*i),4 TO 10.3 + (.22*i),56 DCGRALINE COLOR i
   NEXT
   
   DCGETOPTIONS ;
      WINDOWHEIGHT 400 ;
      WINDOWWIDTH 600
   
   DCREAD GUI ;
      OPTIONS GetOptions ;
      ADDBUTTONS
   
   RETURN nil
   
   
   /* -------------------- */
   
   STATIC FUNCTION _Bitmaps( oPresSpace, nCol, nRow )
   
   LOCAL aTarget, aSource, oBitMap, nResource, i, nSaveCol
   
   nSaveCol := nCol
   
   FOR nResource := 7110 TO 7119
     oBitMap := XbpBitMap():new():create(oPresSpace)
     oBitMap:load( NIL, nResource )
     aTarget := {nCol,nRow,nCol+oBitmap:xSize,nRow+oBitmap:ySize}
     aSource := {0,0,oBitmap:xSize,oBitmap:ySize}
     nCol += oBitmap:xSize + 5
     IF nResource = 7114
       nRow -= 40
       nCol := nSaveCol
     ENDIF
     oBitmap:draw( oPresSpace, aTarget, aSource, , GRA_BLT_BBO_IGNORE )
     oBitmap:destroy()
   NEXT
   
   RETURN nil
   

Source/Library:

  DCGRA.CH

See Also:

   @ DCGRASTRING
   @ DCGRALINE



@ DCGRASTRING

Write a text string

Syntax:

   @ < nSayRow >,< nSayCol > DCGRASTRING < abcText > ;
       [COLOR < nFgC >,[< nBgC >] ] ;
       [FONT < bocFont >] ;
       [PARENT < oParent >] ;
       [PICTURE < cPict >] ;
       [PIXEL] ;
       [ATTRIBUTE < aAttr >] ;
       [RELATIVE < oRel >] ;
       [ID < cId >] ;
       [TITLE < cTitle >] ;
       [GROUP < cGroup >]
   

Arguments:

   < nSayRow > and < nSayCol > are the row and column of the screen.
   Coordinates are always relative to position 0,0 ie. Top,Left
   of the parent object, unless the RELATIVE < oRel > argument is
   used.  If no parent is assigned, then the parent is the Dialog
   box. IF the PIXEL option is set to .TRUE. in DCGETOPTIONS,
   then the numbers are in pixels otherwise they are in standard
   text-based coordinates.  You can also force the pixel
   mode by including PIXEL as a command argument.
   
   < abcText > is the text to display. This may be a character string,
   an array of character string or a code-block which returns a
   character string or array of character strings.
   of any type except an object or array. It must not be a macro.
   
   RELATIVE < oRel > is an optional object in the Getlist which
   determines the start coordinates of this object.  If this
   option is used, then the < nSrow >, < nSCol > coordinates are
   relative to the starting coordinates of < oRel > rather than
   the parent object.
   
   FONT < cFont > is a character string defining an optional font
   for the text.  The font string must conform to the Xbase++
   standard, ie. "10.Courier.Bold. It may also be a font object or
   a code block that returns a character string or a font object
   to later refresh with DC_GraPaintControls().
   
   PARENT < oParent > is the name of the variable that was assigned to
   the parent object for this object.  Only use this clause if you
   are placing this object onto another dialogue object.  If this
   argument is not passed then the parent will be the object set
   with the DCSETPARENT command.
   
   PICTURE < cPict > is a character string specifying formatting
   options for the value of < VarName > during display and editing.
   
   COLOR < nFGc >, < nBGc > are foreground and background colors for
   the text.  They must be numeric constants which begin with
   either the prefix GRA_CLR_ or the prefix XBPSYSCLR_ as defined
   in GRA.CH or XBP.CH.
   
   ID < cId > is a unique identifier for this object.
   
   GROUP < cGroup > is a "group" name (case-sensitive) to assign to
   this GetList object.  Assignment to a group makes it possible to
   perform operations only on GetList items which are members of a
   specified group, using functions such as DC_GetRefresh(),
   DC_PaintGraControls() or DC_ReadGui().
   
   ATTRIBUTE < aAttr > is an array of attributes that meets the
   specification for string attributes such as color, mixmode,
   alignment, etc.
   
   < aAttr > := Array( GRA_AS_COUNT )
   
   < aAttr > is an array whose elements contain the attributes for
   character strings drawn by the function GraStringAt().
   
   #define constants of the attribute array for character strings.
   
   These contants are defined in GRA.CH.
   
    Array element       #define | value     Default value
   
    GRA_AS_COLOR        GRA_CLR_*           GRA_CLR_NEUTRAL
    GRA_AS_BACKCOLOR    GRA_CLR_*           GRA_CLR_BACKGROUND
    GRA_AS_MIXMODE      GRA_FGMIX_*         GRA_FGMIX_OVERPAINT
    GRA_AS_BGMIXMODE    GRA_BGMIX_*         GRA_BGMIX_LEAVEALONE
    GRA_AS_BOX          { nXsize, nYsize }  dependent on output device
    GRA_AS_ANGLE        { nX, nY }          { 1, 0 }
    GRA_AS_SHEAR        { nX, nY }          { 0, 1 }
   
    GRA_AS_DIRECTION    GRA_CHDIRN_*        GRA_CHDIRN_LEFTRIGHT
    GRA_AS_HORIZALIGN   GRA_HALIGN_*        GRA_HALIGN_LEFT
    GRA_AS_VERTALIGN    GRA_VALIGN_*        GRA_VALIGN_BASE
    GRA_AS_EXTRA        nExtra              0
    GRA_AS_BREAK_EXTRA  nBreakExtra         0
   
   TITLE < cTitle > is a title to assign to this object.  The title
   is not displayed on the screen but is simply a description of the
   get object which is saved in the GetList.
   

Description:

    The command @..DCGRASTRING creates a new GraStringAt() object
    and adds the object to the array named GETLIST which is later
    processed by the DC_READGUI() function or by the DCREAD GUI
    command.  The GETLIST array must be first declared and
    initialized to the value of {}.  The command DCREAD GUI activates
    the display/edit mode for all objects found in the GetList array.
    A Get object remains stored as long as it is referenced
    in an array or by a variable.  The commands CLEAR and
    CLEAR GETS assign an empty array to the GetList variable.
    This also occurs after the completion of the DCREAD GUI command
    if it is called without the SAVE option, causing all Get
    objects referenced by the GetList array to be released.
   
    @..DCGRASTRING works similarly to the @..DCSAY command except
    that it uses the Xbase++ GraStringAt() function rather than an
    XbpStatic() object.  It is recommended that this command be
    used in place of @..DCSAY when there is a lot of text to write
    to a GUI screen as it uses far less memory resources and  paints
    faster.
   
    @..DCGRASTRING objects can be combined with any objects that
    that use the DCDIALOG system, such as @..DCSAY, @..DCCHECKBOX,
    @..DCRADIO, @..DCBUTTON or @..DCTABPAGE.
   

Notes:

    The @ DCGRASTRING command uses the function GraStringAt() to
    draw the text therefore it does not create an object.
   
    CAUTION: Do not use DCGRA* commands with the FIT clause of
             DCREAD GUI or the AUTORESIZE clause of DCGETOPTIONS,
             unless the DCGRA* object is drawn on an object that
             does not get resized or repositioned at a later time.
             Auto-Sizing and Auto-Fitting is accomplished by
             traversing child list of the Parent object and reading
             the size and/or coordinates of all objects.  DCGRA*
             commands are not objects, therefore they cannot be
             repositioned correctly.
   

Examples:

   #include "dcgra.ch"
   
   PROCEDURE Xtest()
   
   LOCAL GetList := {}, cLastName := Space(15), cFirstName := Space(15),;
         cCompany := Space(25), cStreet := Space(25), cCity := Space(25),;
         cState := Space(2), cCountry := Space(20), cPhone := Space(15),;
         GetOptions
   
   
   @ 5,10 DCGRASTRING ;
     { 'Last Name', ;
       'First Name', ;
       'Company', ;
       'Street', ;
       'City', ;
       'State', ;
       'Country', ;
       'Phone' }
   
   @ 5,25 DCGET cLastName
   @ 6,25 DCGET cFirstName
   @ 7,25 DCGET cCompany
   @ 8,25 DCGET cStreet
   @ 9,25 DCGET cCity
   @10,25 DCGET cState
   @11,25 DCGET cCountry
   @12,25 DCGET cPhone PICT '(999)-999-9999'
   
   DCREAD GUI ;
       FIT ;
       ADDBUTTONS ;
   
   
   RETURN
   

Source/Library:

  DCGRA.CH

See Also:

   @ DCSAY GET



@ DCGROUP

Create a GROUP object for displaying with GUI reader

Syntax:

   @ < nSRow >,< nSCol > DCGROUP < oGroup > ;
       [BOX < cBox >] ;
       [SIZE < nWidth >, < nHeight >] ;
       [PARENT < oParent >] ;
       [PARENTID < cParentId >] ;
       [CAPTION < cText >] ;
       [WHEN < bWhen >] ;
       [HIDE < bHide >] ;
       [MESSAGE < bcMsg > [INTO < oMsgBox >]] ;
       [COLOR < bncFgC > [,< ncBgC >] ] ;
       [HELPCODE < cHelpCode >] ;
       [PRESENTATION < aPres >] ;
       [PIXEL] ;
       [TOOLTIP < bcToolTip >] ;
       [CURSOR < naCursor >] ;
       [CARGO < xCargo >] ;
       [PREEVAL < bPreEval >] ;
       [EVAL < bEval >] ;
       [RELATIVE < oRel >] ;
       [ID < cId >] ;
       [TITLE < cTitle >] ;
       [ACCELKEY < anAccel >] ;
       [GOTFOCUS < bGotFocus >] ;
       [LOSTFOCUS < bLostFocus >] ;
       [TABSTOP]  ;
       [NOTABSTOP];
       [TABGROUP < nTabGroup >] ;
       [GROUP < cGroup >] ;
       [VISIBLE] ;
       [INVISIBLE]
   

Arguments:

   < nSRow >, < nSCol > are the coordinates on the screen.
   Coordinates are always relative to position 0,0 ie. Top,Left
   of the parent object, unless the RELATIVE argument is used.
   If no parent is assigned, then the parent is the Dialog box.
   
   < oGroup > is the name of the variable to assign as a storage
   place for this object.
   
   BOX < cBox > is used only in text mode.  < cBox > is a character
   string of eight characters defining the box used for the
   group.
   
   RELATIVE < oRel > is an optional object in the Getlist which
   determines the start coordinates of this object.  If this
   option is used, then the < nSrow >, < nSCol > coordinates are
   relative to the starting coordinates of < oRel > rather than
   the parent object.
   
   IF the PIXEL option is set to .TRUE. in DCGETOPTIONS, then
   the numbers are in pixels otherwise they are in standard
   text-based coordinates.  You can also force the pixel
   mode by including PIXEL as a command argument.
   
   HIDE < bHide > is a code block that is evaluated in the event loop.
   This code block must return a logical value.  If the value
   returned is .TRUE. then the object will be hidden from view.  If
   the value returned is .FALSE. then the object will be displayed.
   The object is passed as a parameter to the code block.
   
   WHEN < bWhen > is a code block that is evaluated in the event loop.
   This code block must return a logical value.  If the value
   returned is .FALSE. then the object will be disabled and grayed.
   If the value returned is .TRUE. then the object will be enabled.
   The object is passed as a parameter to the code block.
   
   SIZE < nWidth >, < nHeight > defines the size of the group.
   If no size is given, then the group will be automatically
   sized to fit the parent window.  IF the PIXEL option is set to
   .TRUE. in DCGETOPTIONS, then the numbers are in pixels,
   otherwise they are in standard text-based coordinates.  You
   can also force the pixel mode by including PIXEL in the command.
   
   CAPTION < cCaption > is the caption to place on the group.
   
   PARENT < oParent > is the name of the variable that was assigned to
   the parent object for this object.  Only use this clause if you
   are placing this object onto another dialogue object.  If this
   argument is not passed then the parent will be the object set
   with the DCSETPARENT command.
   
   PARENTID < cParentID > may be used in lieu of the PARENT < oParent >
   clause.  This identifies the ID of the parent instead of the
   parent's object variable name.
   
   MESSAGE < bcMsg > is the message you want to display in the
   message area of the dialogue screen defined by the DCMESSAGEBOX
   command when the object is in focus.  Optionally, INTO < oMsgBox >
   will designate which message box to display the message into.
   If the INTO clause is not used, then the last message box in the
   GetList is the default. < oMsgBox > may also be any object that
   supports the :setCaption() method.  If < bcMsg > is a code-block,
   it must return a character string.
   
   HELPCODE < cHelp > is a character string that is passed to the
   DC_HelpF1() function if F1 is pressed when the mouse is placed
   over any area of the Group that does not contain an object.
   The help code is used by the Help system to override the
   passing of the Procedure and Varname for more specific
   context-help.
   
   PRESENTATION < aPres > is a two-dimensional array. If specified,
   this contains presentation parameters for the Group object.
   The first column of the array must contain #define constants
   from the XBP.CH file starting with the prefix XBP_PP_. These
   constants define the presentation parameters that can be set
   for the object and include colors and fonts. The second column
   of the array in < aPres > contains the value for each setting.
   These are also generally set using #define constants from the
   GRA.CH file.
   
   TOOLTIP < bcToolTip > is a character string which will display
   as a "Tool Tip" next to the object when the cursor is passed
   over the object. A semi-colon within the text indicates a new
   line.  If < bcToolTip > is a code-block, it must return a character
   string.  NOTE: The Tooltip painting method is run in another
   thread, therefore the codeblock should not run code that points
   to the current work area.  It may however, contain local, public
   or private variables.
   
   CURSOR < naCursor > may be either a numeric value or an array of
   3 elements which defines an optional mouse pointer to use for
   this object.  System mouse pointers start with
   XBPWINDOW_POINTERTYPE_ and are defined in XPB.CH.  The default
   pointer is XBPWINDOW_POINTERTYPE_POINTER.  < naCursor > may be a
   numeric resource ID that points to a Bit-Map that has been
   compiled with the resource compiler and linked to the .EXE.
   < naCursor > may be a 3-element array described as follows:
   
     Element  Type  Description
     -------  ---- ---------------------------------------------
       [1]      C   Optional name of .DLL containing the pointer
                    resource.
   
       [2]      N   The numeric resource ID of the pointer.  If
                    element 1 is a NIL, then this resource must be
                    linked into the .EXE.
   
       [3]      N   The type of resource as defined in XBP.CH.
   
   COLOR < ncFGc >, < ncBGc > are foreground and background colors.
   They may be character strings representing valid text-based
   colors supported by SetColor() or they may be numeric constants
   which begin with either the prefix GRA_CLR_ or the prefix
   XBPSYSCLR_ as defined in GRA.CH or XBP.CH. If < bncFGc > is a
   code block is must return a 2-element array containing a
   foreground and background color.
   
   ID < cId > is a unique identifier for this object.  This ID is used
   with functions like DC_GETORIGUPDATED() to determine the status
   of a get object.
   
   CARGO < xCargo > is any kind of data you wish to to add to the
   :cargo container for this object.  The cargo may be accessed
   at any time via the :cargo exported variable, however it will not
   be stored in the same manner it is entered.  The :cargo container
   of DCDIALOG objects is an array of at least three elements:
   
    [1] - A numeric value that is a pointer to the Getlist array
          for this object.
   
    [2] - A pointer to the GetList array.
   
    [3] - The value of < xCargo >.
   
    [4] and up - optional values added by the GUI reader.
   
   PREEVAL < bPreEval > is a code block to be evaluated by the GUI
   reader before the Xbase Parts object is created.  The object is
   passed to the code block.
   
   EVAL < bEval > is a code block to be evaluated by the GUI reader
   after the Xbase Parts object is created.  The object is passed
   to the code block.
   
   TITLE < cTitle > is a title to assign to this object.  The title
   is not displayed on the screen but is simply a description of the
   get object which is saved in the GetList.
   
   ACCELKEY < anAccel > is a numeric "hot-key" assignment that will set
   focus to the checkbox object when the hot-key is pressed.  The key
   must be a valid key with the prefix xbeK_*.  These keys are
   defined in APPEVENT.CH.  < anAccel > may also be an array of numeric
   values to assign more than one key to the object.
   
   GOTFOCUS < bGotFocus > is a code block that is evaluated when this
   object receives input focus.  < bGotFocus > := {|uNIL1,uNIL2,self|...}
   
   LOSTFOCUS < bLostFocus > is a code block that is evaluated when this
   object loses input focus.  < bLostFocus > := {|uNIL1,uNIL2,self|...}
   
   TABSTOP will cause the object (Xbase Part) to be set when using
   the Tab key.  Note: When logical groups are defined in a dialog
   using TABGROUP < nTabGroup >, TABSTOP is usually set to .T. (true)
   for the first dialog element in the group.  This allows the first
   dialog element of a group to be activated using the Tab key.
   
   NOTABSTOP will cause the object (Xbase Part) to be ignored when
   using the Tab key. This clause is needed only to override any
   default setting of TabStop by the DCGETOPTIONS [TABSTOP] command.
   
   TABGROUP < nTabGroup > allows objects (Xbase Parts) that are created
   immediately after one another in the GetList to be combined into
   logical groups. This allows the user to navigate within a dialog
   from group to group by pressing the Tab key.  Within a group of
   dialog elements navigation is performed using the cursor keys.
   
   Only constants defined in the XBP.CH file can be used as values
   for this instance variable.  The following table lists the
   available constants:
   
   #define constants for < nTabGroup >:
   
    Constant             Description
   
    XBP_NO_GROUP     *)  Dialog element does not belong to a group
    XBP_BEGIN_GROUP      Dialog element is the first in a group
                         (this begins the definition of the group)
    XBP_WITHIN_GROUP     Dialog element is within a group
    XBP_END_GROUP        Dialog element is the last in a group
                         (this ends the definition of the group)
   
   *) Default value
   
   GROUP < cGroup > is a "group" name (case-sensitive) to assign to
   this GetList object.  Assignment to a group makes it possible to
   perform operations only on GetList items which are members of a
   specified group, using functions such as DC_GetRefresh() or
   DC_ReadGui().
   
   VISIBLE determines whether the object is visible immediately after
   the call to the method :create() . By default the object follows
   the VISIBLE clause of the DCGETOPTIONS command.  Use the
   INVISIBLE clause to override the VISIBLE clause of DCGETOPTIONS
   

Description:

    The command @..DCGROUP creates a new Group object and
    adds the object to the array named GETLIST which is later
    processed by the DC_READGUI() function or by the DCREAD GUI
    command.  The GETLIST array must be first declared and
    initialized to the value of {}.  The command DCREAD GUI activates
    the edit mode for all objects found in the GetList array.
    A Getlist object remains stored as long as it is referenced
    in an array or by a variable.  The commands CLEAR and
    CLEAR GETS assign an empty array to the GetList variable.
    This also occurs after the completion of the DCREAD command
    if it is called without the SAVE option, causing all Get
    objects referenced by the GetList array to be released.
   
    A "Group" object is used to group other objects together,
    for example, Radio-Buttons must be part of a group to
    function properly as a set.  A "Group" object is also used
    to draw a box around a set of objects and provide a means
    to reference all the objects to the home position 0,0 of
    the group.
   
    @..DCGROUP objects can be combined with any objects that
    that use the DCDIALOG system, such as @..DCSAY..GET,
    @..DCRADIO, @..DCPUSHBUTTON or @..DCMULTILINE.
   

Notes:

    The group object created by @ DCGROUP is an object of the
    XbpStatic() class, therefore it can be manipulated with
    any iVar or method supported by XbpStatic().
   

Examples:

     #include "dcdialog.ch"
   
     PROCEDURE Xtest()
   
     LOCAL GetList := {}, GetOptions, cOption, oMyGroup
   
     cOption := 'P'
   
     @ 4,10 DCGROUP oMyGroup CAPTION "Select an Operation" ;
       SIZE 40,8
   
     @ 1,2 DCRADIO cOption PROMPT 'Save to Dictionary' VALUE 'D' ;
           PARENT oMyGroup
   
     @ 2,2 DCRADIO cOption PROMPT 'Save to Source Code' VALUE 'S' ;
           PARENT oMyGroup
   
     @ 3,2 DCRADIO cOption PROMPT 'Make a Backup file' VALUE 'B' ;
           PARENT oMyGroup
   
     @ 4,2 DCRADIO cOption PROMPT 'Pack the File' VALUE 'P' ;
           PARENT oMyGroup
   
     DCREAD GUI ;
       TITLE 'My Dialogue' ;
       FIT ;
       ADDBUTTONS
   
     RETURN
   

Source/Library:

  DCDIALOG.CH

@ DCKLMLE

Create a MULTILINE edit for displaying with GUI reader

Syntax:

   @ < nRow >,< nCol > DCKLMLE < uVar > ;
       [PARENT < oParent >] ;
       [VALID < bValid >] ;
       [WHEN < bWhen >] ;
       [HIDE < bHide >] ;
       [EDITPROTECT < bProtect >] ;
       [SIZE < nWidth >,< nHeight >] ;
       [MESSAGE < bcMsg > [INTO < oMsgBox >]] ;
       [FONT < cFont >] ;
       [COLOR < bncFgC > [,< ncBgC >] ] ;
       [HELPCODE < cHelpCode >] ;
       [DATALINK < bLink >] ;
       [OBJECT < oObject >] ;
       [CARGO < xCargo >] ;
       [READONLY] ;
       [NOWORDWRAP] ;
       [NOBORDER] ;
       [NOVERTSCROLL] ;
       [NOHORIZSCROLL] ;
       [IGNORETAB] ;
       [COMPATIBLE] ;
       [PRESENTATION < aPres >] ;
       [PIXEL] ;
       [TOOLTIP < bcToolTip >] ;
       [CURSOR < naCursor >] ;
       [PREEVAL < bPreEval >] ;
       [EVAL < bEval >] ;
       [RELATIVE < oRel >] ;
       [ID < cId >] ;
       [TITLE < cTitle >] ;
       [ACCELKEY < nKey >] ;
       [GOTFOCUS < bGotFocus >] ;
       [LOSTFOCUS < bLostFocus >] ;
       [TABSTOP] ;
       [NOTABSTOP] ;
       [TABGROUP < nTabGroup >] ;
       [VISIBLE] ;
       [INVISIBLE] ;
       [GROUP < cGroup >] ;
       [EXITKEY < nExitKey >] ;
       [MAXLINES < nMaxLines > [MESSAGE < bcMaxLinesMessage >]] ;
       [LINELENGTH < nLineLength > [MESSAGE < bcLineLengthMessage >]] ;
       [MAXCHARS < nMaxChars > [MESSAGE < bcMaxCharsMessage >]] ;
   
       [MAINDICT < cMainDict >] ;
       [ADDONDICT < cAddOnDict >] ;
       [SUGGESTFONT < cSuggestFont >] ;
       [ABOXPOS < aBoxPos >] ;
       [SHORTSPELL < nShortSpell >] ;
       [DELWORDKEY < nDelWordKey >] ;
       [DELWORDFUN < nDelWordFun >] ;
       [DELLINEKEY < nDelLineKey >] ;
       [DELLINEFUN < nDelLineFun >] ;
       [PRINTFONT < cPrtFont >] ;
       [TOPMARGIN < nPrtTopMar >] ;
       [LEFTMARGIN < nPrtLeftMar >] ;
       [BOTTOMMARGIN < nPrtBotMar >] ;
       [WORDDELIMITERS < cWrdDelimit >] ;
       [FINDHIGHLIGHT] ;
       [MATCHCASE] ;
       [REMEMBERFIND] ;
       [NOREMEMBERFIND] ;
       [SEARCHWRAP] ;
       [NOSEARCHWRAP] ;
       [FINDBOXPOS < aFindBoxPos >]
   

Arguments:

   < nRow > and < nCol > are the row and column of the screen.
   Coordinates are always relative to position 0,0 ie. Top,Left
   of the parent object, unless the RELATIVE < oRel > argument is
   used.  If no parent is assigned, then the parent is the Dialog
   box.  IF the PIXEL option is set to .TRUE. in DCGETOPTIONS,
   then the numbers are in pixels otherwise they are in standard
   text-based coordinates.  You can also force the pixel
   mode by including PIXEL as a command argument.
   
   < uVar > is the input/output variable.  This should be
   initialized to a character string. It must not be a macro, however
   it may be a code block that contains a macro. The < uVar > is
   automatically anchored via a Get-Set codeblock created by
   DC_GetAnchorCB() unless < uVar > is a custom Get-Set
   code block.
   
   RELATIVE< oRel > is an optional object in the Getlist which
   determines the start coordinates of this object.  If this
   option is used, then the < nSrow >, < nSCol > coordinates are
   relative to the starting coordinates of < oRel > rather than
   the parent object.
   
   SIZE < nWidth >,< nHeight > is the width and height of the
   multiline box.  If the PIXEL option is set to .TRUE. in DCGET
   OPTIONS, then the numbers are in pixels otherwise they are
   in standard text-based numbers.
   
   PARENT < oParent > is the name of the variable that was assigned to
   the parent object for this object.  Only use this clause if you
   are placing this object onto another dialogue object.  If this
   argument is not passed then the parent will be the object set
   with the DCSETPARENT command.
   
   OBJECT < oObject > is the name of the variable to assign as a
   storage place for this object.
   
   FONT < cFont > is a character string defining an optional font.
   The font string must conform to the Xbase++ standard, ie.
   "10.Courier.Bold".
   
   MESSAGE < bcMsg > is the message you want to display in the
   message area of the dialogue screen defined by the DCMESSAGEBOX
   command when the object is in focus.  Optionally, INTO < oMsgBox >
   will designate which message box to display the message into.
   If the INTO clause is not used, then the last message box in the
   GetList is the default. < oMsgBox > may also be any object that
   supports the :setCaption() method.If < bcMsg > is a code-block,
   it must return a character string.
   
   WHEN < bWhen > is a code block that is evaluated in the event loop.
   This code block must return a logical value.  If the value
   returned is .FALSE. then the object will be disabled and grayed.
   If the value returned is .TRUE. then the object will be enabled.
   The object is passed as a parameter to the code block.
   
   HIDE < bHide > is a code block that is evaluated in the event loop.
   This code block must return a logical value.  If the value
   returned is .TRUE. then the object will be hidden from view.  If
   the value returned is .FALSE. then the object will be displayed.
   The object is passed as a parameter to the code block.
   
   EDITPROTECT < bProtect > is an optional condition tested during the
   execution of the GUI gets by the DCREAD GUI command, before the
   object receives input focus (before it is activated). When the
   condition returns the value .T. (true), the object receives the
   input focus.  Otherwise, it is skipped. < bProtect > is a code
   block that must return a logical value when evaluated. The code
   block is evaluated prior to the object receiving input focus.
   This clause behaves similar to the WHEN clause with the exception
   that the object is not disabled (grayed out).  The object is
   passed as a parameter to the code block.
   
   VALID < bValid > is an optional condition tested during the
   execution of the GUI gets by the READ command before an
   object loses input focus (before it is deactivated).  When
   the condition returns the value .T. (true), the object
   loses the input focus.  Otherwise, it remains active. < bValid >
   is a code block that must return a logical value when it is
   evaluated.  The object passed as a parameter to the code block.
   
   HELPCODE < cHelp > is a character string that is passed to the
   DC_HelpF1() function if F1 is pressed or the HELP button
   is clicked when this object has focus.  This HELPCODE allows
   the Help system to override the passing of the Procedure and
   Varname for more specific context-help.
   
   PRESENTATION < aPres > is a two-dimensional array. If specified,
   this contains presentation parameters for the multiline object.
   The first column of the array must contain #define constants
   from the XBP.CH file starting with the prefix XBP_PP_. These
   constants define the presentation parameters that can be set
   for the object and include colors and fonts. The second column
   of the array in < aPres > contains the value for each setting.
   These are also generally set using #define constants from the
   GRA.CH file.
   
   READONLY will not allow editing of the text.  The entire text
   area will be grayed.
   
   NOWORDWRAP means that the text is not wrapped.  The default is
   word-wrap ON so that it is completely displayed in the edit
   window.  Individual text lines that contain more characters
   than can be displayed within the edit window are automatically
   wrapped at the spaces between words.  With NOWORDWRAP, new
   lines are started in the edit window only when CRLF explicitly
   appears in the edit buffer. Text lines that contain more
   characters than can be displayed in the edit window are cut
   off and the text must be horizontally scrolled in order to view
   all the characters.  To enable WORDWRAP the NOHORIZSCROLL clause
   must be used.
   
   NOVERTSCROLL will suppress the vertical scrollbar on the right
   side of the window.
   
   NOHORIZSCROLLwill suppress the horizontal scrollbar on the
   bottom of the window.
   
   IGNORETAB causes the Tab key to navigates between other objects
   on the dialog screen and is not interpreted as a character.
   The default action is for the Tab key character to be written
   to the edit buffer.
   
   NOBORDER suppress the painting of a border around the object.
   
   COMPATIBLE will make navigation keys compatabile with those of
   MemoEdit().  This means that keys like CTRL-R, CTRL-C, CRTL-E,
   CRTL-X, CTRL-Y, etc. will be recognized in addition to all the
   standard "windows-compatabile" keys.
   
   TOOLTIP < bcToolTip > is a character string which will display
   as a "Tool Tip" next to the object when the cursor is passed
   over the object. A semi-colon within the text indicates a new
   line.  If < bcToolTip > is a code-block, it must return a character
   string.  NOTE: The Tooltip painting method is run in another
   thread, therefore the codeblock should not run code that points
   to the current work area.  It may however, contain local, public
   or private variables.
   
   CURSOR < naCursor > may be either a numeric value or an array of
   3 elements which defines an optional mouse pointer to use for
   this object.  System mouse pointers start with
   XBPWINDOW_POINTERTYPE_ and are defined in XPB.CH.  The default
   pointer is XBPWINDOW_POINTERTYPE_POINTER.  < naCursor > may be a
   numeric resource ID that points to a Bit-Map that has been
   compiled with the resource compiler and linked to the .EXE.
   < naCursor > may be a 3-element array described as follows:
   
     Element  Type  Description
     -------  ---- ---------------------------------------------
       [1]      C   Optional name of .DLL containing the pointer
                    resource.
   
       [2]      N   The numeric resource ID of the pointer.  If
                    element 1 is a NIL, then this resource must be
                    linked into the .EXE.
   
       [3]      N   The type of resource as defined in XBP.CH.
   
   PREEVAL < bPreEval > is a code block to be evaluated by the GUI
   reader before the Xbase Parts object is created.  The object is
   passed to the code block.
   
   EVAL < bEval > is a code block to be evaluated by the GUI reader
   after the Xbase Parts object is created.  The object is passed
   to the code block.
   
   CARGO < xCargo > is any kind of data you wish to to add to the
   :cargo container for this object.  The cargo may be accessed
   at any time via the :cargo exported variable, however it will not
   be stored in the same manner it is entered.  The :cargo container
   of DCDIALOG objects is an array of at least three elements:
   
    [1] - A numeric value that is a pointer to the Getlist array
          for this object.
   
    [2] - A pointer to the GetList array.
   
    [3] - The value of < xCargo >.
   
    [4] and up - optional values added by the GUI reader.
   
   COLOR < ncFGc >, < ncBGc > are foreground and background colors.
   They may be character strings representing valid text-based
   colors supported by SetColor() or they may be numeric constants
   which begin with either the prefix GRA_CLR_ or the prefix
   XBPSYSCLR_ as defined in GRA.CH or XBP.CH. If < bncFGc > is a
   code block is must return a 2-element array containing a
   foreground and background color.
   
   ID< cId > is a unique identifier for this object.  This ID is used
   with functions like DC_GETORIGUPDATED() to determine the status
   of a get object.
   
   TITLE < cTitle > is a title to assign to this object.  The title
   is not displayed on the screen but is simply a description of the
   get object which is saved in the GetList.
   
   DATALINK < bLink > is an optional code block that is evaluated
   every time Get/Set codeblock is evaluated, ie when the data
   is read from the < uVar > into the object.  < bLink > is also
   evaluated when DC_GetRefresh() is called unless the < lDataLink >
   parameter of DC_GetRefresh() is .FALSE.
   
   ACCELKEY < nKey > is a numeric "hot-key" assignment that will set
   focus to the memo object when the hot-key is pressed.  The key
   must be a valid key with the prefix xbeK_*.  These keys are
   defined in APPEVENT.CH.
   
   GOTFOCUS < bGotFocus > is a code block that is evaluated when this
   object receives input focus.  < bGotFocus > := {|uNIL1,uNIL2,self|...}
   
   LOSTFOCUS < bLostFocus > is a code block that is evaluated when this
   object loses input focus.  < bLostFocus > := {|uNIL1,uNIL2,self|...}
   
   TABSTOP will cause the object (Xbase Part) to be set when using
   the Tab key.  Note: When logical groups are defined in a dialog
   using TABGROUP < nTabGroup >, TABSTOP is usually set to .T. (true)
   for the first dialog element in the group.  This allows the first
   dialog element of a group to be activated using the Tab key.
   
   NOTABSTOP will cause the object (Xbase Part) to be ignored when
   using the Tab key. This clause is needed only to override any
   default setting of TabStop by the DCGETOPTIONS [TABSTOP] command.
   
   TABGROUP< nTabGroup > allows objects (Xbase Parts) that are created
   immediately after one another in the GetList to be combined into
   logical groups. This allows the user to navigate within a dialog
   from group to group by pressing the Tab key.  Within a group of
   dialog elements navigation is performed using the cursor keys.
   
   Only constants defined in the XBP.CH file can be used as values
   for this instance variable.  The following table lists the
   available constants:
   
   #define constants for < nTabGroup >:
   
    Constant             Description
   
    XBP_NO_GROUP     *)  Dialog element does not belong to a group
    XBP_BEGIN_GROUP      Dialog element is the first in a group
                         (this begins the definition of the group)
    XBP_WITHIN_GROUP     Dialog element is within a group
    XBP_END_GROUP        Dialog element is the last in a group
                         (this ends the definition of the group)
   
   *) Default value
   
   GROUP < cGroup > is a "group" name (case-sensitive) to assign to
   this GetList object.  Assignment to a group makes it possible to
   perform operations only on GetList items which are members of a
   specified group, using functions such as DC_GetRefresh() or
   DC_ReadGui().
   VISIBLE determines whether the object is visible immediately after
   the call to the method :create() . By default the object follows
   the VISIBLE clause of the DCGETOPTIONS command.  Use the
   INVISIBLE clause to override the VISIBLE clause of DCGETOPTIONS.
   
   EXITKEY < nExitKey > defines a key to be used to move focus from
   the MULTILINE object to the next GET or MULTILINE object in the
   GetList.
   
   MAXLINES < nMaxLines > is the maximum number of lines which may be
   entered.  If the MESSAGE < bcMaxLinesMessage > clause is used, then
   the message will also be displayed when the number of lines is
   exceeded.
   
   LINELENGTH < nLineLength > is the maximum number of characters allowed
   on a line. If the MESSAGE < bcLineLengthMessage > clause is used, then
   the message will also be displayed when a line exceeds the
   designated length.
   
   MAXCHARS < nMaxChars > is the maximum number of characters which may
   be entered.  If the MESSAGE < bcMaxCharsMessage > clause is used, then
   the message will also be displayed when the number of characters
   is exceeded.
   
   MAINDICT < cMainDict > Path & file name of main dictionary (KL_Spell.dic)
   
   ADDONDICT < cAddOnDict > Path & file name of add on dictionary (Added.dic)
   
   SUGGESTFONT < cSuggestFont > CompoundName Font for suggestion box (Depends
            on screen resolution)
   
   ABOXPOS < aBoxPos > Position array for starting position of suggestion box
            relative to AppDeskTop() (Default position calculated)
   
   SHORTSPELL < nShortSpell > Shortcut key to start spell check (xbeK_CTRL_Q)
   
   DELWORDKEY < nDelWordKey > Key for delete word (xbeK_CTRL_BS)
   
   DELWORDFUN < nDelWordFun > Function Key for delete word (xbeK_F8)
   
   DELLINEKEY < nDelLineKey > Key for delete line (xbeK_ALT_K)
   
   DELLINEFUN < nDelLineFun > Function Key for delete line (xbeK_F7)
   
   PRINTFONT < cPrtFont > Default Compound Font name for printing
   
   TOPMARGIN < nPrtTopMar > Default top margin for printing
   
   LEFTMARGIN < nPrtLeftMar > Default left margin for printing
   
   BOTTOMMARGIN < nPrtBotMar > Default bottom margin for printing
   
   WORDDELIMITERS < cWrdDelimit > String of all characters which delimit
           words for find operations.
   
   FINDHIGHLIGHT Default to highlight found word.
   
   MATCHCASE Forces find operations to be case sensitive.
   
   REMEMBERFIND Logical option to cause KL_MLE to remember the find string for
   the
           next search operation.
   
   NOREMEMBERFIND Logical option to cause KL_MLE to start each find operation
   with
           a blank string.
   
   SEARCHWRAP Option to force KL_MLE to wrap back to top of the string at the end
           of a search.  (not yet functional)
   
   NOSEARCHWRAP Option to cause KL_MLE to stop searching at the end of the
   string,
           without wrapping (this is the default)
   
   FINDBOXPOS < aFindBoxPos > Position array for starting position of find/replace
   box
            relative to AppDeskTop() (Default position calculated)
   

Description:

    The command @..DCKLMLE creates a new multi-line edit
    object and adds the object to the array named GETLIST which
    is later processed by the DC_READGUI() function or by the
    DCREAD GUI command.  The GETLIST array must be first declared and
    initialized to the value of {}.  The command DCREAD GUI activates
    the edit mode for all objects found in the GetList array.
    A Getlist object remains stored as long as it is referenced
    in an array or by a variable.  The commands CLEAR and
    CLEAR GETS assign an empty array to the GetList variable.
    This also occurs after the completion of the DCREAD command
    if it is called without the SAVE option, causing all Get
    objects referenced by the GetList array to be released.
   
    @..DCKLMLE objects can be combined with any objects that
    that use the DCDIALOG system, such as @..DCSAY..GET,
    @..DCRADIO, @..DCBUTTON, @..DCCHECKBOX or @..DCTABPAGE.
   

Notes:

    DCKLMLE is a special 3rd party class that accesses KL_MLE.  KL_MLE
    is available from Informed Computer Solutions, Inc. for further
    information on ordering KL_MLE, contact:
   
               Ken Levit -þ> KL_MLE@VetsPet.com
   
    The multiline object created by @ DCKLMLE is an object of the
    XbpMLE() class, therefore it can be manipulated with any iVar
    or method supported by XbpMLE().  In addition the DCKLMLE supports
    the following special methods:  (Refer to KL_MLE documentation for
    details on these methods and shortcut keys available in KL_MLE.
   
    DeHighlight()         GoTop()                 RowHeight()
    DeleteLine()          isOnScreen()            RowsOnScreen()
    DeleteWord()          LineCount()             ScrollToCursor()
    Find()                Print()                 SetTabs()
    GetLine()             ReplaceAllFind()        SelectAll()
    GoBottom()            ReplaceLastFind()       SpellCheck()
   

Examples:

     #include "dcdialog.ch"
     #include "dc3p.ch"
   
     PROCEDURE Xtest()
     LOCAL GetList := {}, cMemo, lOk
   
     USE COLLECT NEW SHARED
   
     cMemo := COLLECT->memo
   
     @ 0,0 DCMULTILINE cMemo FONT "10.Courier" SIZE 80,10
     @ 1,1 DCKLMLE cMemo                    ;
                NOHORIZSCROLL               ;
                SIZE 77.5,9.5               ;
                FONT "10.Courier"           ;
                GROUP "NoteField"           ;
                ID "TheNote"                ;
                SUGGESTFONT "10.Arial Bold" ;
                MAINDICT "Test.Dic"         ;
                ADDONDICT "TestAdd.Dic"     ;
                PRINTFONT "10.Courier New"  ;
                OBJECT oNote
   
     DCREAD GUI ;
        FIT ;
        ADDBUTTONS TO lOk
   
     IF lOk .AND. DC_RecLock()
       REPL COLLECT->memo WITH cMemo
       UNLOCK
     ENDIF
   
     CLOSE collect
   
     RETURN
   

Source/Library:

  DC3P.CH

See Also:

   @ DCMULTILINE



@ DCLISTBOX

Create a LISTBOX object for displaying with GUI reader

Syntax:

   @ < nRow >,< nCol > DCLISTBOX < uOutVar > LIST < aVar > ;
       [PARENT < oParent >] ;
       [PARENTID < cParentId >] ;
       [SIZE < nWidth >,< nHeight >] ;
       [WHEN < bWhen >] ;
       [HIDE < bHide >] ;
       [EDITPROTECT < bProtect >] ;
       [FONT < bocFont >] ;
       [PRESENTATION < aPres >] ;
       [HORIZSCROLL] ;
       [MARKMODE < nMarkMode >] ;
       [SELECT < aSelect >] ;
       [PIXEL] ;
       [TOOLTIP < bcToolTip >] ;
       [MESSAGE < bcMsg > [INTO < oMsgBox >]] ;
       [DATALINK < bLink >] ;
       [ITEMMARKED < bItemMarked >] ;
       [ITEMSELECTED < bItemSelected >] ;
       [COLOR < bncFgC > [,< ncBgC >] ] ;
       [OBJECT < oObject >] ;
       [CARGO < xCargo >] ;
       [CURSOR < naCursor >] ;
       [PREEVAL < bPreEval >] ;
       [EVAL < bEval >] ;
       [RELATIVE < oRel >] ;
       [ID < cId >] ;
       [TITLE < cTitle >] ;
       [ACCELKEY < anAccel >] ;
       [GOTFOCUS < bGotFocus >] ;
       [LOSTFOCUS < bLostFocus >] ;
       [TABSTOP]  ;
       [NOTABSTOP];
       [TABGROUP < nTabGroup >] ;
       [VISIBLE] ;
       [INVISIBLE] ;
       [GROUP < cGroup >] ;
       [MULTICOLUMN] ;
       [NAME < cVarName >]
   

Arguments:

   < nRow > and < nCol > are the row and column of the screen.
   Coordinates are always relative to position 0,0 ie. Top,Left
   of the parent object, unless the RELATIVE argument is used.
   If no parent is assigned, then the parent is the Dialog box.
   IF the PIXEL option is set to .TRUE. in DCGETOPTIONS, then
   the numbers are in pixels otherwise they are in standard
   text-based coordinates.  You can also force the pixel
   mode by including PIXEL as a command argument.
   
   < uOutVar > is the output variable.  This may be initialized to
   either a character string variable or an array.  If it is a
   character string, then only one choice in the listbox will be
   allowed and the choice will be returned as a character string
   in the variable < uOutVar >.  If it is an array, then the listbox
   will allow multiple choices which will be returned as a
   set of characters in a single-dimensional array and stored
   in < uOutVar >. It must not be a macro, however it may be a code
   block that contains a macro. The < uOutVar > is automatically
   anchored via a Get-Set codeblock created by DC_GetAnchorCB()
   unless < uVar > is a custom Get-Set code block.
   
   < aVar > is a single-dimensional array of character strings
   which is used as the list box of items.
   
   RELATIVE < oRel > is an optional object in the Getlist which
   determines the start coordinates of this object.  If this
   option is used, then the < nSrow >, < nSCol > coordinates are
   relative to the starting coordinates of < oRel > rather than
   the parent object.
   
   SIZE < nWidth >,< nHeight > is the width and height of the
   listbox.  If the PIXEL option is set to .TRUE. in DCGET
   OPTIONS, then the numbers are in pixels otherwise they are
   in standard text-based numbers.
   
   PARENT < oParent > is the name of the variable that was assigned to
   the parent object for this object.  Only use this clause if you
   are placing this object onto another dialogue object.  If this
   argument is not passed then the parent will be the object set
   with the DCSETPARENT command.
   
   PARENTID < cParentID > may be used in lieu of the PARENT < oParent >
   clause.  This identifies the ID of the parent instead of the
   parent's object variable name.
   
   OBJECT < oObject > is the name of the variable to assign as a
   storage place for this object.
   
   FONT < cFont > is a character string defining an optional font.
   The font string must conform to the Xbase++ standard, ie.
   "10.Courier.Bold". It may also be a font object or a code block
   that returns a character string or a font object to later
   refresh with DC_GetRefresh().
   
   MARKMODE < nMarkMode > is a constant from the following table:
   
    Constant                   Description
   
    XBPLISTBOX_MM_SINGLE   *)  Only one item can be marked
    XBPLISTBOX_MM_MULTIPLE     Multiple items can be marked
                               (special keys are ignored)
    XBPLISTBOX_MM_EXTENDED     Multiple items can be marked
                               (special keys are supported)
   
   *) default
   
   The above constants are defined in XBP.CH.
   If XBPLISTBOX_MM_MULTIPLE is used, any number of items can be
   marked and/or selected with the mouse.  The space bar toggles
   the selection. The extended selection mode
   (XBPLISTBOX_MM_EXTENDED) allows for selecting multiple items by
   holding the left button down and moving the mouse. In addition,
   the special keys Shift and Ctrl are supported.
   
   SELECT < aSelect > is an array of pointers into < aVar >.  This
   array is used to Pre-Select items in the list box.  For example,
   to pre-select items 4, 10, and 15, < aSelect > will be equal to
   { 4, 10, 15 }.
   
   PRESENTATION < aPres > is a two-dimensional array. If specified,
   this contains presentation parameters for the listbox object.
   The first column of the array must contain #define constants
   from the XBP.CH file starting with the prefix XBP_PP_. These
   constants define the presentation parameters that can be set
   for the object and include colors and fonts. The second column
   of the array in < aPres > contains the value for each setting.
   These are also generally set using #define constants from the
   GRA.CH file.
   
   TOOLTIP < bcToolTip > is a character string which will display
   as a "Tool Tip" next to the object when the cursor is passed
   over the object. A semi-colon within the text indicates a new
   line.  If < bcToolTip > is a code-block, it must return a character
   string.  NOTE: The Tooltip painting method is run in another
   thread, therefore the codeblock should not run code that points
   to the current work area.  It may however, contain local, public
   or private variables.
   
   MESSAGE < bcMsg > is the message you want to display in the
   message area of the dialogue screen defined by the DCMESSAGEBOX
   command when the object is in focus.  Optionally, INTO < oMsgBox >
   will designate which message box to display the message into.
   If the INTO clause is not used, then the last message box in the
   GetList is the default. < oMsgBox > may also be any object that
   supports the :setCaption() method.If < bcMsg > is a code-block,
   it must return a character string.
   
   CURSOR < naCursor > may be either a numeric value or an array of
   3 elements which defines an optional mouse pointer to use for
   this object.  System mouse pointers start with
   XBPWINDOW_POINTERTYPE_ and are defined in XPB.CH.  The default
   pointer is XBPWINDOW_POINTERTYPE_POINTER.  < naCursor > may be a
   numeric resource ID that points to a Bit-Map that has been
   compiled with the resource compiler and linked to the .EXE.
   < naCursor > may be a 3-element array described as follows:
   
     Element  Type  Description
     -------  ---- ---------------------------------------------
       [1]      C   Optional name of .DLL containing the pointer
                    resource.
   
       [2]      N   The numeric resource ID of the pointer.  If
                    element 1 is a NIL, then this resource must be
                    linked into the .EXE.
   
       [3]      N   The type of resource as defined in XBP.CH.
   
   PREEVAL < bPreEval > is a code block to be evaluated by the GUI
   reader before the Xbase Parts object is created.  The object is
   passed to the code block.
   
   EVAL < bEval > is a code block to be evaluated by the GUI reader
   after the Xbase Parts object is created.  The object is passed
   to the code block.
   
   CARGO < xCargo > is any kind of data you wish to to add to the
   :cargo container for this object.  The cargo may be accessed
   at any time via the :cargo exported variable, however it will not
   be stored in the same manner it is entered.  The :cargo container
   of DCDIALOG objects is an array of at least three elements:
   
    [1] - A numeric value that is a pointer to the Getlist array
          for this object.
   
    [2] - A pointer to the GetList array.
   
    [3] - The value of < xCargo >.
   
    [4] and up - optional values added by the GUI reader.
   
   COLOR < ncFGc >, < ncBGc > are foreground and background colors.
   They may be character strings representing valid text-based
   colors supported by SetColor() or they may be numeric constants
   which begin with either the prefix GRA_CLR_ or the prefix
   XBPSYSCLR_ as defined in GRA.CH or XBP.CH. If < bncFGc > is a
   code block is must return a 2-element array containing a
   foreground and background color.
   
   ID < cId > is a unique identifier for this object.  This ID is used
   with functions like DC_GETORIGUPDATED() to determine the status
   of a get object.
   
   TITLE < cTitle > is a title to assign to this object.  The title
   is not displayed on the screen but is simply a description of the
   get object which is saved in the GetList.
   
   EDITPROTECT < bProtect > is an optional condition tested during the
   execution of the GUI gets by the DCREAD GUI command, before the
   object receives input focus (before it is activated). When the
   condition returns the value .T. (true), the object receives the
   input focus.  Otherwise, it is skipped. < bProtect > is a code
   block that must return a logical value when evaluated. The code
   block is evaluated prior to the object receiving input focus.
   This clause behaves similar to the WHEN clause with the exception
   that the object is not disabled (grayed out).  The object is
   passed as a parameter to the code block.
   
   WHEN < bWhen > is a code block that is evaluated in the event loop.
   This code block must return a logical value.  If the value
   returned is .FALSE. then the object will be disabled and grayed.
   If the value returned is .TRUE. then the object will be enabled.
   The object is passed as a parameter to the code block.
   
   HIDE < bHide > is a code block that is evaluated in the event loop.
   This code block must return a logical value.  If the value
   returned is .TRUE. then the object will be hidden from view.  If
   the value returned is .FALSE. then the object will be displayed.
   The object is passed as a parameter to the code block.
   
   ACCELKEY < anAccel > is a numeric "hot-key" assignment that will set
   focus to the checkbox object when the hot-key is pressed.  The key
   must be a valid key with the prefix xbeK_*.  These keys are
   defined in APPEVENT.CH.  < anAccel > may also be an array of numeric
   values to assign more than one key to the object.
   
   DATALINK < bLink > is an optional code block that is evaluated
   every time Get/Set codeblock is evaluated, ie when the data
   is read from the < aVar > into the object except when using
   a user-defined Get/Set code block.
   
   GOTFOCUS < bGotFocus > is a code block that is evaluated when this
   object receives input focus.  < bGotFocus > := {|uNIL1,uNIL2,self|...}
   
   LOSTFOCUS < bLostFocus > is a code block that is evaluated when this
   object loses input focus.  < bLostFocus > := {|uNIL1,uNIL2,self|...}
   
   TABSTOP will cause the object (Xbase Part) to be set when using
   the Tab key.  Note: When logical groups are defined in a dialog
   using TABGROUP < nTabGroup >, TABSTOP is usually set to .T. (true)
   for the first dialog element in the group.  This allows the first
   dialog element of a group to be activated using the Tab key.
   
   NOTABSTOP will cause the object (Xbase Part) to be ignored when
   using the Tab key. This clause is needed only to override any
   default setting of TabStop by the DCGETOPTIONS [TABSTOP] command.
   
   TABGROUP < nTabGroup > allows objects (Xbase Parts) that are created
   immediately after one another in the GetList to be combined into
   logical groups. This allows the user to navigate within a dialog
   from group to group by pressing the Tab key.  Within a group of
   dialog elements navigation is performed using the cursor keys.
   
   Only constants defined in the XBP.CH file can be used as values
   for this instance variable.  The following table lists the
   available constants:
   
   #define constants for < nTabGroup >:
   
    Constant             Description
   
    XBP_NO_GROUP     *)  Dialog element does not belong to a group
    XBP_BEGIN_GROUP      Dialog element is the first in a group
                         (this begins the definition of the group)
    XBP_WITHIN_GROUP     Dialog element is within a group
    XBP_END_GROUP        Dialog element is the last in a group
                         (this ends the definition of the group)
   
   *) Default value
   
   GROUP < cGroup > is a "group" name (case-sensitive) to assign to
   this GetList object.  Assignment to a group makes it possible to
   perform operations only on GetList items which are members of a
   specified group, using functions such as DC_GetRefresh() or
   DC_ReadGui().
   
   VISIBLE determines whether the object is visible immediately after
   the call to the method :create() . By default the object follows
   the VISIBLE clause of the DCGETOPTIONS command.  Use the
   INVISIBLE clause to override the VISIBLE clause of DCGETOPTIONS
   
   By default, the list box is displayed without a horizontal scroll
   bar. If items in the list have more characters than can be
   displayed in the width of the display window, a horizontal scroll
   bar can be provided by using the HORIZSCROLL clause.
   
   ITEMMARKED < bItemMarked > is a code block to evaluate when a data
   row is highlighted in the picklist.  The code block must be
   formatted as {| uNIL1, uNIL2, self | ... }.
   
   ITEMSELECTED < bItemSelected > is a code block to evaluate when
   a data row is selected with a double-click of the left mouse
   button or by pressing the ENTER key in the browser.  The code
   block must be formatted as {| uNIL1, uNIL2, self | ... }.
   
   MULTICOLUMN causes items to be displayed in multiple columns
   that can be scrolled horizontally. The vertical scrollbar is
   automatically hidden and the HORIZSCROLL clause is ignored.
   
   NAME < cVarName > is the variable name to assign to the GET
   object (for HTML based applications.)
   

Description:

    The command @..DCLISTBOX creates a new List Box object and
    adds the object to the array named GETLIST which is later
    processed by the DC_READGUI() function or by the DCREAD GUI
    command.  The GETLIST array must be first declared and
    initialized to the value of {}.  The command DCREAD GUI activates
    the edit mode for all objects found in the GetList array.
    A Getlist object remains stored as long as it is referenced
    in an array or by a variable.  The commands CLEAR and
    CLEAR GETS assign an empty array to the GetList variable.
    This also occurs after the completion of the DCREAD command
    if it is called without the SAVE option, causing all Get
    objects referenced by the GetList array to be released.
   
    @..DCLISTBOX objects can be combined with any objects that
    that use the DCDIALOG system, such as @..DCSAY..GET,
    @..DCRADIO, @..DCPUSHBUTTON, @..DCCHECKBOX or @..DCTABPAGE.
   

Notes:

   
    GUI Applications :
   
    The listbox object created by @ DCLISTBOX is an object of the
    DC_XbpListBox() class which inherits from the XbpListBox()
    class, therefore it can be manipulated with any iVar or method
    supported by XbpListBox().
   
    ------------------
   
    HTML Applications:
   
    The listbox object created by @ DCLISTBOX is an object of the
    DC_HtmlListBox() class.
   

Examples:

     #include "dcdialog.ch"
   
     PROCEDURE Xtest()
   
     LOCAL GetList := {}, aFields, cField
   
     USE Customer
   
     aFields := Array(FCount())
     AFields( aFields ) // fill array with field list.
   
     @ 5,10 DCLISTBOX cField LIST aFields FONT "10.Courier"  ;
       SIZE 15,10
   
     DCREAD GUI ;
        TITLE 'List Box Demo' ;
        FIT ;
        ADDBUTTONS
   

Source/Library:

  DCDIALOG.CH

See Also:

   @ DCCOMBOBOX
   @ DCPICKLIST
   dc_vartolistbox()



@ DCMESSAGEBOX

Create a MESSAGE BOX area for displaying with GUI reader

Syntax:

   [ @ < nRow >,< nCol > ] DCMESSAGEBOX ;
       [OBJECT < oMsgBox >] ;
       [TEXTOBJECT < oMsgBoxText >] ;
       [TYPE < nType >] ;
       [SIZE < nWidth > [,< nHeight >]] ;
       [PARENT < oParent >] ;
       [PARENTID < cParentId >] ;
       [FONT < bocFont >] ;
       [COLOR < bncFgC > [,< ncBgC >] ] ;
       [CARGO < xCargo >] ;
       [PRESENTATION < aPres >] ;
       [ALIGN < nAlign >] ;
       [PIXEL] ;
       [PREEVAL < bPreEval >] ;
       [EVAL < bEval >] ;
       [ID < cId >] ;
       [TITLE < cTitle >] ;
       [GROUP < cGroup >] ;
       [VISIBLE] ;
       [INVISIBLE] ;
       [MOTION]
   

Arguments:

   OBJECT < oMsgBox > is the name of the variable to assign as a
   storage place for the box portion of this object.
   
   TYPE < nType > is the type of message box. Message boxes are created
   using XbpStatic() objects, so valid constants start with the
   prefix XBPSTATIC_TYPE_ and are listed in XBP.CH.  The default
   is XBPSTATIC_TYPE_HALFTONEFRAME.
   
   TEXTOBJECT < oMsgBoxText > is the name of the variable to assign
   as a storage place for the text portion of the object :
   XbpStatic() type text.
   
   ALIGN < nAlign > is a numeric constant defined in DCDIALOG.CH.
   There are two alignment options:
   
    MESSAGEBOX_TOP     Anchor to top of the dialog or parent.
    MESSAGEBOX_BOTTOM  Anchor to bottom of dialog or parent.
   
   < nRow > and < nCol > is the starting location of the Message Box
   in text-based coordinates, unless the PIXEL clause is used.  If
   no < nRow > and < nCol > arguments are used, then the message box
   is located in acordance with the ALIGN < nAlign > option.
   
   PARENT < oParent > is the name of the variable that was assigned to
   the parent object for this object.  Only use this clause if you
   are placing this object onto another dialogue object.  If this
   clause is not used, then the object will be displayed in the
   top-level dialogue screen.
   
   PARENTID < cParentID > may be used in lieu of the PARENT < oParent >
   clause.  This identifies the ID of the parent instead of the
   parent's object variable name.
   
   SIZE < nWidth >, < nHeight > optionally define the size of the
   message box.  If no size is given, then the message box will be
   automatically sized horizontally to fit the parent window.  IF
   the PIXEL option is set to .TRUE. in DCGETOPTIONS, then the
   numbers are in pixels otherwise they are in standard text-based
   coordinates.  You can also force the pixel mode by including
   PIXEL in the command.
   
   PRESENTATION < aPres > is a two-dimensional array. If specified,
   this contains presentation parameters for the Message Box object.
   The first column of the array must contain #define constants
   from the XBP.CH file starting with the prefix XBP_PP_. These
   constants define the presentation parameters that can be set
   for the object and include colors and fonts. The second column
   of the array in < aPres > contains the value for each setting.
   These are also generally set using #define constants from the
   GRA.CH file.
   
   PREEVAL < bPreEval > is a code block to be evaluated by the GUI
   reader before the Xbase Parts object is created.  The object is
   passed to the code block.
   
   EVAL < bEval > is a code block to be evaluated by the GUI reader
   after the Xbase Parts object is created.  The object is passed
   to the code block.
   
   FONT < cFont > is the font to use for the text that is displayed
   in the message box.  The default font is "10.Helv". It may also
   be a font object or a code block that returns a character string
   or a font object to later refresh with DC_GetRefresh().
   
   CARGO < xCargo > is any kind of data you wish to to add to the
   :cargo container for this object.  The cargo may be accessed
   at any time via the :cargo exported variable, however it will not
   be stored in the same manner it is entered.  The :cargo container
   of DCDIALOG objects is an array of at least three elements:
   
    [1] - A numeric value that is a pointer to the Getlist array
          for this object.
   
    [2] - A pointer to the GetList array.
   
    [3] - The value of < xCargo >.
   
    [4] and up - optional values added by the GUI reader.
   
   COLOR < ncFGc >, < ncBGc > are foreground and background colors.
   They may be character strings representing valid text-based
   colors supported by SetColor() or they may be numeric constants
   which begin with either the prefix GRA_CLR_ or the prefix
   XBPSYSCLR_ as defined in GRA.CH or XBP.CH. If < bncFGc > is a
   code block is must return a 2-element array containing a
   foreground and background color.
   
   ID < cId > is a unique identifier for this object.  This ID is used
   with functions like DC_GETORIGUPDATED() to determine the status
   of a get object.
   
   TITLE < cTitle > is a title to assign to this object.  The title
   is not displayed on the screen but is simply a description of the
   get object which is saved in the GetList.
   
   GROUP < cGroup > is a "group" name (case-sensitive) to assign to
   this GetList object.  Assignment to a group makes it possible to
   perform operations only on GetList items which are members of a
   specified group, using functions such as DC_GetRefresh() or
   DC_ReadGui().
   
   VISIBLE determines whether the object is visible immediately after
   the call to the method :create() . By default the object follows
   the VISIBLE clause of the DCGETOPTIONS command.  Use the
   INVISIBLE clause to override the VISIBLE clause of DCGETOPTIONS
   
   MOTION determines whether messages are visible when the mouse is
   placed over the object rather than when the object obtains focus.
   

Description:

    The command DCMESSAGEBOX creates a message box at the top or
    the bottom of the dialog screen for displaying messages that
    are attached to objects.  The Message Box object is added to
    the array named GETLIST which is later processed by the
    DC_READGUI() function or by the DCREAD GUI command.  The GETLIST
    array must be first declared and initialized to the value of {}.
    The command DCREAD GUI activates the edit mode for all objects
    found in the GetList array.  A Getlist object remains stored as
    long as it is referenced in an array or by a variable.  The
    commands CLEAR and CLEAR GETS assign an empty array to the
    GetList variable.  This also occurs after the completion of the
    DCREAD command if it is called without the SAVE option, causing
    all Get objects referenced by the GetList array to be released.
   
    Any Getlist object in the GetList array can have a message
    attached to it via the MESSAGE option for the respective
    command.  When the object is brought into focus, the message is
    displayed in the message box.
   
    DCMESSAGEBOX objects can be combined with any objects that
    that use the DCDIALOG system, such as @..DCSAY..GET,
    @..DCRADIO, @..DCBUTTON, @..DCCHECKBOX or @..DCTABPAGE.
   

Notes:

    The objects created by @ DCMESSAGEBOX are objects of the
    XbpStatic() class, therefore they can be manipulated with
    any iVar or method supported by XbpStatic().  Two objects are
    created, one for the static area and one for the message text.
   

Examples:

   #include "dcdialog.ch"
   
   PROCEDURE XTest()
   
   LOCAL GetList := {}, cDesc, cMemo, oMsgBox, lOk
   
   USE Collect NEW SHARED
   
   cDesc := COLLECT->descrip
   cMemo := COLLECT->memo
   
   DCMESSAGEBOX oMsgBox
   
   @ 2,0 DCSAY 'Enter Desc' GET cDesc ;
       MESSAGE 'Enter the full description of this item'
   
   @ 5,0 DCMULTILINE cMemo FONT "10.Courier.New" SIZE 70,10 ;
       MESSAGE 'Tell us something about how you acquired this item'
   
   DCREAD GUI ;
      TITLE 'Message Box Demo' ;
      TO lOk ;
      ADDBUTTONS ;
      FIT
   
   IF lOk .AND. DC_RecLock()
     REPL COLLECT->memo WITH cMemo, ;
          COLLECT->descrip WITH cDesc
     UNLOCK
   ENDIF
   
   RETURN
   

Source/Library:

  DCDIALOG.CH

@ DCMULTILINE

Create a MULTILINE edit for displaying with GUI reader

Syntax:

   @ < nRow >,< nCol > DCMULTILINE < uVar > ;
       [PARENT < oParent >] ;
       [PARENTID < cParentId >] ;
       [VALID < bValid >] ;
       [WHEN < bWhen >] ;
       [HIDE < bHide >] ;
     * [EDITPROTECT < bProtect >] ;
       [SIZE < nWidth >,< nHeight >] ;
       [MESSAGE < bcMsg > [INTO < oMsgBox >]] ;
       [FONT < bocFont >] ;
       [COLOR < bncFgC > [,< ncBgC >] ] ;
       [HELPCODE < cHelpCode >] ;
     * [DATALINK < bLink >] ;
       [OBJECT < oObject >] ;
       [CARGO < xCargo >] ;
     * [READONLY] ;
     * [NOWORDWRAP] ;
     * [NOBORDER] ;
     * [NOVERTSCROLL] ;
     * [NOHORIZSCROLL] ;
     * [IGNORETAB] ;
     * [COMPATIBLE] ;
     * [PRESENTATION < aPres >] ;
     * [PIXEL] ;
     * [TOOLTIP < bcToolTip >] ;
     * [CURSOR < naCursor >] ;
       [PREEVAL < bPreEval >] ;
       [EVAL < bEval >] ;
       [RELATIVE < oRel >] ;
       [ID < cId >] ;
       [TITLE < cTitle >] ;
     * [ACCELKEY < nKey >] ;
     * [GOTFOCUS < bGotFocus >] ;
     * [LOSTFOCUS < bLostFocus >] ;
     * [TABSTOP] ;
     * [NOTABSTOP] ;
     * [TABGROUP < nTabGroup >] ;
     * [VISIBLE] ;
     * [INVISIBLE] ;
       [GROUP < cGroup >] ;
     * [EXITKEY < nExitKey >] ;
     * [MAXLINES < nMaxLines > [MESSAGE < bcMaxLinesMessage >]] ;
     * [LINELENGTH < nLineLength > [MESSAGE < bcLineLengthMessage >]] ;
     * [MAXCHARS < nMaxChars > [MESSAGE < bcMaxCharsMessage >]] ;
       [NAME < cVarName >]
   

Arguments:

   GUI applications:
   
   < nRow > and < nCol > are the row and column of the screen.
   Coordinates are always relative to position 0,0 ie. Top,Left
   of the parent object, unless the RELATIVE < oRel > argument is
   used.  If no parent is assigned, then the parent is the Dialog
   box.  IF the PIXEL option is set to .TRUE. in DCGETOPTIONS,
   then the numbers are in pixels otherwise they are in standard
   text-based coordinates.  You can also force the pixel
   mode by including PIXEL as a command argument.
   
   HTML applications:
   
   < nRow > and < nCol > are the row number and column number of
   the table if the parent of this object is a DCTABLE. The
   text will be inserted in the cell of the table defined by
   the row/column.
   
   < uVar > is the input/output variable.  This should be
   initialized to a character string. It must not be a macro, however
   it may be a code block that contains a macro. The < uVar > is
   automatically anchored via a Get-Set codeblock created by
   DC_GetAnchorCB() unless < uVar > is a custom Get-Set
   code block.
   
   RELATIVE < oRel > is an optional object in the Getlist which
   determines the start coordinates of this object.  If this
   option is used, then the < nSrow >, < nSCol > coordinates are
   relative to the starting coordinates of < oRel > rather than
   the parent object.
   
   SIZE < nWidth >,< nHeight > is the width and height of the
   multiline box.  If the PIXEL option is set to .TRUE. in DCGET
   OPTIONS, then the numbers are in pixels otherwise they are
   in standard text-based numbers.
   
   PARENT < oParent > is the name of the variable that was assigned to
   the parent object for this object.  Only use this clause if you
   are placing this object onto another dialogue object.  If this
   argument is not passed then the parent will be the object set
   with the DCSETPARENT command.
   
   PARENTID < cParentID > may be used in lieu of the PARENT < oParent >
   clause.  This identifies the ID of the parent instead of the
   parent's object variable name.
   
   OBJECT < oObject > is the name of the variable to assign as a
   storage place for this object.
   
   FONT < cFont > is a character string defining an optional font.
   The font string must conform to the Xbase++ standard, ie.
   "10.Courier.Bold". It may also be a font object or a code block
   that returns a character string or a font object to later
   refresh with DC_GetRefresh().
   
   MESSAGE < bcMsg > is the message you want to display in the
   message area of the dialogue screen defined by the DCMESSAGEBOX
   command when the object is in focus.  Optionally, INTO < oMsgBox >
   will designate which message box to display the message into.
   If the INTO clause is not used, then the last message box in the
   GetList is the default. < oMsgBox > may also be any object that
   supports the :setCaption() method.If < bcMsg > is a code-block,
   it must return a character string.
   
   WHEN < bWhen > is a code block that is evaluated in the event loop.
   This code block must return a logical value.  If the value
   returned is .FALSE. then the object will be disabled and grayed.
   If the value returned is .TRUE. then the object will be enabled.
   The object is passed as a parameter to the code block.
   
   HIDE < bHide > is a code block that is evaluated in the event loop.
   This code block must return a logical value.  If the value
   returned is .TRUE. then the object will be hidden from view.  If
   the value returned is .FALSE. then the object will be displayed.
   The object is passed as a parameter to the code block.
   
   EDITPROTECT < bProtect > is an optional condition tested during the
   execution of the GUI gets by the DCREAD GUI command, before the
   object receives input focus (before it is activated). When the
   condition returns the value .T. (true), the object receives the
   input focus.  Otherwise, it is skipped. < bProtect > is a code
   block that must return a logical value when evaluated. The code
   block is evaluated prior to the object receiving input focus.
   This clause behaves similar to the WHEN clause with the exception
   that the object is not disabled (grayed out).  The object is
   passed as a parameter to the code block.
   
   VALID < bValid > is an optional condition tested during the
   execution of the GUI gets by the READ command before an
   object loses input focus (before it is deactivated).  When
   the condition returns the value .T. (true), the object
   loses the input focus.  Otherwise, it remains active. < bValid >
   is a code block that must return a logical value when it is
   evaluated.  The object passed as a parameter to the code block.
   
   HELPCODE < cHelp > is a character string that is passed to the
   DC_HelpF1() function if F1 is pressed or the HELP button
   is clicked when this object has focus.  This HELPCODE allows
   the Help system to override the passing of the Procedure and
   Varname for more specific context-help.
   
   PRESENTATION < aPres > is a two-dimensional array. If specified,
   this contains presentation parameters for the multiline object.
   The first column of the array must contain #define constants
   from the XBP.CH file starting with the prefix XBP_PP_. These
   constants define the presentation parameters that can be set
   for the object and include colors and fonts. The second column
   of the array in < aPres > contains the value for each setting.
   These are also generally set using #define constants from the
   GRA.CH file.
   
   READONLY will not allow editing of the text.  The entire text
   area will be grayed.
   
   NOWORDWRAP means that the text is not wrapped.  The default is
   word-wrap ON so that it is completely displayed in the edit
   window.  Individual text lines that contain more characters
   than can be displayed within the edit window are automatically
   wrapped at the spaces between words.  With NOWORDWRAP, new
   lines are started in the edit window only when CRLF explicitly
   appears in the edit buffer. Text lines that contain more
   characters than can be displayed in the edit window are cut
   off and the text must be horizontally scrolled in order to view
   all the characters.  To enable WORDWRAP the NOHORIZSCROLL clause
   must be used.
   
   NOVERTSCROLL will suppress the vertical scrollbar on the right
   side of the window.
   
   NOHORIZSCROLL will suppress the horizontal scrollbar on the
   bottom of the window.
   
   IGNORETAB causes the Tab key to navigates between other objects
   on the dialog screen and is not interpreted as a character.
   The default action is for the Tab key character to be written
   to the edit buffer.
   
   NOBORDER suppress the painting of a border around the object.
   
   COMPATIBLE will make navigation keys compatabile with those of
   MemoEdit().  This means that keys like CTRL-R, CTRL-C, CRTL-E,
   CRTL-X, CTRL-Y, etc. will be recognized in addition to all the
   standard "windows-compatabile" keys.
   
   TOOLTIP < bcToolTip > is a character string which will display
   as a "Tool Tip" next to the object when the cursor is passed
   over the object. A semi-colon within the text indicates a new
   line.  If < bcToolTip > is a code-block, it must return a character
   string.  NOTE: The Tooltip painting method is run in another
   thread, therefore the codeblock should not run code that points
   to the current work area.  It may however, contain local, public
   or private variables.
   
   CURSOR < naCursor > may be either a numeric value or an array of
   3 elements which defines an optional mouse pointer to use for
   this object.  System mouse pointers start with
   XBPWINDOW_POINTERTYPE_ and are defined in XPB.CH.  The default
   pointer is XBPWINDOW_POINTERTYPE_POINTER.  < naCursor > may be a
   numeric resource ID that points to a Bit-Map that has been
   compiled with the resource compiler and linked to the .EXE.
   < naCursor > may be a 3-element array described as follows:
   
     Element  Type  Description
     -------  ---- ---------------------------------------------
       [1]      C   Optional name of .DLL containing the pointer
                    resource.
   
       [2]      N   The numeric resource ID of the pointer.  If
                    element 1 is a NIL, then this resource must be
                    linked into the .EXE.
   
       [3]      N   The type of resource as defined in XBP.CH.
   
   PREEVAL < bPreEval > is a code block to be evaluated by the GUI
   reader before the Xbase Parts object is created.  The object is
   passed to the code block.
   
   EVAL < bEval > is a code block to be evaluated by the GUI reader
   after the Xbase Parts object is created.  The object is passed
   to the code block.
   
   CARGO < xCargo > is any kind of data you wish to to add to the
   :cargo container for this object.  The cargo may be accessed
   at any time via the :cargo exported variable, however it will not
   be stored in the same manner it is entered.  The :cargo container
   of DCDIALOG objects is an array of at least three elements:
   
    [1] - A numeric value that is a pointer to the Getlist array
          for this object.
   
    [2] - A pointer to the GetList array.
   
    [3] - The value of < xCargo >.
   
    [4] and up - optional values added by the GUI reader.
   
   COLOR < ncFGc >, < ncBGc > are foreground and background colors.
   They may be character strings representing valid text-based
   colors supported by SetColor() or they may be numeric constants
   which begin with either the prefix GRA_CLR_ or the prefix
   XBPSYSCLR_ as defined in GRA.CH or XBP.CH. If < bncFGc > is a
   code block is must return a 2-element array containing a
   foreground and background color.
   
   ID < cId > is a unique identifier for this object.  This ID is used
   with functions like DC_GETORIGUPDATED() to determine the status
   of a get object.
   
   TITLE < cTitle > is a title to assign to this object.  The title
   is not displayed on the screen but is simply a description of the
   get object which is saved in the GetList.
   
   DATALINK < bLink > is an optional code block that is evaluated
   every time Get/Set codeblock is evaluated, ie when the data
   is read from the < uVar > into the object except when using
   a user-defined Get/Set code block.  < bLink > is also
   evaluated when DC_GetRefresh() is called unless the < lDataLink >
   parameter of DC_GetRefresh() is .FALSE.
   
   ACCELKEY < nKey > is a numeric "hot-key" assignment that will set
   focus to the memo object when the hot-key is pressed.  The key
   must be a valid key with the prefix xbeK_*.  These keys are
   defined in APPEVENT.CH.
   
   GOTFOCUS < bGotFocus > is a code block that is evaluated when this
   object receives input focus.  < bGotFocus > := {|uNIL1,uNIL2,self|...}
   
   LOSTFOCUS < bLostFocus > is a code block that is evaluated when this
   object loses input focus.  < bLostFocus > := {|uNIL1,uNIL2,self|...}
   
   TABSTOP will cause the object (Xbase Part) to be set when using
   the Tab key.  Note: When logical groups are defined in a dialog
   using TABGROUP < nTabGroup >, TABSTOP is usually set to .T. (true)
   for the first dialog element in the group.  This allows the first
   dialog element of a group to be activated using the Tab key.
   
   NOTABSTOP will cause the object (Xbase Part) to be ignored when
   using the Tab key. This clause is needed only to override any
   default setting of TabStop by the DCGETOPTIONS [TABSTOP] command.
   
   TABGROUP < nTabGroup > allows objects (Xbase Parts) that are created
   immediately after one another in the GetList to be combined into
   logical groups. This allows the user to navigate within a dialog
   from group to group by pressing the Tab key.  Within a group of
   dialog elements navigation is performed using the cursor keys.
   
   Only constants defined in the XBP.CH file can be used as values
   for this instance variable.  The following table lists the
   available constants:
   
   #define constants for < nTabGroup >:
   
    Constant             Description
   
    XBP_NO_GROUP     *)  Dialog element does not belong to a group
    XBP_BEGIN_GROUP      Dialog element is the first in a group
                         (this begins the definition of the group)
    XBP_WITHIN_GROUP     Dialog element is within a group
    XBP_END_GROUP        Dialog element is the last in a group
                         (this ends the definition of the group)
   
   *) Default value
   
   GROUP < cGroup > is a "group" name (case-sensitive) to assign to
   this GetList object.  Assignment to a group makes it possible to
   perform operations only on GetList items which are members of a
   specified group, using functions such as DC_GetRefresh() or
   DC_ReadGui().
   VISIBLE determines whether the object is visible immediately after
   the call to the method :create() . By default the object follows
   the VISIBLE clause of the DCGETOPTIONS command.  Use the
   INVISIBLE clause to override the VISIBLE clause of DCGETOPTIONS.
   
   EXITKEY < nExitKey > defines a key to be used to move focus from
   the MULTILINE object to the next GET or MULTILINE object in the
   GetList.
   
   MAXLINES < nMaxLines > is the maximum number of lines which may be
   entered.  If the MESSAGE < bcMaxLinesMessage > clause is used, then
   the message will also be displayed when the number of lines is
   exceeded.  If the message is a string, then a message box will
   display the contents of the string.  If the message is a code
   block, it will be evaluated to display any custom message window.
   
   LINELENGTH < nLineLength > is the maximum number of characters allowed
   on a line. If the MESSAGE < bcLineLengthMessage > clause is used, then
   the message will also be displayed when a line exceeds the
   designated length. If the message is a string, then a message box
   will display the contents of the string.  If the message is a code
   block, it will be evaluated to display any custom message window.
   
   MAXCHARS < nMaxChars > is the maximum number of characters which may
   be entered.  If the MESSAGE < bcMaxCharsMessage > clause is used, then
   the message will also be displayed when the number of characters
   is exceeded.  If the message is a string, then a message box will
   display the contents of the string.  If the message is a code
   block, it will be evaluated to display any custom message window.
   
   NAME < cVarName > is the variable name to assign to the GET
   object (for HTML based applications.)
   

Description:

    The command @..DCMULTILINE creates a new multi-line edit
    definition and adds it to the array named GETLIST which
    is later processed by the DC_Read*() functions or by the
    DCREAD * commands.  The GETLIST array must be first declared and
    initialized to the value of {}.
   
    The command DCREAD GUI creates the DC_Xbp*() objects and
    activates the edit mode for all definitions found in the
    GetList array.
   
    The command DCREAD HTML creates the DC_Html*() objects and
    writes the HTML source code.
   
    A Getlist object remains stored as long as it is referenced
    in an array or by a variable.  The commands CLEAR and
    CLEAR GETS assign an empty array to the GetList variable.
    This also occurs after the completion of the DCREAD command
    if it is called without the SAVE option, causing all Get
    objects referenced by the GetList array to be released.
   
    @..DCMULTILINE objects can be combined with any objects that
    that use the DCDIALOG system, such as @..DCSAY..GET,
    @..DCRADIO, @..DCBUTTON, @..DCCHECKBOX or @..DCTABPAGE.
   

Notes:

    Clauses marked by an asterisk ( * ) are not supported by
    DCREAD HTML or DC_ReadHtml().
   
    ------------------
   
    GUI applications:
   
    The multiline object created by @ DCDIALOG is an object of the
    DC_XbpMLE() class which inherits from the XbpMle() class,
    therefore it can be manipulated with any iVar or method
    supported by XbpMLE().
   
    ------------------
   
    HTML applications:
   
    The multiline object created by @ DCDIALOG is an object of the
    DC_HtmlMLE() class.
   

Examples:

   -- Example 1 (GUI) --
   
   #include "dcdialog.ch"
   
   PROCEDURE Xtest()
   
   LOCAL GetList := {}, cMemo, lOk
   
   USE COLLECT NEW SHARED
   
   cMemo := COLLECT->memo
   
   @ 0,0 DCMULTILINE cMemo FONT "10.Courier" SIZE 80,10
   
   DCREAD GUI ;
      FIT ;
      ADDBUTTONS TO lOk
   
   IF lOk .AND. DC_RecLock()
     REPL COLLECT->memo WITH cMemo
     UNLOCK
   ENDIF
   
   CLOSE collect
   
   RETURN
   
   -- Example 2 (HTML) --
   
   #include "dcdialog.ch"
   #include "dchtml.ch"
   
   PROCEDURE Xtest_2()
   
   LOCAL i, GetList[0], oForm, oHtml, oParent, cHtml, oMainHtml, ;
         aGetListItem, bBlock, oTable, cComment1, cComment2
   
   DCFORM OBJECT oForm
   DCTABLE OBJECT oTable PARENT oForm ROWS 2 COLUMNS 1 WIDTH '200'
   
   cComment1 := 'This is memo 1'
   cComment2 := 'This is memo 2'
   
   @ 1,1 DCMULTILINE cComment1 PARENT oTable SIZE 30,10 NAME 'Memo1'
   @ 2,1 DCMULTILINE cComment2 PARENT oTable SIZE 30,10 NAME 'Memo2'
   
   DCREAD HTML TO cHtml
   
   MemoWrit('TEST.HTM',cHtml)
   
   RETURN
   

Source/Library:

  DCDIALOG.CH

See Also:

   @ DCKLMLE
   dc_htmlmle()



@ DCOBJECT

Define an existing object for displaying with GUI reader

Syntax:

   @ < nRow >,< nCol > DCOBJECT < oObject > ;
       [PARENT < oParent >] ;
       [PARENTID < cParentId >] ;
       [MESSAGE < bcMsg > [INTO < oMsgBox >]] ;
       [HIDE < bHide >] ;
       [WHEN < bWhen >] ;
       [EDITPROTECT < bProtect >] ;
       [VALID < bValid >] ;
       [HELPCODE < cHelpCode >] ;
       [TOOLTIP < bcToolTip >] ;
       [CURSOR < naCursor >] ;
       [CARGO < xCargo >] ;
       [PREEVAL < bPreEval >] ;
       [EVAL < bEval] ;
       [PIXEL] ;
       [RELATIVE < oRel >] ;
       [ID < cId >] ;
       [TITLE < cTitle >] ;
       [ACCELKEY < anAccel >] ;
       [GOTFOCUS < bGotFocus >] ;
       [LOSTFOCUS < bLostFocus >] ;
       [TABSTOP] ;
       [NOTABSTOP] ;
       [TABGROUP < nTabGroup >] ;
       [GROUP < cGroup >]
   

Arguments:

   < nRow >, < nCol > are the coordinates on the screen.
   Coordinates are always relative to position 0,0 ie. Top,Left
   of the parent object, unless the RELATIVE < oRel > argument is
   used.  If no parent is assigned, then the parent is the Dialog
   box.  IF the PIXEL option is set to .TRUE. in DCGETOPTIONS,
   then the numbers are in pixels otherwise they are in standard
   text-based coordinates.  You can also force the pixel mode by
   including PIXEL as a command argument.
   < nRow > is stored in element nGETLIST_STARTROW.
   < nCol > is stored in element nGETLIST_STARTCOL.
   
   RELATIVE < oRel > is an optional object in the Getlist which
   determines the start coordinates of this object.  If this
   option is used, then the < nSrow >, < nSCol > coordinates are
   relative to the starting coordinates of < oRel > rather than
   the parent object.
   
   PARENT < oParent > is the name of the variable that was assigned to
   the parent object for this object.  Only use this clause if you
   are placing this object onto another dialogue object.  If this
   clause is not used, then the object will be displayed in the
   top-level dialogue screen or in the object set with the
   DCSETPARENT command. This is converted to a code-block by
   the function DC_GetAnchorCB() and is stored in element
   oGETLIST_PARENT.
   
   PARENTID < cParentID > may be used in lieu of the PARENT < oParent >
   clause.  This identifies the ID of the parent instead of the
   parent's object variable name.
   
   MESSAGE < cMsg > is the message you want to display in the
   message area of the dialogue screen defined by the DCMESSAGEBOX
   command when the object is in focus.  Optionally, INTO < oMsgBox >
   will designate which message box to display the message into.
   If the INTO clause is not used, then the last message box in the
   GetList is the default. < oMsgBox > may also be any object that
   supports the :setCaption() method.  If < bcMsg > is a code-block,
   it must return a character string.
   
   WHEN < bWhen > is a code block that is evaluated in the event loop.
   This code block must return a logical value.  If the value
   returned is .FALSE. then the object will be disabled and grayed.
   If the value returned is .TRUE. then the object will be enabled.
   The code block is stored in element bGETLIST_WHEN.
   The object is passed as a parameter to the code block.
   
   HIDE < bHide > is a code block that is evaluated in the event loop.
   This code block must return a logical value.  If the value
   returned is .TRUE. then the object will be hidden from view.  If
   the value returned is .FALSE. then the object will be displayed.
   The object is passed as a parameter to the code block.
   
   EDITPROTECT < bProtect > is an optional condition tested during the
   execution of the GUI gets by the DCREAD GUI command, before the
   object receives input focus (before it is activated). When the
   condition returns the value .T. (true), the object receives the
   input focus.  Otherwise, it is skipped. < bProtect > is a code
   block that must return a logical value when evaluated. The code
   block is evaluated prior to the object receiving input focus.
   This clause behaves similar to the WHEN clause with the exception
   that the object is not disabled (grayed out).  The object is
   passed as a parameter to the code block.
   
   VALID < bValid > is an optional condition tested during the
   navigation through the dialog objects when an object loses
   focus (before it is deactivated).  If the condition returns the
   value .T. (true), the object loses the input focus, otherwise,
   it remains active. < bValid > is a code block that must return a
   logical value when it is evaluated.  The object is passed to the
   code block prior to the object losing input focus.  The
   code block is stored in element bGETLIST_VALID.
   
   HELPCODE < cHelp > is a character string that is passed to the
   DC_HelpF1() function if F1 is pressed or the HELP button
   is clicked when this object has focus.  This HELPCODE allows
   the Help system to override the passing of the Procedure and
   Varname for more specific context-help.  The help code is
   stored in element cGETLIST_HELPCODE.
   
   TOOLTIP < bcToolTip > is a character string which will display
   as a "Tool Tip" next to the object when the cursor is passed
   over the object. A semi-colon within the text indicates a new
   line.  If < bcToolTip > is a code-block, it must return a character
   string.  NOTE: The Tooltip painting method is run in another
   thread, therefore the codeblock should not run code that points
   to the current work area.  It may however, contain local, public
   or private variables.
   
   CURSOR < naCursor > may be either a numeric value or an array of
   3 elements which defines an optional mouse pointer to use for
   this object.  System mouse pointers start with
   XBPWINDOW_POINTERTYPE_ and are defined in XPB.CH.  The default
   pointer is XBPWINDOW_POINTERTYPE_POINTER.  < naCursor > may be a
   numeric resource ID that points to a Bit-Map that has been
   compiled with the resource compiler and linked to the .EXE.
   < naCursor > may be a 3-element array described as follows:
   
     Element  Type  Description
     -------  ---- ---------------------------------------------
       [1]      C   Optional name of .DLL containing the pointer
                    resource.
   
       [2]      N   The numeric resource ID of the pointer.  If
                    element 1 is a NIL, then this resource must be
                    linked into the .EXE.
   
       [3]      N   The type of resource as defined in XBP.CH.
   
   CARGO < xCargo > is any kind of data you wish to to add to the
   :cargo container for this object.  The cargo may be accessed
   at any time via the :cargo exported variable, however it will not
   be stored in the same manner it is entered.  The :cargo container
   of DCDIALOG objects is an array of at least three elements:
   
    [1] - A numeric value that is a pointer to the Getlist array
          for this object.
   
    [2] - A pointer to the GetList array.
   
    [3] - The value of < xCargo >.
   
    [4] and up - optional values added by the GUI reader.
   
   < xCargo > is stored in element xGETLIST_CARGO.
   
   ID < cId > is a unique identifier for this object.  This ID is used
   with functions like DC_GETORIGUPDATED() to determine the status
   of a get object.
   
   TITLE < cTitle > is a title to assign to this object.  The title
   is not displayed on the screen but is simply a description of the
   get object which is saved in the GetList.
   
   PREEVAL < bPreEval > is a code block to be evaluated by the GUI
   reader before the Xbase Parts object is created.  The object is
   passed to the code block.
   
   EVAL < bEval > is a code block to evaluate after the object is
   created.  The object is passed as a parameter to the code block.
   
   ACCELKEY < anAccel > is a numeric "hot-key" assignment that will set
   focus to the checkbox object when the hot-key is pressed.  The key
   must be a valid key with the prefix xbeK_*.  These keys are
   defined in APPEVENT.CH.  < anAccel > may also be an array of numeric
   values to assign more than one key to the object.
   
   GOTFOCUS < bGotFocus > is a code block that is evaluated when this
   object receives input focus.  < bGotFocus > := {|uNIL1,uNIL2,self|...}
   
   LOSTFOCUS < bLostFocus > is a code block that is evaluated when this
   object loses input focus.  < bLostFocus > := {|uNIL1,uNIL2,self|...}
   
   TABSTOP will cause the object (Xbase Part) to be set when using
   the Tab key.  Note: When logical groups are defined in a dialog
   using TABGROUP < nTabGroup >, TABSTOP is usually set to .T. (true)
   for the first dialog element in the group.  This allows the first
   dialog element of a group to be activated using the Tab key.
   
   NOTABSTOP will cause the object (Xbase Part) to be ignored when
   using the Tab key. This clause is needed only to override any
   default setting of TabStop by the DCGETOPTIONS [TABSTOP] command.
   
   TABGROUP < nTabGroup > allows objects (Xbase Parts) that are created
   immediately after one another in the GetList to be combined into
   logical groups. This allows the user to navigate within a dialog
   from group to group by pressing the Tab key.  Within a group of
   dialog elements navigation is performed using the cursor keys.
   
   Only constants defined in the XBP.CH file can be used as values
   for this instance variable.  The following table lists the
   available constants:
   
   #define constants for < nTabGroup >:
   
    Constant             Description
   
    XBP_NO_GROUP     *)  Dialog element does not belong to a group
    XBP_BEGIN_GROUP      Dialog element is the first in a group
                         (this begins the definition of the group)
    XBP_WITHIN_GROUP     Dialog element is within a group
    XBP_END_GROUP        Dialog element is the last in a group
                         (this ends the definition of the group)
   
   *) Default value
   
   GROUP < cGroup > is a "group" name (case-sensitive) to assign to
   this GetList object.  Assignment to a group makes it possible to
   perform operations only on GetList items which are members of a
   specified group, using functions such as DC_GetRefresh() or
   DC_ReadGui().
   

Description:

    The command DCOBJECT is used to create a reference to an already
    created object and adds it to the array named GETLIST which is
    later processed by the DC_READGUI() function or by the DCREAD GUI
    command.  The GETLIST array must be first declared and
    initialized to the value of {}.  The command DCREAD GUI activates
    the edit mode for all objects found in the GetList array.
    A Getlist object remains stored as long as it is referenced
    in an array or by a variable.  The commands CLEAR and
    CLEAR GETS assign an empty array to the GetList variable.
    This also occurs after the completion of the DCREAD command
    if it is called without the SAVE option, causing all Get
    objects referenced by the GetList array to be released.
   
    DCOBJECT is used add a reference to an "existing" object.  This
    command is used when there is a requirement to include an object
    in a dialog that has been already created by another routine.
   

Examples:

   #include "dcdialog.ch"
   
   FUNCTION CreateIndexDialog()
   
   LOCAL cIndexFile, lIsCDX, lDescend, lUnique, cIndexKey, cIndexFor,;
         cTagName, lNewIndex, GetList := {}, GetOptions, oStruDlg, lOk, ;
         oStatic
   
   oStruDlg := DC_DBSTRUW(1,5,9,75,.f.) // create browse window
                                        // that lists fields
   cIndexFile := SPACE(80)
   cIndexKey := SPACE(200)
   cIndexFor := SPACE(200)
   cTagName := SPACE(10)
   STOR .f. TO lIsCDX, lDescend, lUnique
   
   @ 0,7 DCSTATIC TYPE XBPSTATIC_TYPE_TEXT OBJECT oStatic SIZE 76,10.5
   
   @ 0,0 DCOBJECT oStruDlg PARENT oStatic EVAL {|o|o:show()}
   
   @ 11,7 DCSAY 'File Name' GET cIndexFile GETSIZE 50 ;
          VALID {||DC_ReadEmpty(cIndexFile)}
   
   @ 12,7 DCSAY 'Index Key' GET cIndexKey GETSIZE 50 ;
          VALID {||DC_ReadEmpty(cIndexKey)}
   
   @ 13,7 DCSAY 'Index FOR condition' GET cIndexFor GETSIZE 50 ;
          POPUP {|c|DC_Query(c)}
   
   @ 14,7 DCSAY 'Tag Name' GET cTagName PICT '@!'
   
   @ 16,7 DCCHECKBOX lUnique PROMPT 'Unique Index'
   @ 17,7 DCCHECKBOX lDescend PROMPT 'Descending Index'
   @ 18,7 DCCHECKBOX lIsCDX PROMPT 'Combined Index'
   
   DCGETOPTIONS SAYRIGHT SAYWIDTH 120
   DCREAD GUI FIT ADDBUTTONS TO lOk MODAL ;
      OPTIONS GetOptions
   
   RETURN  { cIndexFile, cIndexKey, cIndexFor, cTagName, ;
             lUnique, lDescend, lIsCDX }
   

Source/Library:

  DCDIALOG.CH

See Also:

   USER-DEFINED COMMANDS



@ DCPICKLIST

Create a PICKLIST dialog object for displaying with GUI reader

Syntax:

   @ < nRow >, < nCol > DCPICKLIST < aPick > LIST < aList > ;
       [DATALINK < bLink >]  ;
       [PARENT < oParent >] ;
       [OBJECT < oObject >] ;
       [COLOR < fgC > [, < bgC > ]] ;
       [FONT < bocFont >] ;
       [SIZE < nWidth > [, < nHeight >]] ;
       [CAPTION < cLeftCap > [,< cRightCap >]] ;
       [WHEN < bWhen >] ;
       [HIDE < bHide >] ;
       [PREEVAL < bPreEval >] ;
       [EVAL < bEval >] ;
       [RELATIVE < oRel >] ;
       [TOOLTIP < cToolTip >] ;
       [ID < cId >] ;
       [TITLE < cTitle >] ;
       [ACCELKEY < anAccel >] ;
       [GOTFOCUS < bGotFocus >] ;
       [LOSTFOCUS < bLostFocus >] ;
       [VISIBLE] ;
       [INVISIBLE] ;
       [GROUP < cGroup >] ;
       [IMMEDIATE]
   

Arguments:

   < nRow >, < nCol > are the coordinates on the screen.
   Coordinates are always relative to position 0,0 ie. Top,Left
   of the parent object, unless the RELATIVE < oRel > argument is
   used.  If no parent is assigned, then the parent is the Dialog
   box.  IF the PIXEL option is set to .TRUE. in DCGETOPTIONS,
   then the numbers are in pixels otherwise they are in standard
   text-based coordinates.  You can also force the pixel mode by
   including PIXEL as a command argument.
   
   < aPick > is a memory variable containing the array which will be
   created from the picked items.
   
   LIST < aList > is a memory variable containing a single-dimensional
   array of character strings.  This is the "Available Items"
   array.
   
   RELATIVE < oRel > is an optional object in the Getlist which
   determines the start coordinates of this object.  If this
   option is used, then the < nSrow >, < nSCol > coordinates are
   relative to the starting coordinates of < oRel > rather than
   the parent object.
   
   OBJECT < oObject > is the name of the variable to assign as a
   storage place for this object.
   
   DATALINK < bLink > is a code block that is evaluated when the
   user clicks on OK after selecting the list.
   
   PARENT < oParent > is the name of the variable that was assigned to
   the parent object for this object.  Only use this clause if you
   are placing this object onto another dialogue object. If this
   argument is not passed then the parent will be the object set
   with the DCSETPARENT command.
   
   COLOR < ncFGc >, < ncBGc > are foreground and background colors.
   They may be character strings representing valid text-based
   colors supported by SetColor() or they may be numeric constants
   which begin with either the prefix GRA_CLR_ or the prefix
   XBPSYSCLR_ as defined in GRA.CH or XBP.CH. If < bncFGc > is a
   code block is must return a 2-element array containing a
   foreground and background color.
   
   FONT < font > is the name of the font to use for both the
   directory and file dialog boxes. It may character string, a font
   object or a code block that returns a character string or a font
   object to later refresh with DC_GetRefresh().
   
   SIZE < nWidth >,< nHeight > is the width and height of the
   listbox.  If the PIXEL option is set to .TRUE. in DCGET
   OPTIONS, then the numbers are in pixels otherwise they are
   in standard text-based numbers.  The "Available Items" dialog
   component occupies 40% of the total width, the "Selected Items"
   dialog component occupies 40% of the total width and the select
   buttons occupy 20% of the total width.
   
   CAPTION < cLeftCap >, < cRightCap > are the captions in the left
   and right pick areas of the dialog respectively, ex "Available
   Fields" and "Selected Fields".
   
   PREEVAL < bPreEval > is a code block to be evaluated by the GUI
   reader before the Xbase Parts object is created.  The object is
   passed to the code block.
   
   EVAL < bEval > is a code block to be evaluated by the GUI reader
   after the dialog object is created.
   
   CARGO < xCargo > is any kind of data you wish to to add to the
   :cargo container for this object.  The cargo may be accessed
   at any time via the :cargo exported variable, however it will not
   be stored in the same manner it is entered.  The :cargo container
   of DCDIALOG objects is an array of at least three elements:
   
    [1] - A numeric value that is a pointer to the Getlist array
          for this object.
   
    [2] - A pointer to the GetList array.
   
    [3] - The value of < xCargo >.
   
    [4] and up - optional values added by the GUI reader.
   
   ID < cId > is a unique identifier for this object.  This ID is used
   with functions like DC_GETORIGUPDATED() to determine the status
   of a get object.
   
   TOOLTIP < cToolTip > is a character string which will display
   as a "Tool Tip" next to the object when the cursor is passed
   over the object.  If < bcToolTip > is a code-block, it must return
   a character string.  NOTE: The Tooltip painting method is run in
   another thread, therefore the codeblock should not run code that
   points to the current work area.  It may however, contain
   local, public or private variables.
   
   TITLE < cTitle > is a title to assign to this object.  The title
   is not displayed on the screen but is simply a description of the
   get object which is saved in the GetList.
   
   WHEN < bWhen > is a code block that is evaluated in the event loop.
   This code block must return a logical value.  If the value
   returned is .FALSE. then the object will be disabled and grayed.
   If the value returned is .TRUE. then the object will be enabled.
   The object is passed as a parameter to the code block.
   
   HIDE < bHide > is a code block that is evaluated in the event loop.
   This code block must return a logical value.  If the value
   returned is .TRUE. then the object will be hidden from view.  If
   the value returned is .FALSE. then the object will be displayed.
   The object is passed as a parameter to the code block.
   
   ACCELKEY < anAccel > is a numeric "hot-key" assignment that will set
   focus to the checkbox object when the hot-key is pressed.  The key
   must be a valid key with the prefix xbeK_*.  These keys are
   defined in APPEVENT.CH.  < anAccel > may also be an array of numeric
   values to assign more than one key to the object.
   
   GOTFOCUS < bGotFocus > is a code block that is evaluated when this
   object receives input focus.  < bGotFocus > := {|uNIL1,uNIL2,self|...}
   
   LOSTFOCUS < bLostFocus > is a code block that is evaluated when this
   object loses input focus.  < bLostFocus > := {|uNIL1,uNIL2,self|...}
   
   TABSTOP will cause the object (Xbase Part) to be set when using
   the Tab key.  Note: When logical groups are defined in a dialog
   using TABGROUP < nTabGroup >, TABSTOP is usually set to .T. (true)
   for the first dialog element in the group.  This allows the first
   dialog element of a group to be activated using the Tab key.
   
   NOTABSTOP will cause the object (Xbase Part) to be ignored when
   using the Tab key. This clause is needed only to override any
   default setting of TabStop by the DCGETOPTIONS [TABSTOP] command.
   
   TABGROUP < nTabGroup > allows objects (Xbase Parts) that are created
   immediately after one another in the GetList to be combined into
   logical groups. This allows the user to navigate within a dialog
   from group to group by pressing the Tab key.  Within a group of
   dialog elements navigation is performed using the cursor keys.
   
   Only constants defined in the XBP.CH file can be used as values
   for this instance variable.  The following table lists the
   available constants:
   
   #define constants for < nTabGroup >:
   
    Constant             Description
   
    XBP_NO_GROUP     *)  Dialog element does not belong to a group
    XBP_BEGIN_GROUP      Dialog element is the first in a group
                         (this begins the definition of the group)
    XBP_WITHIN_GROUP     Dialog element is within a group
    XBP_END_GROUP        Dialog element is the last in a group
                         (this ends the definition of the group)
   
   *) Default value
   
   GROUP < cGroup > is a "group" name (case-sensitive) to assign to
   this GetList object.  Assignment to a group makes it possible to
   perform operations only on GetList items which are members of a
   specified group, using functions such as DC_GetRefresh() or
   DC_ReadGui().
   
   VISIBLE determines whether the object is visible immediately after
   the call to the method :create() . By default the object follows
   the VISIBLE clause of the DCGETOPTIONS command.  Use the
   INVISIBLE clause to override the VISIBLE clause of DCGETOPTIONS.
   
   IMMEDIATE forces the update of the array < aPick > every time an
   item is added rather than requiring a click of the OK button.
   

Description:

    The command @..DCPICKLIST creates a new PickList object
    and adds the object to the array named GETLIST which is later
    processed by the DC_READGUI() function or by the DCREAD GUI
    command.  The GETLIST array must be first declared and
    initialized to the value of {}.  The command DCREAD GUI activates
    the edit mode for all objects found in the GetList array.
    A Getlist object remains stored as long as it is referenced
    in an array or by a variable.  The commands CLEAR and
    CLEAR GETS assign an empty array to the GetList variable.
    This also occurs after the completion of the DCREAD command
    if it is called without the SAVE option, causing all Get
    objects referenced by the GetList array to be released.
   
    DCPICKLIST is a dialog that consists of two parts, an
    "Available Items" component and a "Selected Items" component.
    The "Available Items"  area contains a list of items which
    are transferred to the "Selected Items" area when the user
    selects an item an transfers the item with a click on the 'þ>'
    or 'þ>þ>' button.  "Selected Items" can also be transferred back
    to the "Avaialable Items" area by clicking on the '<þ' button
    or the '<þ<þ' button.
   
    @..DCPICKLIST objects can be combined with any objects that
    that use the DCDIALOG system, such as @..DCSAY..GET,
    @..DCRADIO, @..DCPUSHBUTTON, @..DCCHECKBOX or @..DCTABPAGE.
   

Examples:

   /*
   This example will display a list of fields in the
   "Available Fields" selection, allow the operator to
   select a set of fields, then display a Browse of the
   database for the fields selected.
   */
   
   
   #include "dcpick.ch"
   
   
   PROCEDURE XTest( )
   
   LOCAL GetList := {}, GetOptions, cAlias, aListField, ;
         aPickField, oBrowse, oDialog
   
   USE COLLECT NEW SHARED
   
   cAlias := 'COLLECT'
   aListField := Array(FCount())
   AFields(aListField)
   
   @ 2,3 DCPICKLIST aPickField LIST aListField ;
      CAPTION "Available Fields", "Selected Fields" ;
      SIZE 35,12 ;
      DATALINK {||BrowseCollect(cAlias,oDialog,@oBrowse,@aPickField)}
   
   DCGETOPTIONS ;
      WINDOW HEIGHT 360 ;
      WINDOW WIDTH 600
   
   DCREAD GUI ;
      TITLE "Picklist Demo" ;
      OPTIONS GetOptions ;
      PARENT @oDialog ;
      ADDBUTTONS
   
   RETURN
   
   /* --------------------- */
   
   STATIC FUNCTION BrowseCollect ( cAlias, oDialog, oBrowse, aPickField )
   
   LOCAL GetList := {}, i, aChildList
   
   IF Valtype(oBrowse) = 'O'
     aChildList := oBrowse:ChildList()
     FOR i := 1 TO Len(aChildList)
       aChildList[i]:Destroy()
     NEXT
     oBrowse:Destroy()
   ENDIF
   
   oBrowse := nil
   
   IF Empty(aPickField)
     RETURN nil
   ENDIF
   
   @ 2,40 DCBROWSE oBrowse DATA cAlias SIZE 39,12 PARENT oDialog:drawingArea
   
   SELECT collect
   FOR i := 1 TO Len(aPickField)
     DCBROWSECOL DATA &('{||COLLECT->'+aPickField[i]+'}') ;
       HEADER aPickField[i] PARENT oBrowse
   NEXT
   
   DCREAD GUI ;
      PARENT oDialog ;
      EXIT
   
   oBrowse:hide()
   oBrowse:show()
   
   RETURN nil
   

Source/Library:

  DCPICK.CH

See Also:

   @ DCLISTBOX
   dc_vartolistbox()
   dc_varfromlistbox()



@ DCPRINT BITMAP

Send BitMap to printer using @..SAY style printing

Syntax:

   @ < nSrow >, < nScol > [, < nErow >, < nEcol > ] DCPRINT BITMAP < ncRes > ;
         [PRINTER < oPrinter >] ;
         [AUTOSCALE] ;
         [CENTER] ;
         [SCALE] ;
         [PIXEL] ;
         [WHEN < bWhen >]
   

Arguments:

   < nSrow >, < nScol >, < nErow >, < nEcol > are the page coordinates
   to print the bitmap.  These are row/column text coordinates
   unless the PIXEL argument was used with the DCPRINT ON
   command, then they are pixel coordinates.  If < nErow > and < nECol >
   are not used then the end row and end column will be calculated
   from the size of the bitmap times the scale.
   
   < ncRes > is the name of a .BMP file, a .JPG file or the number
   of a bitmap resource that has been linked to the application.
   
   PRINTER < oPrinter > is the printer object returned by the
   DCPRINT ON command or the DC_Printer() class.  If this clause
   is not used then the printer object referenced by
   DC_PrinterObject() is the default.
   
   AUTOSCALE will automatically scale the bitmap image to the
   coordinates to maintain the aspect ratio.
   
   CENTER will center the bitmap within the coordinates.
   
   SCALE is a numerical value used to scale the size of the bitmap.
   The default is 1.  This clause is ignored if all four coordinates
   are used.  For example, to print a bitmap two times larger than
   the original size use SCALE 2.
   
   PIXEL will cause coordinates NOT to be text-based.  Normally,
   coordinates are text-based and are scaled to the coordinate
   system defined by the UNITS command.  The scaling is based on
   the SIZE clause.
   
   WHEN < bWhen > is a condition codeblock that is evaluated before
   the command is executed during previewing and printing from
   preview.  The DC_Printer() object is passed to the code block.
   The code block must return a logical .TRUE. to enable the command.
   

Description:

    @..DCPRINT BITMAP prints a Bitmap on the page using
    @..SAY style coordinates.  The BitMap may be a resources that
    has been linked into the program .EXE, a .BMP file or a .JPG
    file.  Support for .JPG (JPEG) files requires that the
    DCLIPIMG.DLL and _ISOURCE.DLL files are found in the path.
   

Examples:

   #include "dcprint.ch"
   
   PROCEDURE XTest( lPreview )
   
   LOCAL aFor_Sale, oPrinter, i, nLineCount, cMemo, cMemoLine, cScrn
   
   lPreview := IIF( Valtype(lPreview)='L',lPreview,.t.)
   
   USE collect NEW
   
   aFor_Sale := { 'No','Yes','Not Sure' }
   
   BEGIN SEQUENCE
   
   IF lPreview
     DCPRINT ON SIZE 60,100 TO oPrinter FONT '12.Courier' PREVIEW
   ELSE
     DCPRINT ON SIZE 60,100 TO oPrinter FONT '12.Courier'
   ENDIF
   
   IF Valtype(oPrinter) # 'O' .OR. !oPrinter:lActive
     BREAK
   ENDIF
   
   DC_Gui(.t.)
   
   IF !lPreview
     cScrn := DC_WaitOn()
   ENDIF
   
   DO WHILE !Eof()
   
     @ 2,0,20,45 DCPRINT BITMAP COLLECT->bitmap1
     @ 2,50,20,95 DCPRINT BITMAP COLLECT->bitmap2
   
     DCPRINT FONT '12.Courier'
   
     @ 23, 5, 37, 90 DCPRINT BOX
   
     @ 24,10 DCPRINT SAY '    Description:'
     @ 25,10 DCPRINT SAY '           Type:'
     @ 26,10 DCPRINT SAY '       Sub-Type:'
     @ 27,10 DCPRINT SAY '      Condition:'
     @ 28,10 DCPRINT SAY '       Location:'
     @ 29,10 DCPRINT SAY '      For Sale?:'
     @ 30,10 DCPRINT SAY '  Original Date:'
     @ 31,10 DCPRINT SAY '  Acquired Date:'
     @ 32,10 DCPRINT SAY ' Original Price:'
     @ 33,10 DCPRINT SAY 'Appraised Value:'
     @ 34,10 DCPRINT SAY '       Comments:'
     @ 35,10 DCPRINT SAY '      Bit Map 1:'
     @ 36,10 DCPRINT SAY '      Bit Map 2:'
   
     DCPRINT FONT '14.Terminal'
   
     @ 24,32 DCPRINT SAY COLLECT->descrip
     @ 25,32 DCPRINT SAY COLLECT->type
     @ 26,32 DCPRINT SAY COLLECT->sub_type
     @ 27,32 DCPRINT SAY COLLECT->condition
     @ 28,32 DCPRINT SAY COLLECT->location
     @ 29,32 DCPRINT SAY aFor_Sale[COLLECT->for_sale+1]
     @ 30,32 DCPRINT SAY COLLECT->date_orig
     @ 31,32 DCPRINT SAY COLLECT->date_acqu
     @ 32,32 DCPRINT SAY COLLECT->orig_price
     @ 33,32 DCPRINT SAY COLLECT->appr_value
     @ 34,32 DCPRINT SAY COLLECT->comments
     @ 35,32 DCPRINT SAY COLLECT->bitmap1
     @ 36,32 DCPRINT SAY COLLECT->bitmap2
   
     DCPRINT FONT '12.Arial'
   
     cMemo := Alltrim(COLLECT->memo)
     nLineCount := MLCount(cMemo)
     FOR i := 1 TO nLineCount - 1
       cMemoLine := MemoLine( cMemo, nil, i )
       IF Empty(cMemoLine)
         EXIT
       ENDIF
       @ 40+i,10 DCPRINT SAY cMemoLine
     NEXT
   
     DCPRINT EJECT
   
     SKIP
   
   ENDDO
   
   IF !lPreview
     DC_Impl(cScrn)
   ENDIF
   
   END SEQUENCE
   
   DCPRINT OFF
   
   RETURN
   

Source/Library:

  DCPRINT.CH

See Also:

   dc_printer()



@ DCPRINT BOX

Send Box to printer using @..SAY style printing

Syntax:

   @ < nSrow >, < nScol >, < nErow >, < nEcol > DCPRINT BOX ;
     [FILL < nFill >] ;
     [HRADIUS < nHRadius >] ;
     [VRADIUS < nVRadius >] ;
     [PRINTER < oPrinter >] ;
     [AREAATTR < aAreaAttr >] ;
     [LINEATTR < aLineAttr >] ;
     [LINEWIDTH < nLineWidth >] ;
     [NOSCALE] [PIXEL] ;
     [WHEN < bWhen >]
   

Arguments:

   < nSrow >, < nScol >, < nErow >, < nEcol > are the page coordinates to
   print the box.  These are row/column text coordinates unless
   the PIXEL argument was used with the DCPRINT ON command,
   then they are pixel coordinates.
   
   FILL < nFill > specifies whether the rectangle is drawn as an
   outline or is filled.  The following table shows the #define
   constants from the GRA.CH file to use for < nFill > :
   
    Constant         Description
   
    GRA_FILL         Fills rectangle
    GRA_OUTLINE (*)  Only draws rectangle border
    GRA_OUTLINEFILL  Draws rectangle border and fills
   
    (*) Default value
   
    The parameters < nHRad > and < nVRad > determine how much to round
    the corners of the rectangle.  Both are positive integers
    which, taken together, determine the distance (radius of
    curvature) from a corner to the middle o fthe rectangle. This
    distance provides the measure from which the corners are
    rounded. < nHRad > indicates the horizontal distance.  When
    < nHRad > is equal to < nVRad > , the corners are rounded by
    a 90 degree arc.
   
    PRINTER < oPrinter > is the printer object returned by the
    DCPRINT ON command or the DC_Printer() class.  If this clause
    is not used then the printer object referenced by
    DC_PrinterObject() is the default.
   
   AREAATTR < aAreaAttr > is an array of area attributes.
   
   < aAreaAttr > := Array( GRA_AA_COUNT )
   
   < aAreaAttr > is an array whose elements contain the attributes for
   areas later drawn by @..DCPRINT BOX.
   
    #define constants of the attribute array for areas
   
    Array element     #define | value  Default value
   
    GRA_AA_COLOR      GRA_CLR_*        GRA_CLR_NEUTRAL
    GRA_AA_BACKCOLOR  GRA_CLR_*        GRA_CLR_BACKGROUND
    GRA_AA_MIXMODE    GRA_FGMIX_*      GRA_FGMIX_OVERPAINT
    GRA_AA_BGMIXMODE  GRA_BGMIX_*      GRA_BGMIX_LEAVEALONE
    GRA_AA_SYMBOL     GRA_SYM_*        GRA_SYM_SOLID
   
   
   LINEATTR < aLineAttr > is an array of line attributes.
   
   < aLineAttr > := Array( GRA_AL_COUNT )
   
   < aLineAttr > is an array whose elements contain the attributes for
   lines later drawn by @..DCPRINT BOX.
   
    #define constants of the attribute array for lines
   
    Array element     #define | value  Default value
   
    GRA_AL_COLOR      GRA_CLR_*        GRA_CLR_NEUTRAL
    GRA_AL_BACKCOLOR  GRA_CLR_*        GRA_CLR_BACKGROUND
    GRA_AL_MIXMODE    GRA_FGMIX_*      GRA_FGMIX_OVERPAINT
    GRA_AL_BGMIXMODE  GRA_BGMIX_*      GRA_BGMIX_LEAVEALONE
    GRA_AL_SYMBOL     GRA_SYM_*        GRA_SYM_SOLID
   
   HRADIUS < nHRadius > indicates the horizontal distance. When
   < nHRadius > is equal to < nVRadius > , the corners are rounded by
   a 90o arc.
   
   VRADIUS < nVRadius > determines the vertical curvature radius for
   rounding the corners. For rounded corners, both parameters
   < nHRadius > and < nVRadius > must be greater than 0.
   
   LINEWIDTH < nLineWidth > is the thickness (in units) of the box
   perimeter.  The default is 1.
   
   The parameters < nHRadius > and < nVRadius > determine how much to
   round the corners of the rectangle. Both are positive integers
   which, taken together, determine the distance (radius of
   curvature) from a corner to the middle of the rectangle. This
   distance provides the measure from which the corners are
   rounded.
   
   NOSCALE or PIXEL will cause coordinates NOT to be text-based.
   Normally, coordinates are text-based and are scaled to the
   coordinate system defined by the UNITS command.  The scaling is
   based on the SIZE clause.
   
   WHEN < bWhen > is a condition codeblock that is evaluated before
   the command is executed during previewing and printing from
   preview.  The DC_Printer() object is passed to the code block.
   The code block must return a logical .TRUE. to enable the command.
   

Description:

    @..DCPRINT BOX prints a Box on the page using @..SAY
    style coordinates.
   

Examples:

   #include "dcprint.ch"
   
   PROCEDURE XTest( lPreview )
   
   LOCAL aFor_Sale, oPrinter, i, nLineCount, cMemo, cMemoLine, ;
         cScrn, aAttr
   
   lPreview := IIF( Valtype(lPreview)='L',lPreview,.t.)
   
   USE collect NEW
   
   aFor_Sale := { 'No','Yes','Not Sure' }
   
   BEGIN SEQUENCE
   
   IF lPreview
     DCPRINT ON SIZE 60,100 TO oPrinter FONT '12.Courier' PREVIEW
   ELSE
     DCPRINT ON SIZE 60,100 TO oPrinter FONT '12.Courier'
   ENDIF
   
   IF Valtype(oPrinter) # 'O' .OR. !oPrinter:lActive
     BREAK
   ENDIF
   
   DC_Gui(.t.)
   
   IF !lPreview
     cScrn := DC_WaitOn()
   ENDIF
   
   DO WHILE !Eof()
   
     @ 2,0,20,45 DCPRINT BITMAP COLLECT->bitmap1
     @ 2,50,20,95 DCPRINT BITMAP COLLECT->bitmap2
   
     DCPRINT FONT '12.Courier'
   
     aAttr := Array(GRA_AL_COUNT)
     aAttr[GRA_AL_COLOR] := GRA_CLR_RED
     @ 23, 5, 37, 90 DCPRINT BOX ATTRIBUTE aAttr
   
     @ 24,10 DCPRINT SAY '    Description:'
     @ 25,10 DCPRINT SAY '           Type:'
     @ 26,10 DCPRINT SAY '       Sub-Type:'
     @ 27,10 DCPRINT SAY '      Condition:'
     @ 28,10 DCPRINT SAY '       Location:'
     @ 29,10 DCPRINT SAY '      For Sale?:'
     @ 30,10 DCPRINT SAY '  Original Date:'
     @ 31,10 DCPRINT SAY '  Acquired Date:'
     @ 32,10 DCPRINT SAY ' Original Price:'
     @ 33,10 DCPRINT SAY 'Appraised Value:'
     @ 34,10 DCPRINT SAY '       Comments:'
     @ 35,10 DCPRINT SAY '      Bit Map 1:'
     @ 36,10 DCPRINT SAY '      Bit Map 2:'
   
     DCPRINT FONT '14.Terminal'
   
     @ 24,32 DCPRINT SAY COLLECT->descrip
     @ 25,32 DCPRINT SAY COLLECT->type
     @ 26,32 DCPRINT SAY COLLECT->sub_type
     @ 27,32 DCPRINT SAY COLLECT->condition
     @ 28,32 DCPRINT SAY COLLECT->location
     @ 29,32 DCPRINT SAY aFor_Sale[COLLECT->for_sale+1]
     @ 30,32 DCPRINT SAY COLLECT->date_orig
     @ 31,32 DCPRINT SAY COLLECT->date_acqu
     @ 32,32 DCPRINT SAY COLLECT->orig_price
     @ 33,32 DCPRINT SAY COLLECT->appr_value
     @ 34,32 DCPRINT SAY COLLECT->comments
     @ 35,32 DCPRINT SAY COLLECT->bitmap1
     @ 36,32 DCPRINT SAY COLLECT->bitmap2
   
     DCPRINT FONT '12.Arial'
   
     cMemo := Alltrim(COLLECT->memo)
     nLineCount := MLCount(cMemo)
     FOR i := 1 TO nLineCount - 1
       cMemoLine := MemoLine( cMemo, nil, i )
       IF Empty(cMemoLine)
         EXIT
       ENDIF
       @ 40+i,10 DCPRINT SAY cMemoLine
     NEXT
   
     DCPRINT EJECT
   
     SKIP
   
   ENDDO
   
   IF !lPreview
     DC_Impl(cScrn)
   ENDIF
   
   END SEQUENCE
   
   DCPRINT OFF
   
   RETURN
   

Source/Library:

  DCPRINT.CH

See Also:

   dc_printer()



@ DCPRINT LINE

Send Line to printer using @..SAY style printing

Syntax:

   @ < nSrow >, < nScol >, < nErow >, < nEcol > DCPRINT LINE ;
     [ATTRIBUTE < aAttr >] ;
     [NOSCALE] [PIXEL] ;
     [WHEN < bWhen >]
   

Arguments:

   < nSrow >, < nScol >, < nErow >, < nEcol > are the page coordinates to
   print the box.  These are row/column text coordinates unless
   the PIXEL argument was used with the DCPRINT ON command,
   then they are pixel coordinates.
   
   PRINTER < oPrinter > is the printer object returned by the
   DCPRINT ON command or the DC_Printer() class.  If this clause
   is not used then the printer object referenced by
   DC_PrinterObject() is the default.
   
   ATTRIBUTE < aAttr > is an array of attributes.
   
    < aAttr > := Array( GRA_AL_COUNT )
   
    < aAttr > is an array whose elements contain the attributes for
    lines drawn by graphic functions.
   
    #define constants of the attribute array for lines. These
    con stants are defined in GRA.CH.
   
    Array element   #define group    Default value
   
    GRA_AL_COLOR    GRA_CLR_*        GRA_CLR_NEUTRAL
    GRA_AL_MIXMODE  GRA_FGMIX_*      GRA_FGMIX_OVERPAINT
    GRA_AL_WIDTH    GRA_LINEWIDTH_*  GRA_LINEWIDTH_NORMAL
    GRA_AL_TYPE     GRA_LINETYPE_*   GRA_LINETYPE_SOLID
   
   
   NOSCALE or PIXEL will cause coordinates NOT to be text-based.
   Normally, coordinates are text-based and are scaled to the
   coordinate system defined by the UNITS command.  The scaling is
   based on the SIZE clause.
   
   WHEN < bWhen > is a condition codeblock that is evaluated before
   the command is executed during previewing and printing from
   preview.  The DC_Printer() object is passed to the code block.
   The code block must return a logical .TRUE. to enable the command.
   

Description:

    @..DCPRINT LINE prints a Line on the page using @..SAY
    style coordinates.
   

Examples:

   #include "dcprint.ch"
   
   PROCEDURE XTest( lPreview )
   
   LOCAL nRow, nSaveRec, cScrn, aFor_Sale, cFontName, oPrinter, i, nStartRow
   
   USE collect
   nSaveRec := RecNo()
   GO TOP
   
   aFor_Sale := { 'No','Yes','Not Sure' }
   
   BEGIN SEQUENCE
   
   IF lPreview
     DCPRINT ON SIZE 50,98 FONT '9.Terminal' TO oPrinter PREVIEW
   ELSE
     DCPRINT ON SIZE 50,98 FONT '9.Terminal' TO oPrinter
   ENDIF
   
   IF Valtype(oPrinter) # 'O' .OR. !oPrinter:lActive
     BREAK
   ENDIF
   
   cFontName := oPrinter:GetFontCompoundName()
   
   IF !lPreview
     cScrn := DC_WaitOn('Printing..')
   ENDIF
   
   FOR i := 1 TO oPrinter:nCopies
   
     GO TOP
     nRow := 3
     oPrinter:nPage := 1
   
     DO WHILE !Eof() .AND. DC_PrinterOk()
   
       IF nRow <= 3
   
         DCPRINT FONT '14.Arial.Bold'
   
         @ nRow-1, 5, nRow+1, 90 DCPRINT BOX
   
         @ nRow,10 DCPRINT SAY 'My Personal Collection Inventory'
         @ nRow,50 DCPRINT SAY 'Page ' + Alltrim(Str(oPrinter:nPage))
         @ nRow,70 DCPRINT SAY Date()
   
         nRow += 3
         nStartRow := nRow
         @ nRow+.5, 4, nRow+.5, 94 DCPRINT LINE
   
         DCPRINT FONT '12.Arial.Bold'
   
         @ nRow+.5,5  DCPRINT SAY 'Description'
         @ nRow+.5,40 DCPRINT SAY 'Type'
         @ nRow+.5,55 DCPRINT SAY 'Sub-Type'
         @ nRow+.5,70 DCPRINT SAY 'Cond'
         @ nRow+.5,76 DCPRINT SAY 'For Sale?'
         @ nRow+.5,87 DCPRINT SAY 'Value'
         nRow += 2
   
         DCPRINT FONT cFontName
   
       ELSE
   
         @ nRow+.3, 4, nRow+.3, 94 DCPRINT LINE
   
         @ nRow,5  DCPRINT SAY COLLECT->descrip
         @ nRow,40 DCPRINT SAY COLLECT->type
         @ nRow,55 DCPRINT SAY COLLECT->sub_type
         @ nRow,70 DCPRINT SAY COLLECT->condition
         @ nRow,76 DCPRINT SAY aFor_Sale[COLLECT->for_sale+1]
         @ nRow,87 DCPRINT SAY Str(COLLECT->appr_value,7,2)
         nRow++
   
         SKIP
   
         IF nRow > ( oPrinter:nRows - 5 ) .OR. Eof()
           nRow += .5
           nStartRow += .5
           @ nRow, 4, nRow, 94 DCPRINT LINE
           @ nStartRow, 4, nRow, 4 DCPRINT LINE
           @ nStartRow,39, nRow,39 DCPRINT LINE
           @ nStartRow,54, nRow,54 DCPRINT LINE
           @ nStartRow,69, nRow,69 DCPRINT LINE
           @ nStartRow,75, nRow,75 DCPRINT LINE
           @ nStartRow,86, nRow,86 DCPRINT LINE
           @ nStartRow,94, nRow,94 DCPRINT LINE
                 DCPRINT EJECT
           nRow := 3
         ENDIF
   
       ENDIF
   
     ENDDO
   
   NEXT
   
   END SEQUENCE
   
   DCPRINT OFF
   
   IF !lPreview
     DC_Impl(cScrn)
   ENDIF
   
   GO nSaveRec
   RETURN nil
   

Source/Library:

  DCPRINT.CH

See Also:

   dc_printer()



@ DCPRINT MARKER

Send Marker to printer using @..SAY style printing

Syntax:

   @ < nSrow >, < nScol > DCPRINT MARKER ;
     [ATTRIBUTE < aAttr >] ;
     [NOSCALE] [PIXEL] ;
     [WHEN < bWhen >]
   

Arguments:

   < nSrow >, < nScol > are the page coordinates to print the marker.
   These are row/column text coordinates unless the PIXEL
   argument was used with the DCPRINT ON command, then they are
   pixel coordinates.
   
   PRINTER < oPrinter > is the printer object returned by the
   DCPRINT ON command or the DC_Printer() class.  If this clause
   is not used then the printer object referenced by
   DC_PrinterObject() is the default.
   
   ATTRIBUTE < aAttr > is an array of attributes.
   
   < aAttr > := Array( GRA_AM_COUNT )
   
   < aAttr > is an array whose elements contain the attributes for
   lines drawn by graphic functions.
   
   #define constants of the attribute array for lines. These
   constants are defined in GRA.CH.
   
   #define constants for the attribute array of GraMarker()
   
    Array element     #define | value     Default value
   
    GRA_AM_COLOR      GRA_CLR_*           GRA_CLR_NEUTRAL
    GRA_AM_BACKCOLOR  GRA_CLR_*           GRA_CLR_BACKGROUND
    GRA_AM_MIXMODE    GRA_FGMIX_*         GRA_FGMIX_OVERPAINT
    GRA_AM_BGMIXMODE  GRA_BGMIX_*         GRA_BGMIX_LEAVEALONE
    GRA_AM_SYMBOL     GRA_MARKSYM_*       GRA_MARKSYM_CROSS
    GRA_AM_BOX        { nXsize, nYsize }  Dependent on output device
   
   NOSCALE or PIXEL will cause coordinates NOT to be text-based.
   Normally, coordinates are text-based and are scaled to the
   coordinate system defined by the UNITS command.  The scaling is
   based on the SIZE clause.
   
   WHEN < bWhen > is a condition codeblock that is evaluated before
   the command is executed during previewing and printing from
   preview.  The DC_Printer() object is passed to the code block.
   The code block must return a logical .TRUE. to enable the command.
   

Description:

    @..DCPRINT MARKER prints a Marker on the page using @..SAY
    style coordinates.
   

Examples:

   #include "dcprint.ch"
   #include "gra.ch"
   
   PROCEDURE XTest( lPreview )
   
   // Displays all markers
   // The example displays all available markers and
   // their #define constants.
   
   LOCAL aAttr, aMarker, i
   
   IF lPreview
     DCPRINT ON PREVIEW
   ELSE
     DCPRINT ON
   ENDIF
                                       // #define constants as
   aMarker:= { ;                       // text and as  values
     { "GRA_MARKSYM_DEFAULT       ", GRA_MARKSYM_DEFAULT        }, ;
     { "GRA_MARKSYM_CROSS         ", GRA_MARKSYM_CROSS          }, ;
     { "GRA_MARKSYM_PLUS          ", GRA_MARKSYM_PLUS           }, ;
     { "GRA_MARKSYM_DIAMOND       ", GRA_MARKSYM_DIAMOND        }, ;
     { "GRA_MARKSYM_SQUARE        ", GRA_MARKSYM_SQUARE         }, ;
     { "GRA_MARKSYM_SIXPOINTSTAR  ", GRA_MARKSYM_SIXPOINTSTAR   }, ;
     { "GRA_MARKSYM_EIGHTPOINTSTAR", GRA_MARKSYM_EIGHTPOINTSTAR }, ;
     { "GRA_MARKSYM_SOLIDDIAMOND  ", GRA_MARKSYM_SOLIDDIAMOND   }, ;
     { "GRA_MARKSYM_SOLIDSQUARE   ", GRA_MARKSYM_SOLIDSQUARE    }, ;
     { "GRA_MARKSYM_DOT           ", GRA_MARKSYM_DOT            }, ;
     { "GRA_MARKSYM_SMALLCIRCLE   ", GRA_MARKSYM_SMALLCIRCLE    }, ;
     { "GRA_MARKSYM_BLANK         ", GRA_MARKSYM_BLANK          }  ;
   }
   
   aAttr  := Array( GRA_AM_COUNT )     // create attribute array
   
   FOR i:=1 TO 12
   
     @ i+10,10 DCPRINT SAY aMarker[i,1]
     aAttr[ GRA_AM_SYMBOL ] := aMarker[i,2]
   
     @ i+10,50 DCPRINT MARKER ATTR aAttr
   
   NEXT
   
   DCPRINT OFF
   
   RETURN
   

Source/Library:

  DCPRINT.CH

See Also:

   dc_printer()



@ DCPRINT SAY

Send text to printer using @..SAY style printing

Syntax:

   [ @ < nRow >, < nCol > ] DCPRINT SAY < uText > ;
      [PICTURE < cPicture >] ;
      [FONT < ocFont > [CODEPAGE < nCodePage >] ] ;
      [PRINTER < oPrinter >] ;
      [FIXED] ;
      [NOSCALE] [PIXEL] ;
      [ATTRIBUTE < aAttr >] ;
      [ALIGN < nAlign >] ;
      [OUTLINE] ;
      [WHEN < bWhen >] ;
      [WIDTH < nWidth >]
   

Arguments:

   < uText > is any variable.
   
   < nRow >, < nCol > are the start page coordinates to print the
   text.  These are row/column text coordinates unless the
   NOSCALE or PIXEL parameter was used in the DCPRINT ON command
   or the NOSCALE or PIXEL argument is used with to the @..DCPRINT SAY
   command.
   
   NOSCALE or PIXEL will cause coordinates NOT to be text-based.
   Normally, coordinates are text-based and are scaled to the
   coordinate system defined by the UNITS command.  The scaling is
   based on the SIZE clause.
   
   If < nRow > and < nCol > arguments are not used then the text will
   be printed at the current pen location which is usually the end
   of the last item printed by @..DCPRINT SAY.  This is desirable
   when printing concatenated text with changes in color or changes
   in font.
   
   FONT < ocFont > is the font to use.  This may be a font object or
   a character string containing the font compound name.  If no
   font clause is used, then the font selected by the DCPRINT FONT
   clause will be the default.
   
    NOTE: To print with UNDERSCORE, use the word "Underscore" in
          the FONT clause. ex: "12.Arial Bold Underscore".
   
   CODEPAGE < nCodePage > is the desired code page to use with the
   prescribed font other than the default code page.
   
   PICTURE < cPicture > is any picture clause that conforms to the
   specification defined in the Xbase++ documentation for the
   TRANSFORM() function.
   
   FIXED will print each character of the string on the grid
   defined by the SIZE command of the DCPRINT ON command.  FIXED
   should be used for numeric columns and strings used as heading
   separators like '-------'.
   
   PRINTER < oPrinter > is the printer object returned by the
   DCPRINT ON command or the DC_Printer() class.  If this clause
   is not used then the printer object referenced by
   DC_PrinterObject() is the default.
   
   ATTRIBUTE < aAttr > is an array of attributes that meets the
   specification for string attributes such as color, mixmode,
   alignment, etc.
   
   < aAttr > := Array( GRA_AS_COUNT )
   
   < aAttr > is an array whose elements contain the attributes for
   character strings drawn by the function GraStringAt().
   
   #define constants of the attribute array for character strings.
     These contants are defined in GRA.CH.
   
    Array element       #define | value     Default value
   
    GRA_AS_COLOR        GRA_CLR_*           GRA_CLR_NEUTRAL
    GRA_AS_BACKCOLOR    GRA_CLR_*           GRA_CLR_BACKGROUND
    GRA_AS_MIXMODE      GRA_FGMIX_*         GRA_FGMIX_OVERPAINT
    GRA_AS_BGMIXMODE    GRA_BGMIX_*         GRA_BGMIX_LEAVEALONE
    GRA_AS_BOX          { nXsize, nYsize }  dependent on output device
    GRA_AS_ANGLE        { nX, nY }          { 1, 0 }
    GRA_AS_SHEAR        { nX, nY }          { 0, 1 }
   
    GRA_AS_DIRECTION    GRA_CHDIRN_*        GRA_CHDIRN_LEFTRIGHT
    GRA_AS_HORIZALIGN   GRA_HALIGN_*        GRA_HALIGN_LEFT
    GRA_AS_VERTALIGN    GRA_VALIGN_*        GRA_VALIGN_BASE
    GRA_AS_EXTRA        nExtra              0
    GRA_AS_BREAK_EXTRA  nBreakExtra         0
   
   ALIGN < nAlign > is used to justify the text left, center or right
   both vertically and horizontally around the specified < nRow > and
   < nCol > coordinates.  < nAlign > is a summation of define manifest
   constants from DCPRINT.CH:
   
     Constant               Description
     ---------------------- --------------------------------------
     DCPRINT_ALIGN_LEFT     Justify Left (Default)
     DCPRINT_ALIGN_BOTTOM   Justify Bottom (Default)
     DCPRINT_ALIGN_RIGHT    Justify Right
     DCPRINT_ALIGN_HCENTER  Justify Horizontally Centered
     DCPRINT_ALIGN_TOP      Justify Top
     DCPRINT_ALIGN_VCENTER  Justify Vertically Centered
   
   OUTLINE will draw a box around the text.
   
               Ex: @ 10,10 DCPRINT SAY 'Testing' ;
                     ALIGN DCPRINT_ALIGN_CENTER + DCPRINT_ALIGN_VCENTER
   
   WHEN < bWhen > is a condition codeblock that is evaluated before
   the command is executed during previewing and printing from
   preview.  The DC_Printer() object is passed to the code block.
   The code block must return a logical .TRUE. to enable the command.
   
   WIDTH < nWidth > will truncate the < uText > to fit within the
   specified width.
   

Description:

    @..DCPRINT SAY prints text at a specified row and column.
   

Notes:

    The @..DCPRINT SAY command uses the :AtSay() method
    of the printer object.  This method looks at the current
    ::nPage instance variable and compares it to the ::nFrom
    value and the ::nTo value.  If the current page is outside
    the range selected by the user, then no output will be sent
    to the printer.
   

Examples:

   #include "dcprint.ch"
   
   PROCEDURE XTest( lPreview )
   
   LOCAL aFor_Sale, oPrinter, i, nLineCount, cMemo, cMemoLine, cScrn
   
   lPreview := IIF( Valtype(lPreview)='L',lPreview,.t.)
   
   USE collect NEW
   
   aFor_Sale := { 'No','Yes','Not Sure' }
   
   BEGIN SEQUENCE
   
   IF lPreview
     DCPRINT ON SIZE 60,100 TO oPrinter FONT '12.Courier' PREVIEW
   ELSE
     DCPRINT ON SIZE 60,100 TO oPrinter FONT '12.Courier'
   ENDIF
   
   IF Valtype(oPrinter) # 'O' .OR. !oPrinter:lActive
     BREAK
   ENDIF
   
   DC_Gui(.t.)
   
   IF !lPreview
     cScrn := DC_WaitOn()
   ENDIF
   
   DO WHILE !Eof()
   
     @ 2,0,20,45 DCPRINT BITMAP COLLECT->bitmap1
     @ 2,50,20,95 DCPRINT BITMAP COLLECT->bitmap2
   
     DCPRINT FONT '12.Courier'
   
     @ 23, 5, 37, 90 DCPRINT BOX
   
   
     aAttr := Array(GRA_AS_COUNT)
     aAttr[GRA_AS_COLOR] := GRA_CLR_BLUE
   
     @ 24,10 DCPRINT SAY '    Description:' ATTR aAttr
     @ 25,10 DCPRINT SAY '           Type:'
     @ 26,10 DCPRINT SAY '       Sub-Type:'
     @ 27,10 DCPRINT SAY '      Condition:'
     @ 28,10 DCPRINT SAY '       Location:'
     @ 29,10 DCPRINT SAY '      For Sale?:'
     @ 30,10 DCPRINT SAY '  Original Date:'
     @ 31,10 DCPRINT SAY '  Acquired Date:'
     @ 32,10 DCPRINT SAY ' Original Price:'
     @ 33,10 DCPRINT SAY 'Appraised Value:'
     @ 34,10 DCPRINT SAY '       Comments:'
     @ 35,10 DCPRINT SAY '      Bit Map 1:'
     @ 36,10 DCPRINT SAY '      Bit Map 2:'
   
     DCPRINT FONT '14.Terminal'
   
     @ 24,32 DCPRINT SAY COLLECT->descrip
     @ 25,32 DCPRINT SAY COLLECT->type
     @ 26,32 DCPRINT SAY COLLECT->sub_type
     @ 27,32 DCPRINT SAY COLLECT->condition
     @ 28,32 DCPRINT SAY COLLECT->location
     @ 29,32 DCPRINT SAY aFor_Sale[COLLECT->for_sale+1]
     @ 30,32 DCPRINT SAY COLLECT->date_orig
     @ 31,32 DCPRINT SAY COLLECT->date_acqu
     @ 32,32 DCPRINT SAY COLLECT->orig_price
     @ 33,32 DCPRINT SAY COLLECT->appr_value
     @ 34,32 DCPRINT SAY COLLECT->comments
     @ 35,32 DCPRINT SAY COLLECT->bitmap1
     @ 36,32 DCPRINT SAY COLLECT->bitmap2
   
     DCPRINT FONT '12.Arial'
   
     cMemo := Alltrim(COLLECT->memo)
     nLineCount := MLCount(cMemo)
     FOR i := 1 TO nLineCount - 1
       cMemoLine := MemoLine( cMemo, nil, i )
       IF Empty(cMemoLine)
         EXIT
       ENDIF
       @ 40+i,10 DCPRINT SAY cMemoLine
     NEXT
   
     DCPRINT EJECT
   
     SKIP
   
   ENDDO
   
   IF !lPreview
     DC_Impl(cScrn)
   ENDIF
   
   END SEQUENCE
   
   DCPRINT OFF
   
   RETURN
   

Source/Library:

  DCPRINT.CH

See Also:

   dc_printer()
   @ DCRIGHTPRINT SAY
   DCPRINT ON



@ DCPROGRESS

Create a PROGRESS BAR object for displaying with GUI reader

Syntax:

   #command  @ < nRow >,< nCol > DCPROGRESS < oProgress > ;
       [SIZE < nWidth > [,< nHeight >]] ;
       [TYPE < nType >] ;
       [PARENT < oParent >] ;
       [PARENTID < cParentId >] ;
       [PRESENTATION < aPres >] ;
       [COLOR < bncFgC > [,< ncBgC >]] ;
       [PERCENT] ;
       [VERTICAL] ;
       [EVERY < nCount >] ;
       [MAXCOUNT < nMaxCount >] ;
       [TOOLTIP < bcToolTip >] ;
       [HIDE < bHide >] ;
       [CARGO < xCargo >] ;
       [PREEVAL < bPreEval >] ;
       [EVAL < bEval >] ;
       [PIXEL] ;
       [RELATIVE < oRel > ] ;
       [ID < cId >] ;
       [TITLE < cTitle >] ;
       [VISIBLE] ;
       [INVISIBLE] ;
       [GROUP < cGroup >]
   

Arguments:

   < nRow > and < nCol > are the row and column of the screen.
   Coordinates are always relative to position 0,0 ie. Top,Left
   of the parent object, unless the RELATIVE < oRel > argument is
   used.  If no parent is assigned, then the parent is the Dialog
   box.  IF the PIXEL option is set to .TRUE. in DCGETOPTIONS,
   then the numbers are in pixels otherwise they are in standard
   text-based coordinates.  You can also force the pixel mode by
   including PIXEL as a command argument.
   
   < oProgress > is the name of a local variable to assign to this
   object.  This variable is passed to DC_GetProgress() to update
   the progress bar.
   
   RELATIVE < oRel > is an optional object in the Getlist which
   determines the start coordinates of this object.  If this
   option is used, then the < nSrow >, < nSCol > coordinates are
   relative to the starting coordinates of < oRel > rather than
   the parent object.
   
   SIZE < nWidth >,< nHeight > is the width and height of the
   Progress Bar.  If the PIXEL option is set to .TRUE. in DCGET
   OPTIONS, then the numbers are in pixels otherwise they are
   in standard text-based numbers.
   
   TYPE < nType > is the style of XbpStatic() box to use for the
   progress bar.  The default is XBPSTATIC_TYPE_RAISEDBOX.  The
   constants for static types are contained in XBP.CH.
   
   PARENT < oParent > is the name of the variable that was assigned to
   the parent object for this object.  Only use this clause if you
   are placing this object onto another dialogue object.  If this
   argument is not passed then the parent will be the object set
   with the DCSETPARENT command.
   
   PARENTID < cParentID > may be used in lieu of the PARENT < oParent >
   clause.  This identifies the ID of the parent instead of the
   parent's object variable name.
   
   PRESENTATION < aPres > is a two-dimensional array. If specified,
   this contains presentation parameters for the multiline object.
   The first column of the array must contain #define constants
   from the XBP.CH file starting with the prefix XBP_PP_. These
   constants define the presentation parameters that can be set
   for the object and include colors and fonts. The second column
   of the array in < aPres > contains the value for each setting.
   These are also generally set using #define constants from the
   GRA.CH file.
   
   The PERCENT clause will paint a small box in the center of the
   progress bar for displaying the percentage of progress.
   
   The VERTICAL clause will cause the progress bar to progress in
   vertically from to bottom to the top, otherwise it will progress
   horizontally from left to right.
   
   EVERY < nCount > determines how often the progress bar is updated.
   
   MAXCOUNT < nMaxCount > is a numeric value equal to the maximum
   value of the progress bar.  For example, if stepping through a
   database, this value would be RECCOUNT().
   
   PREEVAL < bPreEval > is a code block to be evaluated by the GUI
   reader before the Xbase Parts object is created.  The object is
   passed to the code block.
   
   EVAL < bEval > is a code block to be evaluated by the GUI reader
   after the Xbase Parts object is created.  The object is passed
   to the code block.
   
   CARGO < xCargo > is any kind of data you wish to to add to the
   :cargo container for this object.  The cargo may be accessed
   at any time via the :cargo exported variable, however it will not
   be stored in the same manner it is entered.  The :cargo container
   of DCDIALOG objects is an array of at least three elements:
   
    [1] - A numeric value that is a pointer to the Getlist array
          for this object.
   
    [2] - A pointer to the GetList array.
   
    [3] - The value of < xCargo >.
   
    [4] and up - optional values added by the GUI reader.
   
   COLOR < ncFGc >, < ncBGc > are foreground and background colors.
   They may be character strings representing valid text-based
   colors supported by SetColor() or they may be numeric constants
   which begin with either the prefix GRA_CLR_ or the prefix
   XBPSYSCLR_ as defined in GRA.CH or XBP.CH. If < bncFGc > is a
   code block is must return a 2-element array containing a
   foreground and background color.
   
   ID < cId > is a unique identifier for this object.  This ID is used
   with functions like DC_GETORIGUPDATED() to determine the status
   of a get object.
   
   TOOLTIP < bcToolTip > is a character string which will display
   as a "Tool Tip" next to the object when the cursor is passed
   over the object.  If < bcToolTip > is a code-block, it must return
   a character string.  NOTE: The Tooltip painting method is run in
   another thread, therefore the codeblock should not run code that
   points to the current work area.  It may however, contain
   local, public or private variables.
   
   TITLE < cTitle > is a title to assign to this object.  The title
   is not displayed on the screen but is simply a description of the
   get object which is saved in the GetList.
   
   HIDE < bHide > is a code block that is evaluated in the event loop.
   This code block must return a logical value.  If the value
   returned is .TRUE. then the object will be hidden from view.  If
   the value returned is .FALSE. then the object will be displayed.
   The object is passed as a parameter to the code block.
   
   GROUP < cGroup > is a "group" name (case-sensitive) to assign to
   this GetList object.  Assignment to a group makes it possible to
   perform operations only on GetList items which are members of a
   specified group, using functions such as DC_GetRefresh() or
   DC_ReadGui().
   
   VISIBLE determines whether the object is visible immediately after
   the call to the method :create() . By default the object follows
   the VISIBLE clause of the DCGETOPTIONS command.  Use the
   INVISIBLE clause to override the VISIBLE clause of DCGETOPTIONS.
   

Description:

    The command @..DCPROGRESS creates a new Progress-Bar object
    and adds the object to the array named GETLIST which is later
    processed by the DC_READGUI() function or by the DCREAD GUI
    command.  The GETLIST array must be first declared and
    initialized to the value of {}.  The command DCREAD GUI activates
    the edit mode for all objects found in the GetList array.
    A Getlist object remains stored as long as it is referenced
    in an array or by a variable.  The commands CLEAR and
    CLEAR GETS assign an empty array to the GetList variable.
    This also occurs after the completion of the DCREAD command
    if it is called without the SAVE option, causing all Get
    objects referenced by the GetList array to be released.
   
    @..DCPROGRESS objects are used in combination with the
    DC_GETPROGRESS() function to update a progress bar for any kind
    of operation, ie, database indexing, updating, exporting,
    searching, etc.
   
    @..DCPROGRESS objects can be combined with any objects that
    that use the DCDIALOG system, such as @..DCSAY..GET,
    @..DCSTATIC, @..DCBUTTON, @..DCCHECKBOX or @..DCTABPAGE.
   

Notes:

    The object created by @ DCPROGRESS is an object of the
    XbpStatic() class, therefore it can be manipulated with
    any iVar or method supported by XbpStatic().
   

Examples:

   #include 'dcdialog.ch'
   #include 'xbp.ch'
   #include 'gra.ch'
   
   PROCEDURE XTest()
   
   LOCAL Getlist := {}, oProgress, oDialog
   
   USE customer
   
   @ 2,5 DCSAY 'Exporting Data to JUNK.DBF'
   
   @ 4,5 DCPROGRESS oProgress ;
          SIZE 60,1.5 ;
          MAXCOUNT RecCount();
          COLOR GRA_CLR_BLUE ;
          PERCENT ;
          EVERY Int(RecCount()/100)
   
   DCREAD GUI TITLE 'My Test Dialog' ;
      PARENT @oDialog ;
      FIT ;
      EXIT
   
   oDialog:show()
   
   COPY TO junk WHILE _Progress( oProgress )
   
   DC_Gui(.t.)
   DC_MsgBox('Done')
   
   oDialog:Destroy()
   
   RETURN
   
   /* ----------------- */
   
   STATIC FUNCTION _Progress ( oProgress )
   
   DC_GetProgress( oProgress, CUSTOMER->(RecNo()) )
   
   RETURN .t.
   

Source/Library:

  DCDIALOG.CH

See Also:

   DC_GetProgress()



@ DCPUSHBUTTON

Create a PUSHBUTTON for displaying with GUI reader

Syntax:

   @ < nRow >, < nCol > DCPUSHBUTTON ;
       [CAPTION < bcnoCaption >] ;
       [SIZE < nWidth >, < nHeight >] ;
       [FANCY] ;
       [ACTION < bAction >] ;
       [WHEN < bWhen >] ;
       [HIDE < bHide >  ;
       [PARENT < oParent >] ;
       [PARENTID < cParentID >] ;
       [COLOR < bncFgC > [,< ncBgC >]] ;
       [HELPCODE < cHelpCode >] ;
       [FONT < bocFont >] ;
       [PRESENTATION < aPres >] ;
       [PIXEL] ;
       [OBJECT < oObject >] ;
       [TOOLTIP < bcToolTip >] ;
       [MESSAGE < bcMsg > [INTO < oMsgBox >]] ;
       [CURSOR < naCursor >] ;
       [CARGO < xCargo >] [CARGO "CANCEL"] ;
       [PREEVAL < bPreEval >] ;
       [EVAL < bEval >] ;
       [RELATIVE < oRel >] ;
       [ID < cId >] ;
       [TITLE < cTitle >] ;
       [ACCELKEY < anAccel >] ;
       [GOTFOCUS < bGotFocus >] ;
       [LOSTFOCUS < bLostFocus >] ;
       [TABSTOP] ;
       [NOTABSTOP] ;
       [TABGROUP < nTabGroup >] ;
       [VISIBLE] ;
       [INVISIBLE] ;
       [GROUP < cGroup >] ;
       [STATIC] * ;
         [FOCUSCOLOR < nTextColor > [,< nFrameColor >]] * ;
         [BITMAP < xBMUp > [,< xBMDown > [,< xBMNeutral > [,< xBMFlash >]]]] * ;
         [REGION < aRegion >] * ;
         [FLASH < nFlashIterations > [,< nFlashDelay >]]
   
     * Supported by eXPress++ 1.7 or later
   

Arguments:

   < nRow > and < nCol > are the row and column of the screen.
   Coordinates are always relative to position 0,0 ie. Top,Left
   of the parent object, unless the RELATIVE argument is used.
   If no parent is assigned, then the parent is the Dialog box.
   IF the PIXEL option is set to .TRUE. in DCGETOPTIONS, then
   the numbers are in pixels otherwise they are in standard
   text-based coordinates.  You can also force the pixel
   mode by including PIXEL as a command argument.
   
   RELATIVE < oRel > is an optional object in the Getlist which
   determines the start coordinates of this object.  If this
   option is used, then the < nSrow >, < nSCol > coordinates are
   relative to the starting coordinates of < oRel > rather than
   the parent object.
   
   CAPTION < bcnoCaption > is the part of the PushButton object that
   is displayed within the area of the pushbutton. The caption may
   be one of the following:
   
   1) A character string.  An ampersand (&) preceding a character in
      the text assigns the ALT-< char > key as a hotkey for the
      pushbutton and underlines the character.  A tilde (~) preceding
      the character will only underline the character and will not
      enable the hot-key.  A tilde (~) could be used with the
      ACCELKEY clause to establish the hot key(s).
   
   2) A bitmap resource. The numeric resource ID of the bitmap is
      assigned to the instance variable.  If a resource ID is used,
      it must be defined in a resource file that is linked to the
      EXE file using the resource compiler.
   
   3) A bitmap object created with the XbpBitMap() class. (Xbase++
      1.7 or later).
   
   4) A two-element array.  This array must contain either two
      character strings, two bitmap objects or two bitmap numeric
      values.  The first value is the caption to use when the
      pushbutton is "enabled" by the WHEN clause.  The second value
      is the caption to use when the pushbutton is "disabled" by
      the WHEN clause.
   
   4. A code block.  A code block is evaluated whenever the
      DC_GetRefresh() function is called.  This is used to change
      the caption dynamically after the pushbutton object is created.
      The code block must return either a character string, a bitmap
      numeric resource, a bitmap object or an array of 2 elements.
   
   SIZE < nWidth >,< nHeight > is the width and height of the
   PushButton.  If the PIXEL option is set to .TRUE. in DCGET
   OPTIONS, then the numbers are in pixels otherwise they are
   in standard text-based numbers.
   
   FANCY will cause the button to be displayed in a special mode
   in which the button will be displayed only as a caption on the
   parent object until the mouse is passed over the caption which
   will then display the raised button.  DC_FancyButtonMode(1) can
   be used to override this clause and force normal buttons.
   CAUTION: FANCY cannot be used with a caption that is a bitmap
   object, however it can be used with a caption that is a bitmap
   resource.
   
   ACTION < bAction > is a codeblock that is to be evaluated
   when the pushbutton is activated.
   
   PARENT < oParent > is the name of the variable that was assigned to
   the parent object for this object.  Only use this clause if you
   are placing this object onto another dialogue object.  If this
   argument is not passed then the parent will be the object set
   with the DCSETPARENT command.
   
   PARENTID < cParentID > may be used in lieu of the PARENT < oParent >
   clause.  This identifies the ID of the parent instead of the
   parent's object variable name.
   
   OBJECT < oObject > is the name of the memory variable to assign to
   this object.
   
   FONT < cFont > is a character string defining an optional font.
   The font string must conform to the Xbase++ standard, ie.
   "10.Courier.Bold". It may also be a font object or a code block
   that returns a character string or a font object to later
   refresh with DC_GetRefresh().
   
   MESSAGE < bcMsg > is the message you want to display in the
   message area of the dialogue screen defined by the DCMESSAGEBOX
   command when the object is in focus.  Optionally, INTO < oMsgBox >
   will designate which message box to display the message into.
   If the INTO clause is not used, then the last message box in the
   GetList is the default. < oMsgBox > may also be any object that
   supports the :setCaption() method.If < bcMsg > is a code-block,
   it must return a character string.
   
   HELPCODE < cHelp > is a character string that is passed to the
   DC_HelpF1() function if F1 is pressed or the HELP button
   is clicked when this object has focus.  This HELPCODE allows
   the Help system to override the passing of the Procedure and
   Varname for more specific context-help.
   
   PRESENTATION < aPres > is a two-dimensional array. If specified,
   this contains presentation parameters for the pushbutton object.
   The first column of the array must contain #define constants
   from the XBP.CH file starting with the prefix XBP_PP_. These
   constants define the presentation parameters that can be set
   for the object and include colors and fonts. The second column
   of the array in < aPres > contains the value for each setting.
   These are also generally set using #define constants from the
   GRA.CH file.
   
   TOOLTIP < bcToolTip > is a character string which will display
   as a "Tool Tip" next to the object when the cursor is passed
   over the object. A semi-colon within the text indicates a new
   line.  If < bcToolTip > is a code-block, it must return a character
   string.  NOTE: The Tooltip painting method is run in another
   thread, therefore the codeblock should not run code that points
   to the current work area.  It may however, contain local, public
   or private variables.
   
   CURSOR < naCursor > may be either a numeric value or an array of
   3 elements which defines an optional mouse pointer to use for
   this object.  System mouse pointers start with
   XBPWINDOW_POINTERTYPE_ and are defined in XPB.CH.  The default
   pointer is XBPWINDOW_POINTERTYPE_POINTER.  < naCursor > may be a
   numeric resource ID that points to a Bit-Map that has been
   compiled with the resource compiler and linked to the .EXE.
   < naCursor > may be a 3-element array described as follows:
   
     Element  Type  Description
     -------  ---- ---------------------------------------------
       [1]      C   Optional name of .DLL containing the pointer
                    resource.
   
       [2]      N   The numeric resource ID of the pointer.  If
                    element 1 is a NIL, then this resource must be
                    linked into the .EXE.
   
       [3]      N   The type of resource as defined in XBP.CH.
   
   PREEVAL < bPreEval > is a code block to be evaluated by the GUI
   reader before the Xbase Parts object is created.  The object is
   passed to the code block.
   
   EVAL < bEval > is a code block to be evaluated by the GUI reader
   after the Xbase Parts object is created.  The object is passed
   to the code block.
   
   CARGO < xCargo > is any kind of data you wish to to add to the
   :cargo container for this object.  The cargo may be accessed
   at any time via the :cargo exported variable, however it will not
   be stored in the same manner it is entered.  The :cargo container
   of DCDIALOG objects is an array of at least three elements:
   
    [1] - A numeric value that is a pointer to the Getlist array
          for this object.
   
    [2] - A pointer to the GetList array.
   
    [3] - The value of < xCargo >.
   
    [4] and up - optional values added by the GUI reader.
   
   Use the clause CARGO 'CANCEL' if the pushbutton is to be used
   to exit a dialog without testing validations.  This will insure
   that if the pushbutton is clicked while in a DCGET with a
   validation the validation code block will not be evaluated.
   
   COLOR < ncFGc >, < ncBGc > are foreground and background colors.
   They may be character strings representing valid text-based
   colors supported by SetColor() or they may be numeric constants
   which begin with either the prefix GRA_CLR_ or the prefix
   XBPSYSCLR_ as defined in GRA.CH or XBP.CH. If < bncFGc > is a
   code block is must return a 2-element array containing a
   foreground and background color.
   
   ID < cId > is a unique identifier for this object.  This ID is used
   with functions like DC_GETORIGUPDATED() to determine the status
   of a get object.
   
   TITLE < cTitle > is a title to assign to this object.  The title
   is not displayed on the screen but is simply a description of the
   get object which is saved in the GetList.
   
   WHEN < bWhen > is a code block that is evaluated in the event loop.
   This code block must return a logical value.  If the value
   returned is .FALSE. then the object will be disabled and grayed.
   If the value returned is .TRUE. then the object will be enabled.
   The object is passed as a parameter to the code block.
   
   HIDE < bHide > is a code block that is evaluated in the event loop.
   This code block must return a logical value.  If the value
   returned is .TRUE. then the object will be hidden from view.  If
   the value returned is .FALSE. then the object will be displayed.
   The object is passed as a parameter to the code block.
   
   ACCELKEY < anAccel > is a numeric "hot-key" assignment that will set
   focus to the checkbox object when the hot-key is pressed.  The key
   must be a valid key with the prefix xbeK_*.  These keys are
   defined in APPEVENT.CH.  < anAccel > may also be an array of numeric
   values to assign more than one key to the object.
   
   GOTFOCUS < bGotFocus > is a code block that is evaluated when this
   object receives input focus.  < bGotFocus > := {|uNIL1,uNIL2,self|...}
   
   LOSTFOCUS < bLostFocus > is a code block that is evaluated when this
   object loses input focus.  < bLostFocus > := {|uNIL1,uNIL2,self|...}
   
   TABSTOP will cause the object (Xbase Part) to be set when using
   the Tab key.  Note: When logical groups are defined in a dialog
   using TABGROUP < nTabGroup >, TABSTOP is usually set to .T. (true)
   for the first dialog element in the group.  This allows the first
   dialog element of a group to be activated using the Tab key.
   
   NOTABSTOP will cause the object (Xbase Part) to be ignored when
   using the Tab key. This clause is needed only to override any
   default setting of TabStop by the DCGETOPTIONS [TABSTOP] command.
   
   TABGROUP < nTabGroup > allows objects (Xbase Parts) that are created
   immediately after one another in the GetList to be combined into
   logical groups. This allows the user to navigate within a dialog
   from group to group by pressing the Tab key.  Within a group of
   dialog elements navigation is performed using the cursor keys.
   
   Only constants defined in the XBP.CH file can be used as values
   for this instance variable.  The following table lists the
   available constants:
   
   #define constants for < nTabGroup >:
   
    Constant             Description
   
    XBP_NO_GROUP     *)  Dialog element does not belong to a group
    XBP_BEGIN_GROUP      Dialog element is the first in a group
                         (this begins the definition of the group)
    XBP_WITHIN_GROUP     Dialog element is within a group
    XBP_END_GROUP        Dialog element is the last in a group
                         (this ends the definition of the group)
   
   *) Default value
   
   GROUP < cGroup > is a "group" name (case-sensitive) to assign to
   this GetList object.  Assignment to a group makes it possible to
   perform operations only on GetList items which are members of a
   specified group, using functions such as DC_GetRefresh() or
   DC_ReadGui().
   
   VISIBLE determines whether the object is visible immediately after
   the call to the method :create() . By default the object follows
   the VISIBLE clause of the DCGETOPTIONS command.  Use the
   INVISIBLE clause to override the VISIBLE clause of DCGETOPTIONS.
   
   The following options are supported by eXPress++ 1.7 or later:
   
   When the STATIC * clause is used, a class created from the
   XbpDialog() class is used instead of the XbpPushButton() class.
   This allows for the creation of complex pushbuttons by allowing
   the pushbutton object to be a parent for any other object such
   as DCSTATIC or DCSAY for the display of text, icons, bitmaps
   etc. on the button.
   
   FOCUSCOLOR * is used to determine the color of any text on the
   button when it receives focus by passing the mouse over the button.
   < anTextColor > is the color of the text.  If this argument is a
   NIL the text color will not be changed.  < anFrameColor > is the
   color of a frame that is drawn around the perimeter of the button
   to hilight the button when it receives focus.  If this argument
   is a NIL, there will be no frame drawn.  These arguments may be
   be a numeric color defined by GRA_CLR_* in GRA.CH or a 3 element
   array of RGB colors.
   
   BITMAP * < xBMUp > is the background bitmap for the button in the
   UP (unpressed) condition.  < xBMDown > is the background bitmap for
   the button in the DOWN (pressed) condition and < xBMNeutral > is the
   background bitmap of the button in the NEUTRAL (fancy button)
   condition.  < xBMFlash > is the bitmap to be used with the FLASH
   clause.  Each bitmap will be replicated over the entire pushbutton
   background area.  The bitmaps may be numeric resources,
   XbpBitMap() objects, or character strings containing a .BMP, .GIF,
   or .JPG file name.
   
   FLASH is used with the < xBMFlash > bitmap.  This bitmap will flash
   on just before the action block is evaluated.  This feature is for
   touch-screen applications or other applications where some kind of
   tactile feedback is desired to indicate to the user that the button
   has been pressed.  < nFlashIterations > is the number of times that
   the bitmap should flash.  < nFlashDelay > is the amount of delay in
   100th/second between flashes.
   
   REGION < aRegion > is an array defining the region of the button
   to display.  All other areas will be removed.  < aRegion > may be
   an array that is created by DC_RegionArray() or may be any other
   multidimensional array containing a set of rectangular regions.
   < aRegion > is used to display the button as a circle, ellipse,
   octagon, diamond, or other irregular shape.
   

Description:

    The command @..DCPUSHBUTTON creates a new PushButton object
    and adds the object to the array named GETLIST which is later
    processed by the DC_READGUI() function or by the DCREAD GUI
    command.  The GETLIST array must be first declared and
    initialized to the value of {}.  The command DCREAD GUI activates
    the edit mode for all objects found in the GetList array.
    A Getlist object remains stored as long as it is referenced
    in an array or by a variable.  The commands CLEAR and
    CLEAR GETS assign an empty array to the GetList variable.
    This also occurs after the completion of the DCREAD command
    if it is called without the SAVE option, causing all Get
    objects referenced by the GetList array to be released.
   
    @..DCPUSHBUTTON objects can be combined with any objects that
    that use the DCDIALOG system, such as @..DCSAY..GET,
    @..DCRADIO, @..DCMULTILINE, @..DCCHECKBOX or @..DCTABPAGE.
   

Notes:

    If the STATIC clause is not used, the object created by
    @ DCPUSHBUTTON is an object of the XbpPushButton() class,
    therefore it can be manipulated with  any iVar or method
    supported by XbpPushButton() class.
   
    If the STATIC clause is used, the object created by
    @ DCPUSHBUTTON is an object of the XbpDialog() class, therefore
    it can be manipulated with any iVar or method supported by the
    XbpDialog() class (eXPress++ version 1.7 or later).
   
    Use the clause CARGO 'CANCEL' if the pushbutton is to be used
    to exit a dialog without testing validations.  This will insure
    that if the pushbutton is clicked while in a DCGET with a
    validation the validation code block will not be evaluated.
   
    For an example of STATIC buttons, run XDEMO.EXE (sample group 5).
   
    The function DC_BitmapTransparentColor() may be used to set the
    default transparent color for pushbuttons that have bitmaps as
    captions.
   

Examples:

   #include "dcdialog.ch"
   
   PROCEDURE Xtest()
   
   LOCAL GetList := {}
   
   @ 5,10 DCPUSHBUTTON CAPTION 'Save to Dictionary' ;
     SIZE 20,2 ;
     ACTION {||SaveToDictionary()}
   
   @ 5,40 DCPUSHBUTTON CAPTION 'Save to Source Code' ;
     SIZE 20,2 ;
     ACTION {||SaveToSource()}
   
   @ 8,10 DCPUSHBUTTON CAPTION 'Make a Backup file' ;
     SIZE 20,2 ;
     ACTION {||MakeBackup()}
   
   @ 8,40 DCPUSHBUTTON CAPTION 'Pack the File' ;
     SIZE 20,2 ;
     ACTION {||PackFile()}
   
   DCREAD GUI ;
      TITLE 'Pushbutton Demo' ;
      ADDBUTTONS ;
      FIT
   
   RETURN
   
   /* -------------------- */
   
   STATIC PROCEDURE SaveToDictionary()
   
   DC_MsgBox('Data has been saved to Dictionary')
   
   RETURN
   
   /* -------------------- */
   
   STATIC PROCEDURE SaveToSource()
   
   DC_MsgBox('Data has been saved to Source Code')
   
   RETURN
   
   /* -------------------- */
   
   STATIC PROCEDURE MakeBackup()
   
   DC_MsgBox('Backup is complete')
   
   RETURN
   
   /* -------------------- */
   
   STATIC PROCEDURE PackFile()
   
   DC_MsgBox('Pack is complete')
   
   RETURN
   

Source/Library:

  DCDIALOG.CH

See Also:

   @ DCTOOLBAR
   dc_fancybuttonmode()



@ DCQUICKBROWSE

Create a QUICKBROWSE object for displaying with GUI reader

Syntax:

    @ < nRow >, < nCol > DCQUICKBROWSE < oBrowse > ;
       [ALIAS < cAlias >] ;
       [FIELDS < aFields >] ;
       [DATA < xData >] ;
       [COLUMNS < aColumns >] ;
       [COLTYPE < aColType >] ;
       [COLREPRESENTATION < aColRep >] ;
       [COLWIDTH < aColWidth >] ;
       [COLALIGN < aColAlign >] ;
       [HEADERS < aHeaders >] ;
       [SIZE < nWidth > [,< nHeight >]] ;
       [STYLE < nStyle >] ;
       [PARENT < oParent >] ;
       [PARENTID < cParentId >] ;
       [INTO < uVar >] ;
       [POINTER < nVar >] ;
       [ITEMMARKED < bItemMarked >] ;
       [DATALINK, ITEMSELECTED < bItemSelected >] ;
       [EDIT < nEditEvent > ;
          [ MODE < nEditMode >] ;
          [ ACTION < bEditAction >] ;
          [ EXIT < bEditExit > ] ] ;
       [INSERT < nInsertEvent > ;
          [ DEFAULT < abDefault >] ;
          [ ACTION < bInsertAction >] ;
          [ EXIT < bInserExit >] ] ;
          [ APPEND < nAppendEvent >] ;
       [DELETE < nDeleteEvent > ;
          [ ACTION < bDeleteAction >] ;
          [ EXIT < bDeleteExit > ] ] ;
       [HANDLER < handler > [REFERENCE < xRef >]] ;
       [PRESENTATION < aPres >] ;
       [MESSAGE < cMsg > [INTO < oMsg >]] ;
       [COLOR < bncFgC > [,< ncBgC >]] ;
       [WHEN < bWhen >] ;
       [HIDE < bHide >] ;
       [FONT < bocFont >] ;
       [CARGO < xCargo >] ;
       [CURSORMODE < nCursorMode >] ;
       [PIXEL] ;
       [PREEVAL < bPreEval >] ;
       [EVAL < bEval >] ;
       [RELATIVE < oRel >] ;
       [TITLE < cTitle >] ;
       [ID < cId >] ;
       [ACCELKEY < anAccel >] ;
       [GOTFOCUS < bGotFocus >] ;
       [LOSTFOCUS < bLostFocus >] ;
       [TABSTOP] ;
       [NOTABSTOP] ;
       [NOVSCROLL] ;
       [NOHSCROLL] ;
       [TABGROUP < nTabGroup >] ;
       [VISIBLE] ;
       [INVISIBLE] ;
       [GROUP < cGroup >]
   

Arguments:

   < nRow >, < nCol > are the coordinates on the screen.
   Coordinates are always relative to position 0,0 ie. Top,Left
   of the parent object, unless the RELATIVE < oRel > argument is
   used.  If no parent is assigned, then the parent is the Dialog
   box.  IF the PIXEL option is set to .TRUE. in DCGETOPTIONS,
   then the numbers are in pixels otherwise they are in standard
   text-based coordinates.  You can also force the pixel mode by
   including PIXEL as a command argument.
   
   < oBrowse > is the name of the variable to assign as a storage
   place for this object.
   
   SIZE < nWidth >,< nHeight > is the width and height of the
   prompt.  If the PIXEL option is set to .TRUE. in DCGETOPTIONS,
   then the numbers are in pixels otherwise they are in standard
   text-based numbers.
   
   RELATIVE < oRel > is an optional object in the Getlist which
   determines the start coordinates of this object.  If this
   option is used, then the < nSrow >, < nSCol > coordinates are
   relative to the starting coordinates of < oRel > rather than
   the parent object.
   
   ALIAS < cAlias > defines the browse as a database browse. < cAlias)
   is a variable containing the alias of the database to browse.
   
    or
   
   DATA < aData > defines the browse as an array browse.  < aData > is
   a variable containing a pointer to the array to browse.  ELEMENT
   < nElement > is an optional clause defining the selected element of
   < aData >.
   
   COLUMNS < aColumns > is a one-dimensional array of column indexes.
   for the columns of < aData > when browsing an array.  NOTE: this
   parameter is needed when creating a browse where columns are
   defined by this clause rather than defined later with the
   DCBROWSECOL command.
   
   FIELDS < aFields > is a one-dimensional array of field names for
   the fields to be accessed. If not specified, the DacPagedDataStore
   object caches all fields of the specified work area.  NOTE: this
   parameter is needed when creating a browse where fields are
   defined by this clause rather than defined later with the
   DCBROWSECOL command.
   
   HEADERS < aHeaders > is a one-dimensional array of column headings.
   NOTE: this parameter is needed when creating a browse where
   headers are defined by this clause rather than defined later
   with the DCBROWSECOL command.
   
   STYLE < nStyle > is used to choose a pre-defined display style.
   The below constants are defined in XBP.CH.
   
   Style definitions
   
     Constant         Description
   
     XBP_STYLE_PLAIN  Plain appearance
     XBP_STYLE_FANCY  Fancy style
     XBP_STYLE_3D     3D style
   
   COLTYPE < aColType > is an array defining the type of each column.
   Each element is an optional sub-array of three elements:
   { < cValtype >, < nDisplayType >, < cPicture > }.   NOTE: this
   parameter is needed when creating a browse where column types
   are defined by this clause rather than defined later with the
   DCBROWSECOL command.
   
   < cValType > is the type of data displayed in the column. It is
   specified using a letter equivalent to the return value of the
   Valtype() function. These are usually the characters "C", "D",
   "L" or "N".
   
   < nDisplayType > defines the display type of the column, or how
   data is visualized. Data can be represented in textual (default)
   or graphic form. Constants defined in XBP.CH are used for
   < nDisplayType > . They are listed in the table below:
   
   Constants used for < nDisplayType >
   
    Constant                  Description
   
    XBPCOL_TYPE_BITMAP        The column displays bitmaps
    XBPCOL_TYPE_ICON          The column displays icons
    XBPCOL_TYPE_SYSICON       The column displays system-icons
    XBPCOL_TYPE_FILEICON      The column displays normal file-icons
    XBPCOL_TYPE_FILEMINIICON  The column displays small file-icons
    XBPCOL_TYPE_TEXT      *)  The column displays textual data
   
    *) default value
   
   < cPicture > optionally defines a picture string for textual data.
   Refer to the Transform() function for picture formatting rules.
   
   COLREPRESENTATION < aColRep > is an array of information about the
   presentation of columns.  There is one sub-array for each column
   defined as follows: < aResource >
   
   < aResource > := { < xValue >, < nNormalID >, < nHiliteID > }
   
     When data in a column cell has the value < xValue >  the image
     with the resource ID < nNormalID > is displayed in the cell. If
     the cell is to be hilited, the image with the ID < nHiliteID > is
     displayed. The value -1 is valid for both resource IDs. In this
     case, nothing is displayed in the cell. Once a visual
     representation is defined, it can be voided by specifying NIL
     for the resource IDs.
   
   COLWIDTH < aColWidth > is a one-dimensional array of numeric column
   widths in pixels.
   
   COLALIGN < aColAlign > is a one-dimensional array of numeric values
   to define horizontal and vertical alignment:
   
    Constants for alignment
   
    Constant          Description
   
    XBPALIGN_TOP      Alignment at the top
    XBPALIGN_LEFT     Alignment on the left
    XBPALIGN_BOTTOM   Alignment at the bottom
    XBPALIGN_RIGHT    Alignment on the right
    XBPALIGN_HCENTER  Horizontally centered
    XBPALIGN_VCENTER  Vertically centered
   
   INTO < nVar > is a memory variable to store a pointer to the record
   number of the selected row.  Each time the user clicks on a new
   row of a database browse, the record number will be stored in
   < nVar >.
   
   ITEMMARKED < bItemMarked > is a code block to evaluate every
   time the user clicks to a new row of the browse.  The browse
   object is passed to the code block.
   
   POINTER < nVar > is a memory variable to store the current array
   element pointer. This clause  is used only when browsing arrays.
   Each time the user clicks on a new row of the array browse, the
   browse row (element number) will be stored in < nVar >.  < nVar >
   must be initialized to a numeric value.
   
   PARENT < oParent > is the name of the variable that was assigned to
   the parent object for this object.  Only use this clause if you
   are placing this object onto another dialogue object.  If this
   argument is not passed then the parent will be the object set
   with the DCSETPARENT command.
   
   PARENTID < cParentID > may be used in lieu of the PARENT < oParent >
   clause.  This identifies the ID of the parent instead of the
   parent's object variable name.
   
   ITEMSELECTED, DATALINK < bItemSelected > is an optional code block
   to evaluate whenever the user double-clicks the mouse or presses
   the ENTER key within the browse area.  The browse object is passed
   as a parameter to the code block.
   
   EDIT < nEditEvent > is an optional clause that enables "cell-editing"
   of the browse cells whenever a specified event occurs that is
   associated with the browse object.  NOTE: Cell-Editing will work
   only if all browse columns are created via the DCBROWSECOL
   command.  < nEditEvent > is a numeric value equivalent to an xbe*
   event or keyboard value which has been defined in APPEVENT.CH.
   For example, cell editing will occur within the selected cell
   when < nEditEvent > is equal to xbeBRW_ItemSelected and the cell
   is selected with a mouse double-click or the ENTER key is
   pressed.  MODE < nEditMode > is the navigation mode within the
   cells.  < nEditMode > is a numeric value from the following table:
   
    < nEditMode >                 Description
    -----------                 ------------------------------------
    DCGUI_BROWSE_EDITEXIT       Exit cell editing after ENTER key
    DCGUI_BROWSE_EDITACROSS     Move to next column after ENTER key
    DCGUI_BROWSE_EDITDOWN       Move to next row after ENTER key
    DCGUI_BROWSE_EDITACROSSDOWN Move to next column after ENTER key
                                and move to next row at end of column
   
   < bEditAction > is an optional code block that is evaluated before
   the cells are edited.  < bEditExit > is an optional code block that
   is evaluated after the cells are edited.  The browse object is
   passed as a parameter to < bEditAction > and < bEditExit >.
   
   INSERT < nInsertEvent > is an optional clause that enables the
   inserting of an element into the array and editing the cell
   items. < nInsertEvent > is a numeric value equivalent to an xbe*
   event or keyboard value which has been defined in APPEVENT.CH.
   For example, cell insertion will occur at the selected row of
   the browse when < nEditEvent > is equal to xbeK_INS and the browse
   is in focus and the INSERT key is pressed.  < bInsertAction > is an
   optional code block that is evaluated before a new element is
   inserted in the array.  < bInsertExit > is an optional code block
   that is evaluated after exiting the cell editor.  The Browse
   Object is passed as a parameter when evaluating < bInsertAction >
   and < bInsertExit >.  APPEND < nAppendEvent > is an additional optional
   clause that can only be used with the INSERT clause.  < nAppendEvent >
   is a numeric value equivalent to an xbe* event or keyboard value.
   This event forces the insertion of the new element at the end of
   the array rather than at the selected row.
   
   DELETE < nDeleteEvent > is an optional clause that enables the
   deleting the current selected element (row) of an array or the
   currently selected record. < nDeleteEvent > is a numeric value
   equivalent to an xbe* event or keyboard value which has been
   defined in APPEVENT.CH.  For example, cell deletion will occur
   at the selected row of the browse when < nEditEvent > is equal to
   xbeK_DEL and the browse is in focus and the DELETE key is pressed.
   < bDeleteAction > is an optional code-block that is evaluated before
   the element is deleted.  < bDeleteExit > is an optional code block
   that is evaluated after the element is deleted.  The Browse Object
   is passed as a parameter when evaluating < bDeleteAction > and
   < bDeleteExit >.
   
   HANDLER < cEventHandler > is the name of a Function which points
   to a custom event handler when cell editing.  The cell editor
   uses it's own, default event handler to manage the objects
   during cell editing.  The default event handler makes a call
   to the custom event handler before processing it's default
   events. The custom event handler uses Appevent() to get
   information on the current event and passes the following
   parameters:
   
    1. nEvent   - The event type.
    2. mp1      - The first event parameter.
    3. mp2      - The second event parameter.
    4. oXbp     - A pointer to the object creating the event.
    5. oDlg     - A pointer to the main dialogue object.
    6. aGetlist - A pointer to the GetList array.
    7. aRef     - A pointer to an optional Reference array.
   
    The Function should look like this:
   
    STATIC FUNCTION MyHandler ( nEvent, mp1, mp2, oXbp, oDlg,
                                aGetlist, aRef )
   
    /* custom code */
   
    RETURN DCGUI_NONE
   
   The function must return a numeric value which controls the
   behavior of the event loop as follows:
   
    Return Value   Behavior
    ------------   --------------------------------------------
    DCGUI_NONE     Continue processing the event
    DCGUI_IGNORE   Ignore event
    DCGUI_CLEAR    Ignore event and clear all events from queue
    DCGUI_EXIT     Exit the Cell editor
   
   REFERENCE < aRef > is any array to pass to the custom event handler.
   Programming dialogue systems that must manipulate many variables
   is much simpler if all the variables are placed into a single
   array and then passed to the dialogue system and its event
   handler.
   
   INTO < uVar > is the name of a numeric variable to store the current
   record pointer.
   
   FONT < cFont > is a character string defining an optional font.
   The font string must conform to the Xbase++ standard, ie.
   "10.Courier.Bold". It may also be a font object or a code block
   that returns a character string or a font object to later
   refresh with DC_GetRefresh().
   
   PRESENTATION < aPres > is a two-dimensional array. If specified,
   this contains presentation parameters for the Browse object.
   The first column of the array must contain #define constants
   from the XBP.CH file starting with the prefix XBP_PP_. These
   constants define the presentation parameters that can be set
   for the object and include colors and fonts. The second column
   of the array in < aPres > contains the value for each setting.
   These are also generally set using #define constants from the
   GRA.CH file.
   
   CURSORMODE < nCursorMode > determines the browse cursor to be
   displayed by the Browse object. #define constants from XBP.CH
   must be used for this mode:
   
    Constant            Description
   
    XBPBRW_CURSOR_NONE  No visible cursor
    XBPBRW_CURSOR_CELL  Cell cursor (default)
    XBPBRW_CURSOR_ROW   Row cursor
   
   PREEVAL < bPreEval > is a code block to be evaluated by the GUI
   reader before the Xbase Parts object is created.  The object is
   passed to the code block.
   
   EVAL < bEval > is a code block to be evaluated by the GUI reader
   after the Xbase Parts object is created.  The object is passed
   to the code block.
   
   CARGO < xCargo > is any kind of data you wish to to add to the
   :cargo container for this object.  The cargo may be accessed
   at any time via the :cargo exported variable, however it will not
   be stored in the same manner it is entered.  The :cargo container
   of DCDIALOG objects is an array of at least three elements:
   
    [1] - A numeric value that is a pointer to the Getlist array
          for this object.
   
    [2] - A pointer to the GetList array.
   
    [3] - The value of < xCargo >.
   
    [4] and up - optional values added by the GUI reader.
   
   COLOR < bncFGc >, < ncBGc > are foreground and background colors.
   They may be character strings representing valid text-based
   colors supported by SetColor() or they may be numeric constants
   which begin with either the prefix GRA_CLR_ or the prefix
   XBPSYSCLR_ as defined in GRA.CH or XBP.CH. IF < bncFGc > is a
   code block is must return a 2-element array containing a
   foreground and background color.
   
   ID < cId > is a unique identifier for this object.  This ID is used
   with functions like DC_GETORIGUPDATED() to determine the status
   of a get object.
   
   MESSAGE < bcMsg > is the message you want to display in the
   message area of the dialogue screen defined by the DCMESSAGEBOX
   command when the object is in focus.  Optionally, INTO < oMsgBox >
   will designate which message box to display the message into.
   If the INTO clause is not used, then the last message box in the
   GetList is the default.  If < bcMsg > is a code-block, it must
   return a character string.
   
   HIDE < bHide > is a code block that is evaluated in the event loop.
   This code block must return a logical value.  If the value
   returned is .TRUE. then the object will be hidden from view.  If
   the value returned is .FALSE. then the object will be displayed.
   
   WHEN < bWhen > is a code block that is evaluated in the event loop.
   This code block must return a logical value.  If the value
   returned is .FALSE. then the object will be disabled and grayed.
   If the value returned is .TRUE. then the object will be enabled.
   
   ACCELKEY < anAccel > is a numeric "hot-key" assignment that will set
   focus to the checkbox object when the hot-key is pressed.  The key
   must be a valid key with the prefix xbeK_*.  These keys are
   defined in APPEVENT.CH.  < anAccel > may also be an array of numeric
   values to assign more than one key to the object.
   
   GOTFOCUS < bGotFocus > is a code block that is evaluated when this
   object receives input focus.  < bGotFocus > := {|uNIL1,uNIL2,self|...}
   
   LOSTFOCUS < bLostFocus > is a code block that is evaluated when this
   object loses input focus. < bLostFocus > := {|uNIL1,uNIL2,self|...}
   
   TABSTOP will cause the object (Xbase Part) to be set when using
   the Tab key.  Note: When logical groups are defined in a dialog
   using TABGROUP < nTabGroup >, TABSTOP is usually set to .T. (true)
   for the first dialog element in the group.  This allows the first
   dialog element of a group to be activated using the Tab key.
   
   NOTABSTOP will cause the object (Xbase Part) to be ignored when
   using the Tab key. This clause is needed only to override any
   default setting of TabStop by the DCGETOPTIONS [TABSTOP] command.
   
   NOVSCROLL will suppress the vertical scroll bar.
   
   NOHSCROLL will suppress the horizontal scroll bar.
   
   TABGROUP < nTabGroup > allows objects (Xbase Parts) that are created
   immediately after one another in the GetList to be combined into
   logical groups. This allows the user to navigate within a dialog
   from group to group by pressing the Tab key.  Within a group of
   dialog elements navigation is performed using the cursor keys.
   
   Only constants defined in the XBP.CH file can be used as values
   for this instance variable.  The following table lists the
   available constants:
   
   #define constants for < nTabGroup >:
   
    Constant             Description
   
    XBP_NO_GROUP     *)  Dialog element does not belong to a group
    XBP_BEGIN_GROUP      Dialog element is the first in a group
                         (this begins the definition of the group)
    XBP_WITHIN_GROUP     Dialog element is within a group
    XBP_END_GROUP        Dialog element is the last in a group
                         (this ends the definition of the group)
   
   *) Default value
   
   
   VISIBLE determines whether the object is visible immediately after
   the call to the method :create() . By default the object follows
   the VISIBLE clause of the DCGETOPTIONS command.  Use the
   INVISIBLE clause to override the VISIBLE clause of DCGETOPTIONS
   
   GROUP < cGroup > is a "group" name (case-sensitive) to assign to
   this GetList object.  Assignment to a group makes it possible to
   perform operations only on GetList items which are members of a
   specified group, using functions such as DC_GetRefresh() or
   DC_ReadGui().
   
   TITLE < cTitle > is a title to assign to this object.  The title
   is not displayed on the screen but is simply a description of the
   get object which is saved in the GetList.
   

Description:

    The command @..DCQUICKBROWSE creates a new QuickBrowse object
    and adds the object to the array named GETLIST which is later
    processed by the DC_READGUI() function or by the DCREAD GUI
    command.  The GETLIST array must be first declared and
    initialized to the value of {}.  The command DCREAD GUI activates
    the edit mode for all objects found in the GetList array.
    A Getlist object remains stored as long as it is referenced
    in an array or by a variable.  The commands CLEAR and
    CLEAR GETS assign an empty array to the GetList variable.
    This also occurs after the completion of the DCREAD GUI command
    if it is called without the SAVE option, causing all Get
    objects referenced by the GetList array to be released.
   
    @..DCQUICKBROWSE objects can be combined with any objects that
    that use the DCDIALOG system, such as DCBROWSECOL,  @..DCSAY..GET,
    @..DCRADIO, @..DCPUSHBUTTON or @..DCMULTILINE.
   

Notes:

    The browse object created by @ DCQUICKBROWSE is an object of the
    XbpQuickBrowse() class, therefore it can be manipulated with
    any iVar or method supported by XbpQuickBrowse().
   

Examples:

   * Example 1 - Browsing a Database
   
   FUNCTION XTest_1()
   
   LOCAL GetList := {}, oBrowse, aFields, aHeaders, aPres
   
   SET DEFA TO ..\XDOC
   USE EXPRESS VIA FOXCDX EXCLUSIVE ALIAS 'XDOC'
   SET INDEX TO EXPRESS.CDX
   OrdSetFocus('COMMAND')
   SET DEFA TO
   
   aFields := { 'XDOC->COMMAND', ;
                'XDOC->SHORT', ;
                'XDOC->TYPE', ;
                'XDOC->MODULE', ;
                'XDOC->SEE_ALSO'}
   
   aHeaders := { 'Command','Short Description','Type','Module','See Also'}
   
   @ 1,1 DCQUICKBROWSE ALIAS 'XDOC' SIZE 70,20 ;
      OBJECT oBrowse ;
      FIELDS aFields HEADERS aHeaders ;
      STYLE XBP_STYLE_FANCY ;
      CURSORMODE XBPBRW_CURSOR_CELL
   
   DCREAD GUI FIT ADDBUTTONS ;
      TITLE 'Quick-Browsing a Database'
   
   RETURN nil
   
   
   * Example 2 - browsing an array (method 1)
   
   FUNCTION XTest_2()
   
   LOCAL GetList := {}, oBrowse, aDirectory := Directory(), aHeaders, ;
         aColumns, aColType, aColAlign, aColWidth
   
   aColumns :=     { ;
         F_NAME          , ; // Display files as icons
         F_NAME          , ; // Display file names as text
         F_SIZE          , ;
         F_WRITE_DATE    , ;
         F_WRITE_TIME    , ;
         F_CREATION_DATE , ;
         F_CREATION_TIME   }
   
   aHeaders :=     { ;
         " "             , ;
         "File name    " , ;
         "    File size" , ;
         "  Access date" , ;
         "  Access time" , ;
         "Creation date" , ;
         "Creation time"   }
   
   aColType :=     { ;
         { 1, XBPCOL_TYPE_FILEMINIICON }, ;
         nil, ;
         nil, ;
         nil, ;
         nil, ;
         nil, ;
         nil  }
   
   aColWidth :=    { ;
         32, ;
         nil, ;
         nil, ;
         nil, ;
         nil, ;
         nil, ;
         nil }
   
   aColAlign :=    { ;
      XBPALIGN_VCENTER + XBPALIGN_HCENTER, ;
      XBPALIGN_RIGHT + XBPALIGN_VCENTER, ;
      XBPALIGN_RIGHT + XBPALIGN_VCENTER, ;
      XBPALIGN_RIGHT + XBPALIGN_VCENTER, ;
      XBPALIGN_RIGHT + XBPALIGN_VCENTER, ;
      XBPALIGN_RIGHT + XBPALIGN_VCENTER, ;
      XBPALIGN_RIGHT + XBPALIGN_VCENTER  }
   
   @ 1,1 DCQUICKBROWSE DATA aDirectory SIZE 60,20 ;
      OBJECT oBrowse ;
      COLUMNS aColumns ;
      HEADERS aHeaders ;
      COLTYPE aColType ;
      COLWIDTH aColWidth ;
      COLALIGN aColAlign
   
   DCREAD GUI FIT ADDBUTTONS ;
      TITLE 'Quick-Browsing an Array'
   
   RETURN nil
   
   
   * Example 2 - browsing an array (method 2)
   
   FUNCTION XTest_3()
   
   LOCAL GetList := {}, oBrowse, aDirectory := Directory(), aHeaders, ;
         aColumns, aColType, aColAlign, aColWidth
   
   aColumns :=     { ;
         F_NAME          , ; // Display files as icons
         F_NAME          , ; // Display file names as text
         F_SIZE          , ;
         F_WRITE_DATE    , ;
         F_WRITE_TIME    , ;
         F_CREATION_DATE , ;
         F_CREATION_TIME   }
   
   aHeaders :=     { ;
         " "             , ;
         "File name    " , ;
         "    File size" , ;
         "  Access date" , ;
         "  Access time" , ;
         "Creation date" , ;
         "Creation time"   }
   
   aColType :=     { ;
         { 1, XBPCOL_TYPE_FILEMINIICON }, ;
         nil, ;
         nil, ;
         nil, ;
         nil, ;
         nil, ;
         nil  }
   
   aColWidth :=    { ;
         32, ;
         nil, ;
         nil, ;
         nil, ;
         nil, ;
         nil, ;
         nil }
   
   aColAlign :=    { ;
      XBPALIGN_VCENTER + XBPALIGN_HCENTER, ;
      XBPALIGN_RIGHT + XBPALIGN_VCENTER, ;
      XBPALIGN_RIGHT + XBPALIGN_VCENTER, ;
      XBPALIGN_RIGHT + XBPALIGN_VCENTER, ;
      XBPALIGN_RIGHT + XBPALIGN_VCENTER, ;
      XBPALIGN_RIGHT + XBPALIGN_VCENTER, ;
      XBPALIGN_RIGHT + XBPALIGN_VCENTER  }
   
   @ 1,1 DCQUICKBROWSE DATA aDirectory SIZE 60,20 ;
      OBJECT oBrowse
   
   FOR i := 1 TO 7
     DCBROWSECOL PARENT oBrowse ;
        ELEMENT aColumns[i] ;
        HEADER aHeader[i] ;
        WIDTH aColWidth[i] ;
        TYPE aColType[i] ;
        ALIGN aColAlign[i]
   NEXT
   
   DCREAD GUI FIT ADDBUTTONS ;
      TITLE 'Quick-Browsing an Array'
   
   RETURN nil
   

Source/Library:

  DCDIALOG.CH

See Also:

   @ DCBROWSE
   DCBROWSECOL



@ DCRADIOBUTTON

Create a RADIO BUTTON object for displaying with GUI reader

Syntax:

   @ < nRow >,< nCol > DCRADIO < uVar > ;
       [VALUE < xVal >] ;
       [ACTION < bAction >] ;
       [PARENT < oParent >] ;
       [PARENTID < cParentId >] ;
       [PROMPT < bcPrompt >] ;
       [DELIMVAR < cDelim >] ;
       [OBJECT < oObject >] ;
       [COLOR < bncFgC > [,< ncBgC >] ] ;
       [FONT < bocFont >] ;
       [CARGO < xCargo >] ;
       [WHEN < bWhen >] ;
       [HIDE < bHide >] ;
       [EDITPROTECT < bProtect >] ;
       [SIZE < nWidth > [,< nHeight >]] ;
       [PRESENTATION < aPres >] ;
       [PIXEL] ;
       [TOOLTIP < bcToolTip >] ;
       [MESSAGE < bcMsg > [INTO < oMsgBox >]] ;
       [CURSOR < naCursor >] ;
       [PREEVAL < bPreEval >] ;
       [EVAL < bEval,... >] ;
       [RELATIVE < oRel >] ;
       [ID < cId >] ;
       [TITLE < cTitle >] ;
       [ACCELKEY < anAccel >] ;
       [GOTFOCUS < bGotFocus >] ;
       [LOSTFOCUS < bLostFocus >] ;
       [TABSTOP]  ;
       [NOTABSTOP];
       [TABGROUP < nTabGroup >] ;
       [VISIBLE] ;
       [INVISIBLE] ;
       [GROUP < cGroup >] ;
       [NAME < cVarName >]
   

Arguments:

   GUI applications:
   
   < nRow > and < nCol > are the row and column of the screen.
   Coordinates are always relative to position 0,0 ie. Top,Left
   of the parent object, unless the RELATIVE argument is used.
   If no parent is assigned, then the parent is the Dialog box.
   IF the PIXEL option is set to .TRUE. in DCGETOPTIONS, then
   the numbers are in pixels otherwise they are in standard
   text-based coordinates.  You can also force the pixel
   mode by including PIXEL as a command argument.
   
   HTML applications:
   
   < nRow > and < nCol > are the row number and column number of
   the table if the parent of this object is a DCTABLE. The
   text will be inserted in the cell of the table defined by
   the row/column.
   
   < uVar > is the variable to GET.  This may be a variable
   of any type except an object or array. It must not be a macro.
   The < uVar > is automatically anchored via a Get-Set codeblock
   created by DC_GetAnchorCB() unless < uVar > is a custom Get-Set
   code block.  Macros may be used in a custom Get-Set code block.
   
   VALUE < xValue > is the value to store into the < uVar >
   variable when this object is selected.
   
   RELATIVE < oRel > is an optional object in the Getlist which
   determines the start coordinates of this object.  If this
   option is used, then the < nSrow >, < nSCol > coordinates are
   relative to the starting coordinates of < oRel > rather than
   the parent object.
   
   DELIMVAR < cDelim > is for text-based screens only and is
   ignored when DC_GUI() is .TRUE.  This is a three character
   sequence to use for the radio button - the default is (*).
   
   PROMPT < bcPrompt > is the prompt to display immediately to
   the right of the radio button.  It may be a character string or
   a code block that returns a character string.
   
   ACTION < bAction > is a code block to evaluate when the
   radio button is selected.
   
   SIZE < nWidth >,< nHeight > is the size of the prompt string.
   NOTE: If a < nWidth > parameter is not used then the prompt will
   be automatically sized to fit the string.  Use of the
   :setCaption() method may produce undesirable results if the
   caption width is not a sufficient length.
   
   WHEN < bWhen > is a code block that is evaluated in the event loop.
   This code block must return a logical value.  If the value
   returned is .FALSE. then the object will be disabled and grayed.
   If the value returned is .TRUE. then the object will be enabled.
   The object is passed as a parameter to the code block.
   
   HIDE < bHide > is a code block that is evaluated in the event loop.
   This code block must return a logical value.  If the value
   returned is .TRUE. then the object will be hidden from view.  If
   the value returned is .FALSE. then the object will be displayed.
   The object is passed as a parameter to the code block.
   
   EDITPROTECT < bProtect > is an optional condition tested during the
   execution of the GUI gets by the DCREAD GUI command, before the
   object receives input focus (before it is activated). When the
   condition returns the value .T. (true), the object receives the
   input focus.  Otherwise, it is skipped. < bProtect > is a code
   block that must return a logical value when evaluated. The code
   block is evaluated prior to the object receiving input focus.
   This clause behaves similar to the WHEN clause with the exception
   that the object is not disabled (grayed out).  The object is
   passed as a parameter to the code block.
   
   PARENT < oParent > is the name of the variable that was assigned to
   the parent object for this object.  Only use this clause if you
   are placing this object onto another dialogue object.  If this
   argument is not passed then the parent will be the object set
   with the DCSETPARENT command.
   
   PARENTID < cParentID > may be used in lieu of the PARENT < oParent >
   clause.  This identifies the ID of the parent instead of the
   parent's object variable name.
   
   OBJECT < oObject > is the name of a memory variable to store this
   object after is is created.
   
   FONT < cFont > is a character string defining an optional font.
   The font string must conform to the Xbase++ standard, ie.
   "10.Courier.Bold". It may also be a font object or a code block
   that returns a character string or a font object to later
   refresh with DC_GetRefresh().
   
   PRESENTATION < aPres > is a two-dimensional array. If specified,
   this contains presentation parameters for the Radio object.
   The first column of the array must contain #define constants
   from the XBP.CH file starting with the prefix XBP_PP_. These
   constants define the presentation parameters that can be set
   for the object and include colors and fonts. The second column
   of the array in < aPres > contains the value for each setting.
   These are also generally set using #define constants from the
   GRA.CH file.
   
   TOOLTIP < bcToolTip > is a character string which will display
   as a "Tool Tip" next to the object when the cursor is passed
   over the object. A semi-colon within the text indicates a new
   line.  If < bcToolTip > is a code-block, it must return a character
   string.  NOTE: The Tooltip painting method is run in another
   thread, therefore the codeblock should not run code that points
   to the current work area.  It may however, contain local, public
   or private variables.
   
   MESSAGE < bcMsg > is the message you want to display in the
   message area of the dialogue screen defined by the DCMESSAGEBOX
   command when the object is in focus.  Optionally, INTO < oMsgBox >
   will designate which message box to display the message into.
   If the INTO clause is not used, then the last message box in the
   GetList is the default. < oMsgBox > may also be any object that
   supports the :setCaption() method.If < bcMsg > is a code-block,
   it must return a character string.
   
   CURSOR < naCursor > may be either a numeric value or an array of
   3 elements which defines an optional mouse pointer to use for
   this object.  System mouse pointers start with
   XBPWINDOW_POINTERTYPE_ and are defined in XPB.CH.  The default
   pointer is XBPWINDOW_POINTERTYPE_POINTER.  < naCursor > may be a
   numeric resource ID that points to a Bit-Map that has been
   compiled with the resource compiler and linked to the .EXE.
   < naCursor > may be a 3-element array described as follows:
   
     Element  Type  Description
     -------  ---- ---------------------------------------------
       [1]      C   Optional name of .DLL containing the pointer
                    resource.
   
       [2]      N   The numeric resource ID of the pointer.  If
                    element 1 is a NIL, then this resource must be
                    linked into the .EXE.
   
       [3]      N   The type of resource as defined in XBP.CH.
   
   COLOR < ncFGc >, < ncBGc > are foreground and background colors.
   They may be character strings representing valid text-based
   colors supported by SetColor() or they may be numeric constants
   which begin with either the prefix GRA_CLR_ or the prefix
   XBPSYSCLR_ as defined in GRA.CH or XBP.CH. If < bncFGc > is a
   code block is must return a 2-element array containing a
   foreground and background color.
   
   CARGO < xCargo > is any kind of data you wish to to add to the
   :cargo container for this object.  The cargo may be accessed
   at any time via the :cargo exported variable, however it will not
   be stored in the same manner it is entered.  The :cargo container
   of DCDIALOG objects is an array of at least three elements:
   
    [1] - A numeric value that is a pointer to the Getlist array
          for this object.
   
    [2] - A pointer to the GetList array.
   
    [3] - The value of < xCargo >.
   
    [4] and up - optional values added by the GUI reader.
   
   ID < cId > is a unique identifier for this object.  This ID is used
   with functions like DC_GETORIGUPDATED() to determine the status
   of a get object.
   
   TITLE < cTitle > is a title to assign to this object.  The title
   is not displayed on the screen but is simply a description of the
   get object which is saved in the GetList.
   
   ACCELKEY < anAccel > is a numeric "hot-key" assignment that will set
   focus to the checkbox object when the hot-key is pressed.  The key
   must be a valid key with the prefix xbeK_*.  These keys are
   defined in APPEVENT.CH.  < anAccel > may also be an array of numeric
   values to assign more than one key to the object.
   
   GOTFOCUS < bGotFocus > is a code block that is evaluated when this
   object receives input focus.  < bGotFocus > := {|uNIL1,uNIL2,self|...}
   
   LOSTFOCUS < bLostFocus > is a code block that is evaluated when this
   object loses input focus.  < bLostFocus > := {|uNIL1,uNIL2,self|...}
   
   TABSTOP will cause the object (Xbase Part) to be set when using
   the Tab key.  Note: When logical groups are defined in a dialog
   using TABGROUP < nTabGroup >, TABSTOP is usually set to .T. (true)
   for the first dialog element in the group.  This allows the first
   dialog element of a group to be activated using the Tab key.
   
   NOTABSTOP will cause the object (Xbase Part) to be ignored when
   using the Tab key. This clause is needed only to override any
   default setting of TabStop by the DCGETOPTIONS [TABSTOP] command.
   
   TABGROUP < nTabGroup > allows objects (Xbase Parts) that are created
   immediately after one another in the GetList to be combined into
   logical groups. This allows the user to navigate within a dialog
   from group to group by pressing the Tab key.  Within a group of
   dialog elements navigation is performed using the cursor keys.
   
   Only constants defined in the XBP.CH file can be used as values
   for this instance variable.  The following table lists the
   available constants:
   
   #define constants for < nTabGroup >:
   
    Constant             Description
   
    XBP_NO_GROUP     *)  Dialog element does not belong to a group
    XBP_BEGIN_GROUP      Dialog element is the first in a group
                         (this begins the definition of the group)
    XBP_WITHIN_GROUP     Dialog element is within a group
    XBP_END_GROUP        Dialog element is the last in a group
                         (this ends the definition of the group)
   
   *) Default value
   
   GROUP < cGroup > is a "group" name (case-sensitive) to assign to
   this GetList object.  Assignment to a group makes it possible to
   perform operations only on GetList items which are members of a
   specified group, using functions such as DC_GetRefresh() or
   DC_ReadGui().
   
   VISIBLE determines whether the object is visible immediately after
   the call to the method :create() . By default the object follows
   the VISIBLE clause of the DCGETOPTIONS command.  Use the
   INVISIBLE clause to override the VISIBLE clause of DCGETOPTIONS.
   
   PREEVAL < bPreEval > is a code block to be evaluated by the GUI
   reader before the Xbase Parts object is created.  The object is
   passed to the code block.
   
   EVAL < bEval > is a code block to be evaluated by the GUI reader
   after the Xbase Parts object is created.  The object is passed
   to the code block.
   
   NAME < cVarName > is the variable name to assign to the GET
   object (for HTML based applications.)
   

Description:

    The command @..DCRADIOBUTTON creates a new Radio Button
    definition and adds it to the array named GETLIST which is later
    processed by the DC_Read*() functions or by the DCREAD *
    commands.  The GETLIST array must be first declared and
    initialized to the value of {}.
   
    The command DCREAD GUI creates the DC_Xbp*() objects and
    activates the edit mode for all definitions found in the
    GetList array.
   
    The command DCREAD HTML creates the DC_Html*() objects and
    writes the HTML source code.
   
    A Getlist object remains stored as long as it is referenced
    in an array or by a variable.  The commands CLEAR and
    CLEAR GETS assign an empty array to the GetList variable.
    This also occurs after the completion of the DCREAD command
    if it is called without the SAVE option, causing all Get
    objects referenced by the GetList array to be released.
   
    @..DCRADIOBUTTON objects can be combined with any objects that
    that use the DCDIALOG system, such as @..DCSAY..GET,
    @..DCCHECKBOX, @..DCPUSHBUTTON or @..DCTABPAGE.
   

Exported Instance Variables:

   

Methods:

   

Notes:

    The object created by @ DCRADIOBUTTON is an object of the
    XbpRadioButton() class, therefore it can be manipulated with
    any iVar or method supported by XbpRadioButton().
   
    Radio Button objects are grouped by their parent.  For
    radio buttons to work properly each group of related
    radio buttons must have a common parent object.
   

Examples:

   -- Example of GUI radio buttons --
   
   #include "dcdialog.ch"
   
   PROCEDURE Xtest()
   
   LOCAL GetList := {}, cOption
   
   cOption := 'P'
   
   @ 5,10 DCRADIO cOption PROMPT 'Save to Dictionary' VALUE 'D'
   @ 5,40 DCRADIO cOption PROMPT 'Save to Source Code' VALUE 'S'
   @ 7,10 DCRADIO cOption PROMPT 'Make a Backup file' VALUE 'B'
   @ 7,40 DCRADIO cOption PROMPT 'Pack the File' VALUE 'P'
   
   DCREAD GUI ;
      TITLE 'Radio Button Demo' ;
      ADDBUTTONS ;
      FIT
   
   RETURN
   
   
   -- Example of HTML radio buttons --
   
   #include "dcdialog.ch"
   #include "dchtml.ch"
   
   FUNCTION Xtest()
   
   LOCAL i, GetList[0], oForm, cHtml, oTable, cProfession := 'Doctor'
   
   aProfession := { 'Democrat','Republican','HandyMan','Doctor', ;
                    'Plumber','Programmer' }
   
   DCFORM OBJECT oForm
   DCTABLE OBJECT oTable PARENT oForm ROWS Len(aProfession) COLUMNS 1
   
   FOR i := 1 TO Len(aProfession)
     @ i,1 DCRADIOBUTTON cProfession VALUE aProfession[i] ;
           PROMPT aProfession[i] PARENT oTable
   NEXT
   
   DCREAD HTML TO cHtml
   
   MemoWrit('TEST.HTM',cHtml)
   
   RETURN cHtml
   

Source/Library:

  DCDIALOG.CH

See Also:

   dc_htmlradiobutton()



@ DCRIGHTPRINT SAY

Send right-justified text to printer

Syntax:

   [ @ < nRow >, < nCol > ] DCRIGHTPRINT SAY < uText > ;
      [PICTURE < cPicture >] ;
      [FONT < ocFont >] ;
      [PRINTER < oPrinter >] ;
      [FIXED] ;
      [PIXEL] ;
      [ATTRIBUTE < aAttr >]
   

Arguments:

   < uText > is any variable.
   
   < nRow >, < nCol > are the page coordinates to print the
   text.  These are row/column text coordinates unless the
   PIXEL parameter was used in the DCPRINT ON command or the PIXEL
   argument is passed to the @..DCPRINT SAY command.
   
   FONT < ocFont > is the font to use.  This may be a font object or
   a character string containing the font compound name.  If no
   font clause is used, then the font selected by the DCPRINT FONT
   clause will be the default.
   
    NOTE: To print with UNDERSCORE, use the word "Underscore" in
          the FONT clause. ex: "12.Arial Bold Underscore".
   
   PICTURE < cPicture > is any picture clause that conforms to the
   specification defined in the Xbase++ documentation for the
   TRANSFORM() function.
   
   FIXED will print each character of the string on the grid
   defined by the SIZE command of the DCPRINT ON command.  FIXED
   should be used for numeric columns and strings used as heading
   separators like '-------'.
   
   PRINTER < oPrinter > is the printer object returned by the
   DCPRINT ON command or the DC_Printer() class.  If this clause
   is not used then the printer object referenced by
   DC_PrinterObject() is the default.
   
   ATTRIBUTE < aAttr > is an array of attributes that meets the
   specification for string attributes such as color, mixmode,
   alignment, etc.
   
   < aAttr > := Array( GRA_AS_COUNT )
   
   < aAttr > is an array whose elements contain the attributes for
   character strings drawn by the function GraStringAt().
   
   #define constants of the attribute array for character strings.
     These contants are defined in GRA.CH.
   
    Array element       #define | value     Default value
   
    GRA_AS_COLOR        GRA_CLR_*           GRA_CLR_NEUTRAL
    GRA_AS_BACKCOLOR    GRA_CLR_*           GRA_CLR_BACKGROUND
    GRA_AS_MIXMODE      GRA_FGMIX_*         GRA_FGMIX_OVERPAINT
    GRA_AS_BGMIXMODE    GRA_BGMIX_*         GRA_BGMIX_LEAVEALONE
    GRA_AS_BOX          { nXsize, nYsize }  dependent on output device
    GRA_AS_ANGLE        { nX, nY }          { 1, 0 }
    GRA_AS_SHEAR        { nX, nY }          { 0, 1 }
   
    GRA_AS_DIRECTION    GRA_CHDIRN_*        GRA_CHDIRN_LEFTRIGHT
    GRA_AS_HORIZALIGN   GRA_HALIGN_*        GRA_HALIGN_LEFT
    GRA_AS_VERTALIGN    GRA_VALIGN_*        GRA_VALIGN_BASE
    GRA_AS_EXTRA        nExtra              0
    GRA_AS_BREAK_EXTRA  nBreakExtra         0
   

Description:

    @..DCRIGHTPRINT SAY prints text at a specified row and column
    with the text right justified.
   

Notes:

    The @..DCPRINT SAY command uses the :AtSay() method
    of the printer object.  This method looks at the current
    ::nPage instance variable and compares it to the ::nFrom
    value and the ::nTo value.  If the current page is outside
    the range selected by the user, then no output will be sent
    to the printer.
   

Examples:

   PROCEDURE XTest()
   
   LOCAL GetList := {}, oBrowse, lDataToolTips := .f., GetOptions
   
   USE COLLECT VIA 'DBFNTX'
   
   @ 0,0 DCBROWSE oBrowse SIZE 60,13 PRESENTATION DC_BrowPres() FIT
   
   DCBROWSECOL FIELD COLLECT->descrip WIDTH 10 PARENT oBrowse ;
      TOOLTIP 'Description' HEADER "Description" DATATOOLTIP {||lDataToolTips}
   
   DCBROWSECOL FIELD COLLECT->type PARENT oBrowse ;
      TOOLTIP 'Type' HEADER "Type"
   
   DCBROWSECOL FIELD COLLECT->memo WIDTH 20 PARENT oBrowse ;
      TOOLTIP 'Memo' HEADER "Memo"  DATATOOLTIP {||lDataToolTips}
   
   DCBROWSECOL FIELD COLLECT->bitmap1 WIDTH 7 PARENT oBrowse ;
      TOOLTIP 'BitMap 1' HEADER "BitMap 1"  ;
      DATATOOLTIP {||lDataToolTips} TIPBLOCK {||_XSample_152(COLLECT->bitmap1)}
   
   DCBROWSECOL FIELD COLLECT->bitmap2 WIDTH 7 PARENT oBrowse ;
      TOOLTIP 'BitMap 1' HEADER "BitMap 2"  ;
      DATATOOLTIP {||lDataToolTips} TIPBLOCK {||_XSample_152(COLLECT->bitmap2)}
   
   @ 14,0 DCCHECKBOX lDataToolTips PROMPT 'Show DataArea Tooltips'
   
   DCGETOPTIONS TOOLTIPCOLOR GRA_CLR_BLACK, GRA_CLR_CYAN
   
   DCREAD GUI FIT MODAL ADDBUTTONS TITLE 'Data Area ToolTips' ;
      OPTIONS GetOptions
   
   CLOSE ALL
   
   RETURN nil
   

Source/Library:

  DCPRINT.CH

See Also:

   dc_printer()
   @ DCPRINT SAY



@ DCSAY GET

Create a SAY..GET object for displaying with the text/GUI reader

Syntax:

   @ < nSayRow >,< nSayCol > DCSAY < bcText > ;
       [GET < uVar >] ;
       [SAYVAR < uSayVar >], ;
       [GETPOS < nGetRow > [,< nGetCol >] ] ;
       [DATALINK < bLink >] ;
       [SAYCOLOR < bncSayFgC >,[< ncSayBgC >] ] ;
       [GETCOLOR < bncGetFgC >,[< ncGetBgC >] ] ;
     * [SAYSIZE < nSayWidth > [,< nSayHeight >]] ;
     * [GETSIZE < nGetWidth > [,< nGetHeight >]] ;
       [SAYFONT < bocSayFont >] ;
       [GETFONT < bocGetFont >] ;
       [PARENT < oParent >] ;
       [PARENTID < cParentId >] ;
       [MESSAGE < bcMsg > [INTO < oMsgBox >]] ;
       [VALID < bValid >] ;
     * [UNREADABLE] ;
     * [CONFIRM] ;
     * [NOCONFIRM] ;
       [POPUP < bPopUp > ;
          [POPCAPTION < ncCaption] ;
          [POPFONT < cPopFont >] ;
          [POPWIDTH < nPopWidth >] ;
          [POPHEIGHT < nPopHeight >] ;
          [POPSTYLE < nPopStyle >] ;
          [POPKEY < anPopKey >] ;
          [POPTABSTOP] ;
          [POPGLOBAL] ] ;
          [POPTOOLTIP < bcPopToolTip >] ;
     * [PROPER ;
          [PROPOPTIONS < aPropOptions >]] ;
       [PASSWORD] ;
       [WHEN < bWhen >] ;
       [HIDE < bHide >] ;
     * [EDITPROTECT < bProtect >] ;
       [SAYOPTIONS < nSayOpt > | SAYRIGHT | SAYLEFT | SAYCENTER]  ;
       [HELPCODE < cHelp >] ;
     * [PICTURE < cPict >] ;
     * [PIXEL] ;
     * [SAYPRESENTATION < aSayPres >] ;
     * [GETPRESENTATION < aGetPres >] ;
       [SAYTOOLTIP < bcSayToolTip >] ;
       [GETTOOLTIP < bcGetToolTip >] ;
       [SAYOBJECT < oSayObject >] ;
       [GETOBJECT < oGetObject >] ;
     * [SAYCURSOR < naSayCursor >] ;
     * [GETCURSOR < naGetCursor >] ;
       [SAYCARGO < xSayCargo >] ;
       [GETCARGO < xGetCargo >] ;
       [SAYPREEVAL < bSayPreEval >] ;
       [GETPREEVAL < bGetPreEval >] ;
       [SAYEVAL < bSayEval,... >] ;
       [GETEVAL < bGetEval,... >] ;
       [RELATIVE < oRel >] ;
       [SAYID < cSayId >] ;
       [GETID < cGetId >] ;
       [SAYTITLE < cSayTitle >] ;
       [GETTITLE < cGetTitle >] ;
     * [ACCELKEY < anAccel >] ;
     * [GOTFOCUS < bGotFocus >] ;
     * [LOSTFOCUS < bLostFocus >] ;
     * [TABSTOP]  ;
     * [NOTABSTOP];
     * [TABGROUP < nTabGroup >] ;
     * [VISIBLE] ;
     * [INVISIBLE] ;
       [GROUP < cGroup >] ;
     * [KEYBLOCK < bKeyBlock >] ;
     * [COMBO ;
          [HEIGHT < nComboHeight >] ;
          [DATA < acbComboData >]        ;
          [FIELD < bField >] ;
          [ELEMENT < nElement >] ;
          [RETURN < bReturn >] ;
          [CAPTION < oncComboCaption >] ;
          [FONT < ocComboFont >] ;
          [HOTKEY < nComboHotKey >] ] ;
     * [GRASTRING] ;
       [NAME < cVarName >]
   

Arguments:

   GUI applications:
   
   < nSayRow > and < nSayCol > are the row and column of the screen.
   Coordinates are always relative to position 0,0 ie. Top,Left
   of the parent object, unless the RELATIVE < oRel > argument is
   used.  If no parent is assigned, then the parent is the Dialog
   box. IF the PIXEL option is set to .TRUE. in DCGETOPTIONS,
   then the numbers are in pixels otherwise they are in standard
   text-based coordinates.  You can also force the pixel
   mode by including PIXEL as a command argument.
   
   < nSayRow > may be assigned the value DCGUI_ROW.  This will paint
   the object at the same row as the previous object.  It is
   provided to emulate the Row() function in text-based applications.
   
   < nSayCol > may be assigned the value DCGUI_COL + < nOffset >.  This
   will paint the object immediately to the right of the previous
   object plus < nOffset > pixels.  It is provided to emulate the Col()
   function in text-based applications.
   
   HTML applications:
   
   < nRow > and < nCol > are the row number and column number of
   the table if the parent of this object is a DCTABLE. The
   text will be inserted in the cell of the table defined by
   the row/column.
   
   < bcText > is the text to display in front of the GET.  This may be
   a character string or a code-block which returns a character
   string.  If it is a code-block, it is refreshed with the function
   DC_GetRefresh().
   
   GET < uVar > is the variable to GET.  This may be a variable
   of any type except an object or array. It must not be a macro.
   The < uVar > is automatically anchored via a Get-Set codeblock
   created by DC_GetAnchorCB() unless < uVar > is a custom Get-Set
   code block.  Macros may be used in a custom Get-Set code block.
   
   SAYVAR < bcSayVar > is the name of a character-type variable
   or a Set Code Block which will may used to set the caption of
   the SAY text when the Get List is refreshed with DC_GetRefresh().
   
   DATALINK < bLink > is an optional code block that is evaluated
   every time Get/Set codeblock is evaluated, ie when the data
   is read from the < uVar > into the object except when using
   a user-defined Get/Set code block.
   
   RELATIVE < oRel > is an optional object in the Getlist which
   determines the start coordinates of this object.  If this
   option is used, then the < nSrow >, < nSCol > coordinates are
   relative to the starting coordinates of < oRel > rather than
   the parent object.
   
   GETPOS < nGetRow >, < nGetCol > are the "optional" coordinates
   of the GET.  If no argument is used, then the GET will be
   placed at the end of the SAY string.
   
   SAYCARGO < xCargo > is any kind of data you wish to to add to the
   :cargo container for the SAY object.
   
   GETCARGO < xCargo > is any kind of data you wish to to add to the
   :cargo container for the GET object.
   
   The cargo may be accessed at any time via the :cargo exported
   variable, however it will not be stored in the same manner it is
   entered.  The :cargo container of DCDIALOG objects is an array of
   at least three elements:
   
    [1] - A numeric value that is a pointer to the Getlist array
          for this object.
   
    [2] - A pointer to the GetList array.
   
    [3] - The value of < xCargo >.
   
    [4] and up - optional values added by the GUI reader.
   
   SAYSIZE < nSayWidth > [,< nSayHeight >]] is the size to allocate to
   the SAY string.  If the PIXEL option is set to .TRUE. in
   DCGETOPTIONS, then the size must be entered in pixels otherwise
   it must be entered in standard text length.  If no SAYSIZE
   argument is used, then the say will be automatically sized to
   the size established by the SAYSIZE option of the DCGETOPTIONS
   command.  SAYSIZE 0 will automatically size the SAY (XbpStatic)
   object to the size of the text taking into consideration the
   selected font.
   
   GETSIZE < nGetWidth > [,< nGetHeight >]] is the size to
   allocate to the GET variable.  If the PIXEL option is set to
   .TRUE. in DCGETOPTIONS, then the size must be entered in
   pixels otherwise it must be entered in standard text
   length.  If no GETSIZE argument is used or GETSIZE is ZERO, then
   the get will be automatically sized to the size established by
   transforming the contents of of the get variable to a string to
   determine the length of the get.   The default font for GETS in
   eXpress++ is 8.Courier because this provides the best user
   font for data-entry, so it is usually not necessary to use
   this option unless you are also using the GETFONT parameter.
   
   SAYFONT < bocSayFont > is a character string defining an optional
   font for the SAY text.  The font string must conform to the
   Xbase++ standard, ie. "10.Courier.Bold.  It may also be a font
   object or a code block that returns a character string or a
   font object to later refresh with DC_GetRefresh().
   
   GETFONT < bocGetFont > is a character string defining an optional
   font for the GET text.  The font string must conform to the
   Xbase++ standard, ie. "10.Courier.Bold".  The default is
   "8.Courier". It may also be a font object or a code block that
   returns a character string or a font object to later refresh
   with DC_GetRefresh().
   
   PARENT < oParent > is the name of the variable that was assigned to
   the parent object for this object.  Only use this clause if you
   are placing this object onto another dialogue object.  If this
   argument is not passed then the parent will be the object set
   with the DCSETPARENT command.
   
   PARENTID < cParentID > may be used in lieu of the PARENT < oParent >
   clause.  This identifies the ID of the parent instead of the
   parent's object variable name.
   
   MESSAGE < bcMsg > is the message you want to display in the
   message area of the dialogue screen defined by the DCMESSAGEBOX
   command when the object is in focus.  Optionally, INTO < oMsgBox >
   will designate which message box to display the message into.
   If the INTO clause is not used, then the last message box in the
   GetList is the default.  < oMsgBox > may also be any object that
   supports the :setCaption() method.  If < bcMsg > is a code-block,
   it must return a character string.
   
   PICTURE < cPict > is a character string specifying formatting
   options for the value of < VarName > during display and editing.
   
   WHEN < bWhen > is a code block that is evaluated in the event loop.
   This code block must return a logical value.  If the value
   returned is .FALSE. then the GET object will be disabled and
   grayed. If the value returned is .TRUE. then the object will be
   enabled. The object is passed as a parameter to the code block.
   
   HIDE < bHide > is a code block that is evaluated in the event loop.
   This code block must return a logical value.  If the value
   returned is .TRUE. then the object will be hidden from view.  If
   the value returned is .FALSE. then the object will be displayed.
   The object is passed as a parameter to the code block.
   
   EDITPROTECT < bProtect > is an optional condition tested during the
   execution of the GUI gets by the DCREAD GUI command, before the
   object receives input focus (before it is activated). When the
   condition returns the value .T. (true), the object receives the
   input focus.  Otherwise, it is skipped. < bProtect > is a code
   block that must return a logical value when evaluated. The code
   block is evaluated prior to the object receiving input focus.
   This clause behaves similar to the WHEN clause with the exception
   that the object is not disabled (grayed out).  The object is
   passed as a parameter to the code block.
   
   The UNREADABLE clause will cause text to be displayed as asterisks
   (*) for inputting sensitive data such as passwords.
   
   The NOCONFIRM clause will cause the GET to be exited when the
   cursor reaches the end of the buffer during keyboard entry.
   Normally, the GET can be exited only by pressing the ENTER key,
   TAB key, UP key, DOWN key or clicked on another object.  This
   overrides the setting of CONFIRM in DCGETOPTIONS.
   
   The CONFIRM clause will cause the GET to be exited by pressing
   the ENTER key.  This overrides the setting of NOCONFIRM in
   DCGETOPTIONS.
   
   VALID < bValid > is an optional condition tested during the
   execution of the GUI gets by the READ command before a Get
   object loses input focus (before it is deactivated).  When
   the condition returns the value .T. (true), the Get object
   loses the input focus.  Otherwise, it remains active. < bValid >
   is a code block that must return a logical value when it is
   evaluated.  The object is passed as a parameter to the code block.
   Note: To exit a dialog with a pushbutton and insure that the
   validation code block is not evaluated, use the clause
   CARGO 'CANCEL' with the DCPUSHBUTTON command.
   
   HELPCODE < cHelp > is a character string that is passed to the
   DC_HelpF1() function if F1 is pressed or the HELP button
   is clicked when this GET has focus.  This HELPCODE allows
   the Help system to override the passing of the Procedure and
   Varname for more specific context-help.
   
   AUTOSIZE automatically sizes the SAY string object to the
   length of the string.
   
   POPUP < bPopUp > will paint a mouse button at the end of the GET
   variable on the screen which informs the operator than an
   additional picklist will pop-up if the operator single-clicks on
   the button or if the operator presses the CTRL-J or CTRL-ENTER
   key while the GET has input focus.  The code block will be
   evaluated when the button is clicked.  The following three
   parameters are passed to the codeblock :
   
     1. The value in the current GET
     2. A pointer to the GET object
     3. The reference value established by the REFERENCE clause
   
   The value returned by the code block will be placed back in the
   GET.  The code block may return an optional array of two
   elements rather than a single value to store to the GET.  If a
   two-element array is returned, the first element must be the
   value to store in the GET and the second element must be a
   pointer to the object which is to receive focus. This provides
   for the ability to force the focus to a different object on a
   POPUP other than the GET.
   
   The POPUP clause is used for popups like calendars, calculators,
   picklists, etc.  The default caption on the button is three dots.
   To change the caption or button display options, use the
   function DC_GetPopupCaption().
   
   POPCAPTION < ncaCaption > is the optional caption of the button.
   This will override the DC_PopupCaption() setting.   This will override the
   DC_GetPopupCaption() setting. If < ncaCaption > is an array, it
   must be an array of 2 elements where the first element is the
   bitmap resource number of the caption to display when the GET is
   enabled and the second element is the bitmap resource number of
   the caption to display when the GET is disabled with the WHEN
   clause.
   
   POPFONT < cFont > is the optional font of the button.
   
   POPWIDTH < nWidth > is the width (in pixels) of the button.  This
   will override the default width.
   
   POPHEIGHT < nHeight > is the height (in pixels) of the button.
   This will override the default height.
   
   POPSTYLE < nPopStyle > is the style of the popup button:
   
     POPSTYLE < nPopStyle >       Description
     -------------------------  ----------------------------------
     DCGUI_POPUPSTYLE_OUTSIDE   Button is outside and to the right
                                of the GET.
     DCGUI_POPUPSTYLE_IMBEDDED  Button is imbedded within the GET.
   
   POPKEY < anPopKey > is a numeric key value or an array of numeric
   key values that may be assigned to invoke the popup button when
   the key is pressed.  An additional POPGLOBAL clause may be used
   to establish that the assigned key is active regardless of the
   object that is in focus, otherwise the key will be active only
   when the associated get has focus.  Key values are defined in
   APPEVENT.CH and start with the definition xbeK_*.
   
   POPTABSTOP will cause the TABSTOP key to be active on the popup
   button so the user may tab from the GET to the popup button.
   
   POPTOOLTIP < bcPopToolTip > is a character string which will display
   as a "Tool Tip" next to the popup button the mouse is passed
   over the popup button. A semi-colon within the text indicates a new
   line.  If < bcToolTip > is a code-block, it must return a character
   string.  NOTE: The Tooltip painting method is run in another
   thread, therefore the codeblock should not run code that points
   to the current work area.  It may however, contain local, public
   or private variables.
   
   PASSWORD will cause asterisks to be displayed in place of the
   value entered.  This only affects the display, not the value
   entered or returned.
   
   PROPER will cause the first character of each word to be
   capitalized and all other characters to be lower case.  The
   optional clause PROPOPTIONS designates a two element array
   for alternate behavior:
   
   { lProperLow, cTriggers }
   
   lProperLow - Logical.  Force upper case characters to lower case
                If not First character in field or following trigger
                character.
   
   cTriggers  - A list of characters after which a capital is desired.
                (ie. " '-1234567890" capitalize after space, apostrophe,
                hyphen, or any number)
   
   SAYPRESENTATION < aSayPres > is a two-dimensional array. If
   specified, this contains presentation parameters for the SAY
   object.  The first column of the array must contain #define
   constants from the XBP.CH file starting with the prefix
   XBP_PP_. These constants define the presentation parameters
   that can be set for the object and include colors and fonts.
   The second column of the array in < aSayPres > contains the value
   for each setting.  These are also generally set using #define
   constants from the GRA.CH file.
   
   GETPRESENTATION < aGetPres > is a two-dimensional array. If
   specified, this contains presentation parameters for the GET
   object.  The first column of the array must contain #define
   constants from the XBP.CH file starting with the prefix
   XBP_PP_. These constants define the presentation parameters
   that can be set for the object and include colors and fonts.
   The second column of the array in < aSayPres > contains the value
   for each setting.  These are also generally set using #define
   constants from the GRA.CH file.
   
   SAYOPTIONS < nSayOpt > is a set of options that can be used to
   align the text within the rectangular area of the SAY object.
   Constants defined in the XBP.CH file are used for these options.
   If combinations of alignment options are required, the sum of
   the appropriate constants must be included in < nSayOpt >.
   The below constants are defined in XBP.CH.
   
    XBPSTATIC_TEXT_LEFT       Text is left aligned
    XBPSTATIC_TEXT_CENTER     Text is horizontally centered
    XBPSTATIC_TEXT_RIGHT      Text is right aligned
    XBPSTATIC_TEXT_TOP        Text is displayed at top
    XBPSTATIC_TEXT_VCENTER    Text is vertically centered
    XBPSTATIC_TEXT_BOTTOM     Text is displayed at bottom
    XBPSTATIC_TEXT_WORDBREAK  Text is wrapped (multi-line)
   
    An alternate method of aligning text is by using the following
    defines in place of SAYOPTIONS < nSayOpt >:
   
     SAYRIGHT
     SAYLEFT
     SAYRIGHTBOTTOM
     SAYLEFTBOTTOM
     SAYRIGHTCENTER
     SAYLEFTCENTER
     SAYRIGHTTOP
     SAYLEFTTOP
     SAYCENTER
     SAYBOTTOM
     SAYTOP
   
   SAYTOOLTIP < bcSayTool > is a character string which will display
   as a "Tool Tip" next to the object when the cursor is passed
   over the Say object. A semi-colon within the text indicates a new
   line.  If < bcToolTip > is a code-block, it must return a character
   string.  NOTE: The Tooltip painting method is run in another
   thread, therefore the codeblock should not run code that points
   to the current work area.  It may however, contain local, public
   or private variables.
   
   GETTOOLTIP < bcGetTool > is a character string which will display
   as a "Tool Tip" next to the object when the cursor is passed
   over the Get object. A semi-colon within the text indicates a new
   line.  If < bcToolTip > is a code-block, it must return a character
   string.  NOTE: The Tooltip painting method is run in another
   thread, therefore the codeblock should not run code that points
   to the current work area.  It may however, contain local, public
   or private variables.
   
   SAYOBJECT < oSayObject > is the name of the variable to store a
   pointer to the SAY object after it is created.
   
   GETOBJECT < oGetObject > is the name of the variable to store a
   pointer to the GET object after it is created.
   
   SAYCURSOR < nSayCursor > is an optional mouse pointer to use for
   the SAY portion of the SAY..GET.  System mouse pointers start
   with XBPWINDOW_POINTERTYPE_  and are defined in XPB.CH.  The
   default pointer is XBPWINDOW_POINTERTYPE_POINTER.  < nCursor > may
   also be a resource ID that points to a Bit-Map that has been
   compiled with the resource compiler and linked to the .EXE.
   
   GETCURSOR < naGetCursor > and SAYCURSOR < naSayCursor > may be either
   a numeric value or an array of 3 elements which defines an
   optional mouse pointer to use for this object.  System mouse
   pointers start with XBPWINDOW_POINTERTYPE_ and are defined in
   XPB.CH.  The default pointer is XBPWINDOW_POINTERTYPE_POINTER.
   < naGetCursor > / < naSayCursor > may be a numeric resource ID that
   points to a Bit-Map that has been compiled with the resource
   compiler and linked to the .EXE. < naGetCursor > / < naSayCursor >
   may be a 3-element array described as follows:
   
     Element  Type  Description
     -------  ---- ---------------------------------------------
       [1]      C   Optional name of .DLL containing the pointer
                    resource.
   
       [2]      N   The numeric resource ID of the pointer.  If
                    element 1 is a NIL, then this resource must be
                    linked into the .EXE.
   
       [3]      N   The type of resource as defined in XBP.CH.
   
   SAYCOLOR < bncSayFGc >, < ncSayBGc > are foreground and background
   colors for the SAY text. They may be character strings
   representing valid text-based colors supported by SetColor() or
   they may be numeric constants which begin with either the prefix
   GRA_CLR_ or the prefix XBPSYSCLR_ as defined in GRA.CH or XBP.CH.
   If < bncSayFGc > is a code block is must return a 2-element array
   containing a foreground and background color.
   
   GETCOLOR < bncGetFGc >, < ncGetBGc > are foreground and background
   colors for the GET. They may be character strings representing
   valid text-based colors supported by SetColor() or they may be
   numeric constants which begin with either the prefix GRA_CLR_ or
   the prefix XBPSYSCLR_ as defined in GRA.CH or XBP.CH. If
   < bncGetFGc > is a code block is must return a 2-element array
   containing a foreground and background color.
   
   SAYID < cSayId > is a unique identifier for the SAY portion of this
   object.  This ID is used with functions like DC_GETOBJECT() to
   determine the status of a getlist object.
   
   GETID < cGetId > is a unique identifier for the GET portion of this
   object.  This ID is used with functions like DC_GETOBJECT() to
   determine the status of a getlist object.
   
   ACCELKEY < anAccel > is a numeric "hot-key" assignment that will set
   focus to the checkbox object when the hot-key is pressed.  The key
   must be a valid key with the prefix xbeK_*.  These keys are
   defined in APPEVENT.CH.  < anAccel > may also be an array of numeric
   values to assign more than one key to the object.
   
   GOTFOCUS < bGotFocus > is a code block that is evaluated when the
   GET object receives input focus.  < bGotFocus > := {|uNIL1,uNIL2,self|...}
   
   LOSTFOCUS < bLostFocus > is a code block that is evaluated when the
   GET object loses input focus  .< bLostFocus > := {|uNIL1,uNIL2,self|...}
   
   TABSTOP will cause the object (Xbase Part) to be set when using
   the Tab key.  Note: When logical groups are defined in a dialog
   using TABGROUP < nTabGroup >, TABSTOP is usually set to .T. (true)
   for the first dialog element in the group.  This allows the first
   dialog element of a group to be activated using the Tab key.
   
   NOTABSTOP will cause the object (Xbase Part) to be ignored when
   using the Tab key. This clause is needed only to override any
   default setting of TabStop by the DCGETOPTIONS [TABSTOP] command.
   
   TABGROUP < nTabGroup > allows objects (Xbase Parts) that are created
   immediately after one another in the GetList to be combined into
   logical groups. This allows the user to navigate within a dialog
   from group to group by pressing the Tab key.  Within a group of
   dialog elements navigation is performed using the cursor keys.
   
   Only constants defined in the XBP.CH file can be used as values
   for this instance variable.  The following table lists the
   available constants:
   
   #define constants for < nTabGroup >:
   
    Constant             Description
   
    XBP_NO_GROUP     *)  Dialog element does not belong to a group
    XBP_BEGIN_GROUP      Dialog element is the first in a group
                         (this begins the definition of the group)
    XBP_WITHIN_GROUP     Dialog element is within a group
    XBP_END_GROUP        Dialog element is the last in a group
                         (this ends the definition of the group)
   
   *) Default value
   
   GROUP < cGroup > is a "group" name (case-sensitive) to assign to
   this GetList object.  Assignment to a group makes it possible to
   perform operations only on GetList items which are members of a
   specified group, using functions such as DC_GetRefresh() or
   DC_ReadGui().
   
   VISIBLE determines whether the object is visible immediately after
   the call to the method :create() . By default the object follows
   the VISIBLE clause of the DCGETOPTIONS command.  Use the
   INVISIBLE clause to override the VISIBLE clause of DCGETOPTIONS.
   
   KEYBLOCK < bKeyBlock > is a code block to evaluate when a key is
   pressed in the GET.  The code block should be formatted as follows:
   {|mp1,xNil,oXbp|MyFunc(mp1,xNil,oXbp)} where < mp1 > is the
   numeric value (defined in APPEVENT.CH) of the key pressed and
   oXbp is the GET object.
   
   COMBO is used to create a ComboBox-Style Get with a pull-down
   picklist from an array or database.  HEIGHT < nComboHeight > is
   the Height of the Picklist area in text rows or in pixels if
   the PIXEL clause is used.  The width of the picklist will be the
   same as the width of the Get unless the WIDTH < nComboWidth > clause
   is used .  DATA < acbComboData > is the data source of the picklist.
   < acbComboData > must be a character string containing the Alias()
   of the database, a single-dimension array, a multi-dimensional
   array or a code-block which returns an alias or array.
   FIELD < bField > is a code block containing the field name of the
   data to be shown in the picklist (when browsing a database) or
   ELEMENT < nElement > is the numeric value of the column in the array
   to be shown in the picklist (when browsing an array).
   RETURN < bReturn > is a code block to evaluate on return.  If this
   optional parameter is used, then the return value of the code
   block is what is returned to the Get.  If the combo picklist is
   an array, then the numeric pointer to the element selected is
   passed to the code block.  NOTE: Use the function DC_GetComboMode()
   to set the mouse mode for selecting and item.  (Single click or
   Double click).  CAPTION < oncComboCaption > is used to set the
   caption of the dropdown button.  FONT < ocComboFont > is used to set
   the font of the dropdown button.  HOTKEY < nComboHotKey > is used to
   set a hotkey to invoke the dropdown when the get has focus.
   
   GRASTRING will use the GraStringAt() function to paint the SAY
   portion rather than an XbpStatic() object.  This uses less
   memory resources.  Note: because an object does not exist, the
   say text cannot be manipulated at run time.
   
   CAUTION: Do not use GRASTRING clause with the FIT clause of
            DCREAD GUI or the AUTORESIZE clause of DCGETOPTIONS,
            unless the DCGRA* object is drawn on an object that
            does not get resized or repositioned at a later time.
            Auto-Sizing and Auto-Fitting is accomplished by
            traversing child list of the Parent object and reading
            the size and/or coordinates of all objects.  DCGRA*
            commands are not objects, therefore they cannot be
            repositioned correctly.
   
   SAYPREEVAL < bSayPreEval > is a code block to be evaluated by the
   GUI reader before the SAY object is created.  The object is
   passed to the code block.
   
   SAYEVAL < bSayEval > is a code block to evaluate after the SAY
   object is created.  The XbpStatic object will be passed to the
   code block.
   
   GETPREEVAL < bGetPreEval > is a code block to be evaluated by the
   GUI reader before the GET object is created.  The object is
   passed to the code block.
   
   GETEVAL < bGetEval > is a code block to evaluate after the GET
   object is created.  The XbpGet object will be passed to the
   code block.
   
   SAYTITLE < cSayTitle > is a title to assign to the SAY object.  ;
   The title is not displayed on the screen but is simply a
   description of the say object which is saved in the GetList.
   
   GETTITLE < cGetTitle > is a title to assign to the GET object.  ;
   The title is not displayed on the screen but is simply a
   description of the get object which is saved in the GetList.
   
   NAME < cVarName > is the variable name to assign to the GET
   object (for HTML based applications.)
   

Description:

    The command @..DCSAY...GET creates a new Get object and
    adds the object to the array named GETLIST which is later
    processed by the DC_Read*() functions or by the DCREAD *
    commands.
   
    The GETLIST array must be first declared and  initialized to
    the value of {}.  The command DCREAD GUI activates the
    the edit mode for all Get objects found in the GetList array.
    The command DCREAD HTML writes the HTML source code to render
    the objects in a Web Browser.
   
    A Get object remains stored as long as it is referenced
    in an array or by a variable.  The commands CLEAR and
    CLEAR GETS assign an empty array to the GetList variable.
    This also occurs after the completion of the DCREAD command
    if it is called without the SAVE option, causing all Get
    objects referenced by the GetList array to be released.
   
    @..DCSAY..GET works nearly identical to the standard
    Xbase++ command @..SAY..GET except for a major difference.
    The GetList array has a new structure that supports a more
    robust dialog system.  This GetList is then passed to the
    function DC_ReadGui() which creates the objects and starts
    an event handler, or the GetList can be be passed to the
    function DC_ReadHtml() which creates the objects and writes
    HTML source.
   
    @..DCSAY..GET objects can be combined with any objects that
    that use the DCDIALOG system, such as @..DCCHECKBOX,
    @..DCRADIO, @..DCBUTTON, @..DCTABPAGE, @..DBROWSE, @..DCTABLE
    or @..DCHTML*.
   

Notes:

    Clauses marked by an asterisk ( * ) are not supported by
    DCREAD HTML or DC_ReadHtml().
   
    ------------------
   
    GUI applications:
   
    The SAY object created by @ DCSAY..GET is an object of the
    DC_XbpStatic() class unless the GRASTRING clause is used.  The
    GRASTRING clause causes the say to be painted by the GraStringAt()
    function and does not create an object.  DC_XbpStatic()
    inherits from XbpStatic()
   
    The GET object created by @ DCSAY..GET is an object of the DC_XbpGet()
    class, therefore it can be manipulated with any iVar or method
    supported by DC_XbpGet().  DC_XbpGet() is a non-supported class which
    is provided with Xbase++ as an example.  This class inherits
    from the XbpSle() class and the Get() class.  It has been modified
    to support features required by eXPress++.  The source for DC_XbpGet()
    is in _DCXBPGT.PRG.
   
    If the CHECKGET option of GETOPTIONS is used, then the GET object
    is an object of the DC_XbpCheckBox() class.
   
    -----------------
   
    HTML Applications
   
    The SAY object created by @ DCSAY..GET is an object of the
    DC_HtmlSay() class.
   
    The GET object created by @ DCSAY..GET is an object of the
    DC_HtmlGet() class.
   

Examples:

   /*  Example 1 (Simple Gets) */
   
   #include "dcdialog.ch"
   
   PROCEDURE Xtest_1()
   
   LOCAL GetList := {}, cLastName := Space(15), cFirstName := Space(15),;
         cCompany := Space(25), cStreet := Space(25), cCity := Space(25),;
         cState := Space(2), cCountry := Space(20), cPhone := Space(15),;
         GetOptions
   
   @ 5,10 DCSAY ' Last Name' GET cLastName
   @ 5,40 DCSAY 'First Name' GET cFirstName
   @ 7,10 DCSAY '   Company' GET cCompany
   @ 8,10 DCSAY '    Street' GET cStreet
   @ 9,10 DCSAY '      City' GET cCity
   @11,10 DCSAY '     State' GET cState
   @11,40 DCSAY '   Country' GET cCountry
   @13,10 DCSAY '     Phone' GET cPhone PICT '(999)-999-9999'
   
   DCGETOPTIONS SAYRIGHTJUST
   
   DCREAD GUI ;
       FIT ;
       ADDBUTTONS ;
       OPTIONS GetOptions
   
   RETURN
   
   
   
   /*  Example 2 (Gets with Whens, Hides, Validations and Pop-ups)  */
   
   PROCEDURE Xtest_2()
   
   LOCAL GetList := {}, cLastName := Space(15), cFirstName := Space(15),;
         cCompany := Space(25), cStreet := Space(25), cCity := Space(25),;
         cState := Space(2), cCountry := Space(20), cPhone := Space(15),;
         dDate1 := Date(), dDate2 := Date()+1, GetOptions
   
   @ 5,10 DCSAY ' Last Name' GET cLastName ;
          VALID {||DC_ReadEmpty(cLastName)}
   
   @ 5,40 DCSAY 'First Name' GET cFirstName ;
          VALID {||DC_ReadEmpty(cFirstName)}
   
   @ 7,10 DCSAY '   Company' GET cCompany
   
   @ 8,10 DCSAY '    Street' GET cStreet ;
          VALID {||DC_ReadEmpty(cStreet)}
   
   @ 9,10 DCSAY '      City' GET cCity ;
          VALID {||DC_ReadEmpty(cCity)}
   
   @11,10 DCSAY '     State' GET cState PICT '@!' ;
          VALID {||DC_ReadEmpty(cState)} ;
          WHEN {||!Empty(cCity)}
   
   @11,40 DCSAY '   Country' GET cCountry
   
   @13,10 DCSAY '     Phone' GET cPhone PICT '(999)-999-9999'
   
   @15,10 DCSAY 'Start Date' GET dDate1 ;
          POPUP {|d|DC_PopDate(d)}
   
   @16,10 DCSAY '  End Date' GET dDate2 ;
          HIDE {||dDate1 = Date()}
   
   DCGETOPTIONS SAYRIGHTJUST
   
   DCREAD GUI ;
       FIT ;
       ADDBUTTONS ;
       OPTIONS GetOptions
   
   RETURN
   
   
   
   /* Example 3
   
     This example shows @ DCSAY..GETs which do direct edits into a
     database.  The GET variable is a code-block that automatically
     handles locking/unlocking and macros.  In this example, all
     screen dialog is data-driven. */
   
    LOCAL GetList := {}, aData, i, bBlock, bValid, bWhen
   
    CLOSE ALL
    USE COLLECT NEW EXCL
   
    aData := { { 1, 1, 'Description', 'COLLECT->descrip', '@!', ;
                       '!Empty(COLLECT->descrip)', '.T.' }, ;
               { 3, 1, 'Original Price', 'COLLECT->orig_price', '9999.99', ;
                       '.T.','.T.'}, ;
               { 5, 1, 'Date Acquired', 'COLLECT->date_acqu', '', ;
                       '.T.', '.T.' } }
   
    FOR i := 1 TO Len(aData)
   
      bBlock := _XTest3(aData[i,4],1)
      bValid := _XTest3(aData[i,6],2)
      bWhen  := _XTest3(aData[i,7],2)
   
      @ aData[i,1], aData[i,2] DCSAY aData[i,3] GET bBlock ;
        PICTURE aData[i,5] ;
        VALID bValid ;
        WHEN bWhen ;
        SAYRIGHT ;
        SAYSIZE 15
   
    NEXT
   
    DCREAD GUI FIT ADDBUTTONS
   
   RETURN nil
   
   /* -------------------- */
   
   STATIC FUNCTION _XTest3( xValue, nMode )
   
   IF nMode = 1 // Field Anchor
     RETURN {|x|IIF(x==nil,&xValue,IIF(dbRLock(),&xValue:=x,nil)), ;
                IIF(!(x==nil),dbUnlock(),nil),&xValue }
   ENDIF
   
   RETURN {||&xValue}  // VALID or WHEN Anchor
   
   
   /* Example 4 - This example shows @ DCSAY..GET ... COMBO. */
   
   PROCEDURE XTest_5()
   
   LOCAL GetList := {}, cCode, aCodes, aCodeDesc
   
   aCodes := { 'A','B','C'}
   
   aCodeDesc := { 'Selection A', ;
                  'Selection B', ;
                  'Selection C' }
   
   cCode := aCodes[1]
   
   @ 1,1 DCSAY 'Enter Code' GET cCode GETSIZE 15 ;
         COMBO HEIGHT 6 DATA aCodeDesc RETURN {|n|aCodes[n]}
   
   DCREAD GUI FIT ADDBUTTONS TITLE 'Combo Test'
   
   RETURN
   

Source/Library:

  DCDIALOG.CH

See Also:

   dc_getpopupcaption()
   @ DCGET
   dc_getcombomode()



@ DCSCROLLBAR

Create a SCROLL BAR object for displaying with GUI reader

Syntax:

   @ < nRow >,< nCol > DCSCROLLBAR ;
       [DATA < uVar >] ;
       [SIZE < nWidth > [,< nHeight >]] ;
       [PARENT < oParent >] ;
       [PARENTID < cParentId >] ;
       [PRESENTATION < aPres >] ;
       [TYPE < nType >] ;
       [SCROLL < bScroll >] ;
       [OBJECT < oBar >] ;
       [RANGE < nBott >,< nTop >] ;
       [TOOLTIP < bcToolTip >] ;
       [CURSOR < naCursor >] ;
       [CARGO < xCargo >] ;
       [WHEN < bWhen >] ;
       [HIDE < bHide >] ;
       [PREEVAL < bPreEval >] ;
       [EVAL < bEval >] ;
       [AUTOTRACK] ;
       [PIXEL] ;
       [RELATIVE < oRel >] ;
       [ID < cId >] ;
       [TITLE < cTitle >] ;
       [GOTFOCUS < bGotFocus >] ;
       [LOSTFOCUS < bLostFocus >]  ;
       [TABSTOP]  ;
       [NOTABSTOP];
       [TABGROUP < nTabGroup >]  ;
       [VISIBLE] ;
       [INVISIBLE] ;
       [GROUP < cGroup >]
   

Arguments:

   < nRow > and < nCol > are the row and column of the screen.
   Coordinates are always relative to position 0,0 ie. Top,Left
   of the parent object, unless the RELATIVE < oRel > argument is
   used.  If no parent is assigned, then the parent is the Dialog
   box.  IF the PIXEL option is set to .TRUE. in DCGETOPTIONS,
   then the numbers are in pixels otherwise they are in standard
   text-based coordinates.  You can also force the pixel mode by
   including PIXEL as a command argument.
   
   DATA < uVar > is the input/output variable. It must not be a macro
   unless < uVar > is a codeblock that contains a macro. The < uVar > is
   automatically anchored via a Get-Set codeblock created by
   DC_GetAnchorCB() unless < uVar > is a custom Get-Set code block.
   
   RELATIVE < oRel > is an optional object in the Getlist which
   determines the start coordinates of this object.  If this
   option is used, then the < nSrow >, < nSCol > coordinates are
   relative to the starting coordinates of < oRel > rather than
   the parent object.
   
   TYPE < nType > is the type of Scrollbar.  It determines whether
   a horizontal or vertical scroll bar is created.  Either the
   constant XBPSCROLL_HORIZONTAL or the constant XBPSCROLL_VERTICAL
   must be used for this option.  These constants are defined in
   the XBP.CH file.
   
   OBJECT < oObject > is the name of a local variable to assign
   to this ScrollBar object.
   
   SCROLL < bScroll is a code block that is evaluated when the
   mouse is clicked in the scroll-bar area.  The code-block
   should be in the following form:
   
     {| aScroll, uNIL, self | ... }
   
      < aScroll > := { nScrollBoxPos, nCommand }
      < aScroll > is an array containing two elements. The first
      element contains the new position of the scroll box and the
      second element contains a numeric code identifying the action
      that was executed.  Constants are defined for the actions
      that may appear in the second element.  These constants are
      defined in the XBP.CH file and are listed in the following
      table:
   
      XBPSB_PREVPOS      Went back one position
      XBPSB_NEXTPOS      Went forward one position
      XBPSB_PREVPAGE     Went back one page
      XBPSB_NEXTPAGE     Went forward one page
      XBPSB_SLIDERTRACK  Scroll box clicked with a mouse button
      XBPSB_ENDTRACK     Continuous scrolling using the scroll box
                         has ended
   
      XBPSB_ENDSCROLL    Continuous scrolling using the scroll button
                         has ended
   
   RANGE < nMin >, < nMax > defines the minimum and maximum values of
   the scroll bar.  The range is limited by the operating system
   to values between -32768 and 32768.
   
   SIZE < nWidth >,< nHeight > is the width and height of the
   ScrollBar  If the PIXEL option is set to .TRUE. in DCGET
   OPTIONS, then the numbers are in pixels otherwise they are
   in standard text-based numbers.
   
   AUTOTRACK causes the current position of the scroll box to be
   automatically updated.   The default action is to require the
   scrollbar to be updated by using the method :setData().  In
   this case, the first message parameter passed to the SCROLL
   code block must be used to determine the current position.
   
   PARENT < oParent > is the name of the variable that was assigned to
   the parent object for this object.  Only use this clause if you
   are placing this object onto another dialogue object.  If this
   argument is not passed then the parent will be the object set
   with the DCSETPARENT command.
   
   PARENTID < cParentID > may be used in lieu of the PARENT < oParent >
   clause.  This identifies the ID of the parent instead of the
   parent's object variable name.
   
   PRESENTATION < aPres > is a two-dimensional array. If specified,
   this contains presentation parameters for the multiline object.
   The first column of the array must contain #define constants
   from the XBP.CH file starting with the prefix XBP_PP_. These
   constants define the presentation parameters that can be set
   for the object and include colors and fonts. The second column
   of the array in < aPres > contains the value for each setting.
   These are also generally set using #define constants from the
   GRA.CH file.
   
   TOOLTIP < bcToolTip > is a character string which will display
   as a "Tool Tip" next to the object when the cursor is passed
   over the object. If < bcToolTip > is a code-block, it must return
   a character string.  NOTE: The Tooltip painting method is run in
   another thread, therefore the codeblock should not run code that
   points to the current work area.  It may however, contain
   local, public or private variables.
   
   CURSOR < naCursor > may be either a numeric value or an array of
   3 elements which defines an optional mouse pointer to use for
   this object.  System mouse pointers start with
   XBPWINDOW_POINTERTYPE_ and are defined in XPB.CH.  The default
   pointer is XBPWINDOW_POINTERTYPE_POINTER.  < naCursor > may be a
   numeric resource ID that points to a Bit-Map that has been
   compiled with the resource compiler and linked to the .EXE.
   < naCursor > may be a 3-element array described as follows:
   
     Element  Type  Description
     -------  ---- ---------------------------------------------
       [1]      C   Optional name of .DLL containing the pointer
                    resource.
   
       [2]      N   The numeric resource ID of the pointer.  If
                    element 1 is a NIL, then this resource must be
                    linked into the .EXE.
   
       [3]      N   The type of resource as defined in XBP.CH.
   
   PREEVAL < bPreEval > is a code block to be evaluated by the GUI
   reader before the Xbase Parts object is created.  The object is
   passed to the code block.
   
   EVAL < bEval > is a code block to be evaluated by the GUI reader
   after the Xbase Parts object is created.  The object is passed
   to the code block.
   
   CARGO < xCargo > is any kind of data you wish to to add to the
   :cargo container for this object.  The cargo may be accessed
   at any time via the :cargo exported variable, however it will not
   be stored in the same manner it is entered.  The :cargo container
   of DCDIALOG objects is an array of at least three elements:
   
    [1] - A numeric value that is a pointer to the Getlist array
          for this object.
   
    [2] - A pointer to the GetList array.
   
    [3] - The value of < xCargo >.
   
    [4] and up - optional values added by the GUI reader.
   
   ID < cId > is a unique identifier for this object.  This ID is used
   with functions like DC_GETORIGUPDATED() to determine the status
   of a get object.
   
   TITLE < cTitle > is a title to assign to this object.  The title
   is not displayed on the screen but is simply a description of the
   get object which is saved in the GetList.
   
   WHEN < bWhen > is a code block that is evaluated in the event loop.
   This code block must return a logical value.  If the value
   returned is .FALSE. then the object will be disabled and grayed.
   If the value returned is .TRUE. then the object will be enabled.
   The object is passed as a parameter to the code block.
   
   HIDE < bHide > is a code block that is evaluated in the event loop.
   This code block must return a logical value.  If the value
   returned is .TRUE. then the object will be hidden from view.  If
   the value returned is .FALSE. then the object will be displayed.
   The object is passed as a parameter to the code block.
   
   GOTFOCUS < bGotFocus > is a code block that is evaluated when this
   object receives input focus.  < bGotFocus > := {|uNIL1,uNIL2,self|...}
   
   LOSTFOCUS < bLostFocus > is a code block that is evaluated when this
   object loses input focus.  < bLostFocus > := {|uNIL1,uNIL2,self|...}
   
   TABSTOP will cause the object (Xbase Part) to be set when using
   the Tab key.  Note: When logical groups are defined in a dialog
   using TABGROUP < nTabGroup >, TABSTOP is usually set to .T. (true)
   for the first dialog element in the group.  This allows the first
   dialog element of a group to be activated using the Tab key.
   
   NOTABSTOP will cause the object (Xbase Part) to be ignored when
   using the Tab key. This clause is needed only to override any
   default setting of TabStop by the DCGETOPTIONS [TABSTOP] command.
   
   TABGROUP < nTabGroup > allows objects (Xbase Parts) that are created
   immediately after one another in the GetList to be combined into
   logical groups. This allows the user to navigate within a dialog
   from group to group by pressing the Tab key.  Within a group of
   dialog elements navigation is performed using the cursor keys.
   
   Only constants defined in the XBP.CH file can be used as values
   for this instance variable.  The following table lists the
   available constants:
   
   #define constants for < nTabGroup >:
   
    Constant             Description
   
    XBP_NO_GROUP     *)  Dialog element does not belong to a group
    XBP_BEGIN_GROUP      Dialog element is the first in a group
                         (this begins the definition of the group)
    XBP_WITHIN_GROUP     Dialog element is within a group
    XBP_END_GROUP        Dialog element is the last in a group
                         (this ends the definition of the group)
   
   *) Default value
   
   GROUP < cGroup > is a "group" name (case-sensitive) to assign to
   this GetList object.  Assignment to a group makes it possible to
   perform operations only on GetList items which are members of a
   specified group, using functions such as DC_GetRefresh() or
   DC_ReadGui().
   
   VISIBLE determines whether the object is visible immediately after
   the call to the method :create() . By default the object follows
   the VISIBLE clause of the DCGETOPTIONS command.  Use the
   INVISIBLE clause to override the VISIBLE clause of DCGETOPTIONS
   

Description:

    The command @..DCSCROLLBAR creates a new Scroll-Bar object
    and adds the object to the array named GETLIST which is later
    processed by the DC_READGUI() function or by the DCREAD GUI
    command.  The GETLIST array must be first declared and
    initialized to the value of {}.  The command DCREAD GUI activates
    the edit mode for all objects found in the GetList array.
    A Getlist object remains stored as long as it is referenced
    in an array or by a variable.  The commands CLEAR and
    CLEAR GETS assign an empty array to the GetList variable.
    This also occurs after the completion of the DCREAD command
    if it is called without the SAVE option, causing all Get
    objects referenced by the GetList array to be released.
   
    @..DCSCROLLBAR objects can be combined with any objects that
    that use the DCDIALOG system, such as @..DCSAY..GET,
    @..DCSTATIC, @..DCBUTTON, @..DCCHECKBOX or @..DCTABPAGE.
   

Notes:

    The object created by @ DCSCROLLBAR is an object of the
    XbpScrollBar() class, therefore it can be manipulated with
    any iVar or method supported by XbpScrollBar().
   

Examples:

    /*
    This example uses three scrollbars to change the RED, GREEN
    and BLUE colors and display the result in a box.
    */
   
    #include "dcdialog.ch"
   
    PROCEDURE Xtest()
   
    LOCAL nRed := 50, nGreen := 100, nBlue := 150, GetList := {}, oColorBox
   
    @ 2, 44 DCSAY 'R' SAYSIZE 2
    @ 3, 43 DCSCROLLBAR DATA nRed SIZE 3,7 ;
            TYPE XBPSCROLL_VERTICAL RANGE 0,255 ;
            SCROLL { |a,x,o| nRed := a[1], ;
              o:SetData(), RGB(nRed,nGreen,nBlue,oColorBox) }
   
    @ 2, 48 DCSAY 'G' SAYSIZE 2
    @ 3, 47 DCSCROLLBAR DATA nGreen SIZE 3,7 ;
            TYPE XBPSCROLL_VERTICAL RANGE 0,255 ;
            SCROLL { |a,x,o| nGreen := a[1], ;
              o:SetData(), RGB(nRed,nGreen,nBlue,oColorBox) }
   
    @ 2, 52 DCSAY 'B' SAYSIZE 2
    @ 3, 51 DCSCROLLBAR DATA nBlue  SIZE 3,7 ;
            TYPE XBPSCROLL_VERTICAL RANGE 0,255 ;
            SCROLL { |a,x,o| nBlue := a[1], ;
              o:SetData(), RGB(nRed,nGreen,nBlue,oColorBox) }
   
    @ 11, 40 DCSTATIC XBPSTATIC_TYPE_RAISEDBOX SIZE 20,2 ;
            GROUP oColorBox ;
            EVAL {|o|o:paint := {||RGB(nRed,nGreen,nBlue,oColorBox)} }
   
    DCREAD GUI ;
      TITLE 'Scroll-bar Demo' ;
      FIT ;
      ADDBUTTONS
   
    RETURN
   
    /* ---------------- */
   
    STATIC PROCEDURE RGB( nRed, nGreen, nBlue, oColorBox )
   
    LOCAL aAttr := Array(GRA_AA_COUNT)  // area attributes
    LOCAL nMax, aOldAttr, aOldRGB, oPS
   
    oPS   := oColorBox:LockPS()
    nMax  := oPS:maxColorIndex()  // max colors
   
    // Set new RGB color and draw box
    aAttr[ GRA_AA_COLOR  ] := nMax
    aOldAttr := oPS:setAttrArea( aAttr )
    aOldRGB  := oPS:setColorIndex( nMax, {nRed,nGreen,nBlue} )
    GraBox( oPS, {0,0}, {200,200}, GRA_FILL )
    oPS:setAttrArea( aOldAttr )
    oPS:setColorIndex( nMax, aOldRGB )
    oColorBox:unlockPS( oPS )
   
    RETURN
   

Source/Library:

  DCDIALOG.CH

@ DCSPINBUTTON

Create a SPIN BUTTON get for displaying with GUI reader

Syntax:

   @ < nRow >,< nCol > DCSPINBUTTON < nVar > ;
       [SIZE < nWidth > [,< nHeight >]] ;
       [PARENT < oParent >] ;
       [PARENTID < cParentId >] ;
       [MESSAGE < bcMsg > [INTO < oMsgBox >]] ;
       [VALID < bValid >] ;
       [HELPCODE < cHelp >] ;
       [WHEN < bWhen >] ;
       [HIDE < bHide >] ;
       [EDITPROTECT < bProtect >] ;
       [PRESENTATION < aPres >] ;
       [FONT < bocFont >] ;
       [MASTER < oMaster >] ;
       [OBJECT < oObject >] ;
       [CALLBACK < bCallBack >] ;
       [COLOR < bncFgC > [,< ncBgC >] ] ;
       [DATALINK < bLink >] ;
       [LIMITS < nBott >,< nTop >] ;
       [PIXEL] ;
       [FASTSPIN] ;
       [PADZERO] ;
       [TOOLTIP < bcToolTip >] ;
       [CURSOR < naCursor >] ;
       [CARGO < xCargo >] ;
       [PREEVAL < bPreEval >] ;
       [EVAL < bEval >] ;
       [RELATIVE < oRel >] ;
       [ID < cId >] ;
       [TITLE < cTitle >] ;
       [ACCELKEY < anAccel >] ;
       [GOTFOCUS < bGotFocus >] ;
       [LOSTFOCUS < bLostFocus >] ;
       [TABSTOP] ;
       [NOTABSTOP] ;
       [TABGROUP < nTabGroup >] ;
       [VISIBLE] ;
       [INVISIBLE] ;
       [GROUP < cGroup >]
   

Arguments:

   < nRow > and < nCol > are the row and column of the screen.
   Coordinates are always relative to position 0,0 ie. Top,Left
   of the parent object, unless the RELATIVE < oRel > argument is
   used.  If no parent is assigned, then the parent is the Dialog
   box.  IF the PIXEL option is set to .TRUE. in DCGETOPTIONS,
   then the numbers are in pixels otherwise they are in standard
   text-based coordinates.  You can also force the pixel
   mode by including PIXEL as a command argument.
   
   RELATIVE < oRel > is an optional object in the Getlist which
   determines the start coordinates of this object.  If this
   option is used, then the < nSrow >, < nSCol > coordinates are
   relative to the starting coordinates of < oRel > rather than
   the parent object.
   
   MASTER < oMaster > is a variable containing another spin button
   object that will be used as the master for this spin button.
   In this case, the spinbutton is displayed without the two
   pushbutton arrows.  Instead the value of the spinbutton is
   changed when one of the arrows on the master spinbutton is
   clicked.
   
   OBJECT < oObject > is the name of a local variable to assign
   to this spinbutton object.
   
   CALLBACK < bCallBack > is a code block that is evaluated
   when the end-spin is encountered or when a keyboard entry is
   made into the spinbutton text area.
   
   LIMITS < nBott >,< nTop > defines the valid range for numeric
   values of the spinbutton.  If the current value of the
   spinbutton is outside the newly defined range when this
   object is created, the value is set to the minimum or maximum
   valid value depending on whether the invalid value is less
   than the minimum or greater than the maximum valid value.
   
   In the default mode, changes to the value are somewhat slower
   when the mouse button is clicked on one of the arrows and the
   button remains pressed.  In the FASTSPIN mode, the spinbutton
   is in the "fast" operation. mode.   The value is incremented
   or decremented at twice the normal speed.  If the spinbutton is
   defined as the master for another spinbutton, the FASTSPIN
   option is ignored.
   
   By default, the numeric value in the entry field is displayed
   without leading zeros.  Use PADZERO to cause the display to
   contain leading zeros.
   
   < nVar > is the input/output variable.  This should be
   initialized to a numeric value.  It must not be a macro unless
   < nVar > is a codeblock that contains a macro. The < nVar > is
   automatically anchored via a Get-Set codeblock created by
   DC_GetAnchorCB() unless < lVar > is a custom Get-Set code block.
   
   SIZE < nWidth >,< nHeight > is the width and height of the
   spin button.  If the PIXEL option is set to .TRUE. in DCGET
   OPTIONS, then the numbers are in pixels otherwise they are
   in standard text-based numbers.
   
   PARENT < oParent > is the name of the variable that was assigned to
   the parent object for this object.  Only use this clause if you
   are placing this object onto another dialogue object. If this
   argument is not passed then the parent will be the object set
   with the DCSETPARENT command.
   
   PARENTID < cParentID > may be used in lieu of the PARENT < oParent >
   clause.  This identifies the ID of the parent instead of the
   parent's object variable name.
   
   FONT < bocFont > is a character string defining an optional font.
   The font string must conform to the Xbase++ standard, ie.
   "10.Courier.Bold".  It may also be a font object or a code block
   that returns a character string or a font object to later
   refresh with DC_GetRefresh().
   
   MESSAGE < bcMsg > is the message you want to display in the
   message area of the dialogue screen defined by the DCMESSAGEBOX
   command when the object is in focus.  Optionally, INTO < oMsgBox >
   will designate which message box to display the message into.
   If the INTO clause is not used, then the last message box in the
   GetList is the default. < oMsgBox > may also be any object that
   supports the :setCaption() method.  If < bcMsg > is a code-block,
   it must return a character string.
   
   WHEN < bWhen > is a code block that is evaluated in the event loop.
   This code block must return a logical value.  If the value
   returned is .FALSE. then the object will be disabled and grayed.
   If the value returned is .TRUE. then the object will be enabled.
   The object is passed as a parameter to the code block.
   
   HIDE < bHide > is a code block that is evaluated in the event loop.
   This code block must return a logical value.  If the value
   returned is .TRUE. then the object will be hidden from view.  If
   the value returned is .FALSE. then the object will be displayed.
   The object is passed as a parameter to the code block.
   
   EDITPROTECT < bProtect > is an optional condition tested during the
   execution of the GUI gets by the DCREAD GUI command, before the
   object receives input focus (before it is activated). When the
   condition returns the value .T. (true), the object receives the
   input focus.  Otherwise, it is skipped. < bProtect > is a code
   block that must return a logical value when evaluated. The code
   block is evaluated prior to the object receiving input focus.
   This clause behaves similar to the WHEN clause with the exception
   that the object is not disabled (grayed out).  The object is
   passed as a parameter to the code block.
   
   VALID < bValid > is an optional condition tested during the
   execution of the GUI gets by the READ command before an
   object loses input focus (before it is deactivated).  When
   the condition returns the value .T. (true), the object
   loses the input focus.  Otherwise, it remains active. < bValid >
   is a code block that must return a logical value when it is
   evaluated.  The object passed as a parameter to the code block.
   
   HELPCODE < cHelp > is a character string that is passed to the
   DC_HelpF1() function if F1 is pressed or the HELP button
   is clicked when this object has focus.  This HELPCODE allows
   the Help system to override the passing of the Procedure and
   Varname for more specific context-help.
   
   PRESENTATION < aPres > is a two-dimensional array. If specified,
   this contains presentation parameters for the spinbutton object.
   The first column of the array must contain #define constants
   from the XBP.CH file starting with the prefix XBP_PP_. These
   constants define the presentation parameters that can be set
   for the object and include colors and fonts. The second column
   of the array in < aPres > contains the value for each setting.
   These are also generally set using #define constants from the
   GRA.CH file.
   
   TOOLTIP < bcToolTip > is a character string which will display
   as a "Tool Tip" next to the object when the cursor is passed
   over the object. A semi-colon within the text indicates a new
   line.  If < bcToolTip > is a code-block, it must return a character
   string.  NOTE: The Tooltip painting method is run in another
   thread, therefore the codeblock should not run code that points
   to the current work area.  It may however, contain local, public
   or private variables.
   
   CURSOR < naCursor > may be either a numeric value or an array of
   3 elements which defines an optional mouse pointer to use for
   this object.  System mouse pointers start with
   XBPWINDOW_POINTERTYPE_ and are defined in XPB.CH.  The default
   pointer is XBPWINDOW_POINTERTYPE_POINTER.  < naCursor > may be a
   numeric resource ID that points to a Bit-Map that has been
   compiled with the resource compiler and linked to the .EXE.
   < naCursor > may be a 3-element array described as follows:
   
     Element  Type  Description
     -------  ---- ---------------------------------------------
       [1]      C   Optional name of .DLL containing the pointer
                    resource.
   
       [2]      N   The numeric resource ID of the pointer.  If
                    element 1 is a NIL, then this resource must be
                    linked into the .EXE.
   
       [3]      N   The type of resource as defined in XBP.CH.
   
   
   PREEVAL < bPreEval > is a code block to be evaluated by the GUI
   reader before the Xbase Parts object is created.  The object is
   passed to the code block.
   
   EVAL < bEval > is a code block to be evaluated by the GUI reader
   after the Xbase Parts object is created.  The object is passed
   to the code block.
   
   CARGO < xCargo > is any kind of data you wish to to add to the
   :cargo container for this object.  The cargo may be accessed
   at any time via the :cargo exported variable, however it will not
   be stored in the same manner it is entered.  The :cargo container
   of DCDIALOG objects is an array of at least three elements:
   
    [1] - A numeric value that is a pointer to the Getlist array
          for this object.
   
    [2] - A pointer to the GetList array.
   
    [3] - The value of < xCargo >.
   
    [4] and up - optional values added by the GUI reader.
   
   COLOR < ncFGc >, < ncBGc > are foreground and background colors.
   They may be character strings representing valid text-based
   colors supported by SetColor() or they may be numeric constants
   which begin with either the prefix GRA_CLR_ or the prefix
   XBPSYSCLR_ as defined in GRA.CH or XBP.CH. If < bncFGc > is a
   code block is must return a 2-element array containing a
   foreground and background color.
   
   ID < cId > is a unique identifier for this object.  This ID is used
   with functions like DC_GETORIGUPDATED() to determine the status
   of a get object.
   
   TITLE < cTitle > is a title to assign to this object.  The title
   is not displayed on the screen but is simply a description of the
   get object which is saved in the GetList.
   
   ACCELKEY < anAccel > is a numeric "hot-key" assignment that will set
   focus to the checkbox object when the hot-key is pressed.  The key
   must be a valid key with the prefix xbeK_*.  These keys are
   defined in APPEVENT.CH.  < anAccel > may also be an array of numeric
   values to assign more than one key to the object.
   
   GOTFOCUS < bGotFocus > is a code block that is evaluated when this
   object receives input focus.  < bGotFocus > := {|uNIL1,uNIL2,self|...}
   
   LOSTFOCUS < bLostFocus > is a code block that is evaluated when this
   object loses input focus.  < bLostFocus > := {|uNIL1,uNIL2,self|...}
   
   TABSTOP will cause the object (Xbase Part) to be set when using
   the Tab key.  Note: When logical groups are defined in a dialog
   using TABGROUP < nTabGroup >, TABSTOP is usually set to .T. (true)
   for the first dialog element in the group.  This allows the first
   dialog element of a group to be activated using the Tab key.
   
   NOTABSTOP will cause the object (Xbase Part) to be ignored when
   using the Tab key. This clause is needed only to override any
   default setting of TabStop by the DCGETOPTIONS [TABSTOP] command.
   
   TABGROUP < nTabGroup > allows objects (Xbase Parts) that are created
   immediately after one another in the GetList to be combined into
   logical groups. This allows the user to navigate within a dialog
   from group to group by pressing the Tab key.  Within a group of
   dialog elements navigation is performed using the cursor keys.
   
   Only constants defined in the XBP.CH file can be used as values
   for this instance variable.  The following table lists the
   available constants:
   
   #define constants for < nTabGroup >:
   
    Constant             Description
   
    XBP_NO_GROUP     *)  Dialog element does not belong to a group
    XBP_BEGIN_GROUP      Dialog element is the first in a group
                         (this begins the definition of the group)
    XBP_WITHIN_GROUP     Dialog element is within a group
    XBP_END_GROUP        Dialog element is the last in a group
                         (this ends the definition of the group)
   
   *) Default value
   
   GROUP < cGroup > is a "group" name (case-sensitive) to assign to
   this GetList object.  Assignment to a group makes it possible to
   perform operations only on GetList items which are members of a
   specified group, using functions such as DC_GetRefresh() or
   DC_ReadGui().
   
   VISIBLE determines whether the object is visible immediately after
   the call to the method :create() . By default the object follows
   the VISIBLE clause of the DCGETOPTIONS command.  Use the
   INVISIBLE clause to override the VISIBLE clause of DCGETOPTIONS.
   
   DATALINK < bLink > is an optional code block that is evaluated
   every time Get/Set codeblock is evaluated, ie when the data
   is read from the < uVar > into the object except when using
   a user-defined Get/Set code block.
   

Description:

    The command @..DCSPINBUTTON creates a new SpinButton edit
    object and adds the object to the array named GETLIST which
    is later processed by the DC_READGUI() function or by the
    DCREAD GUI command.  The GETLIST array must be first declared and
    initialized to the value of {}.  The command DCREAD GUI activates
    the edit mode for all objects found in the GetList array.
    A Getlist object remains stored as long as it is referenced
    in an array or by a variable.  The commands CLEAR and
    CLEAR GETS assign an empty array to the GetList variable.
    This also occurs after the completion of the DCREAD command
    if it is called without the SAVE option, causing all Get
    objects referenced by the GetList array to be released.
   
    @..DCSPINBUTTON objects can be combined with any objects that
    that use the DCDIALOG system, such as @..DCSAY..GET,
    @..DCRADIO, @..DCPUSHBUTTON, @..DCCHECKBOX or @..DCTABPAGE.
   

Notes:

    The object created by @ DCSPINBUTTON is an object of the
    XbpSpinButton() class, therefore it can be manipulated with
    any iVar or method supported by XbpSpinButton().
   

Examples:

    #include "dcdialog.ch"
    #include "gra.ch"
   
    #define nRed        aLocals[1]
    #define nGreen      aLocals[2]
    #define nBlue       aLocals[3]
    #define oRedSpin    aLocals[4]
    #define oGreenSpin  aLocals[5]
    #define oBlueSpin   aLocals[6]
    #define oColorBox   aLocals[7]
    #define oPS         aLocals[8]
   
    PROCEDURE Xtest()
   
    LOCAL aLocals[8], GetList := {}
   
    nRed   := 50 ; nGreen := 100 ; nBlue  := 150
   
    @ 2, 57 DCSPINBUTTON nRed SIZE 7 LIMITS 0,255 ;
            OBJECT oRedSpin ;
            CALLBACK {|a,b,o|o:GetData(),RGB(aLocals)}
    @ 0, 8  DCSAY 'Red' SAYSIZE 5 RELATIVE oRedSpin
   
    @ 4, 57 DCSPINBUTTON nGreen SIZE 7 LIMITS 0,255 ;
            OBJECT oGreenSpin ;
            CALLBACK {|a,b,o|o:GetData(),RGB(aLocals)}
    @ 0, 8  DCSAY 'Green' SAYSIZE 5 RELATIVE oGreenSpin
   
    @ 6, 57 DCSPINBUTTON nBlue SIZE 7 LIMITS 0,255 ;
            OBJECT oBlueSpin ;
            CALLBACK {|a,b,o|o:GetData(),RGB(aLocals)}
    @ 0, 8  DCSAY 'Blue' SAYSIZE 5 RELATIVE oBlueSpin
   
    @ 8, 56 DCSTATIC XBPSTATIC_TYPE_RAISEDBOX SIZE 10,2 ;
            GROUP oColorBox EVAL {|o|o:paint := {||RGB(aLocals)} }
   
    DCREAD GUI ;
      TITLE 'Spin-Button Demo' ;
      FIT ;
      ADDBUTTONS
   
    RETURN
   
    /* ------------------- */
   
    STATIC PROCEDURE RGB( aLocals )
   
    LOCAL aAttr := Array(GRA_AA_COUNT)
    LOCAL nMax, aOldAttr, aOldRGB
   
    oPS   := oColorBox:LockPS()
    nMax  := oPS:maxColorIndex()  // max colors
   
    // Set new RGB color and draw box
    aAttr[ GRA_AA_COLOR  ] := nMax
    aOldAttr := oPS:setAttrArea( aAttr )
    aOldRGB  := oPS:setColorIndex( nMax, {nRed,nGreen,nBlue} )
    GraBox( oPS, {0,0}, {100,100}, GRA_FILL )
    oPS:setAttrArea( aOldAttr )
    oPS:setColorIndex( nMax, aOldRGB )
    oColorBox:unlockPS( oPS )
   
    RETURN
   

Source/Library:

  DCDIALOG.CH

@ DCSTATIC

Create a STATIC object for displaying with GUI reader

Syntax:

   @ < nRow >,< nCol > DCSTATIC < nType > ;
       [SIZE < nWidth >, < nHeight >] ;
       [OBJECT < oObject >] ;
       [PARENT < oParent >] ;
       [PARENTID < cParentId >] ;
       [COLOR < bncFgC > [,< ncBgC >] ] ;
       [OPTIONS < nOptions >] ;
       [CARGO < xCargo >] ;
       [HIDE < bHide >] ;
       [CAPTION < ncboCaption >] ;
       [PRESENTATION < aPres >] ;
       [PIXEL] ;
       [FONT < bocFont >] ;
       [TOOLTIP < bcToolTip >] ;
       [CURSOR < naCursor >] ;
       [PREEVAL < bPreEval >] ;
       [EVAL < bEval >] ;
       [RELATIVE < oRel >] ;
       [ID < cId >] ;
       [TITLE < cTitle >] ;
       [TABSTOP]  ;
       [NOTABSTOP];
       [TABGROUP < nTabGroup >] ;
       [VISIBLE] ;
       [INVISIBLE] ;
       [GROUP < cGroup >] ;
       [VSCROLL < oParentV > RANGE < nVStart >, < nVEnd > ;
           [OBJECT < oObjectV > ] ] ;
       [HSCROLL < oParentH > RANGE < nHStart >, < nHEnd > ;
           [OBJECT < oObjectH > ] ]
   

Arguments:

   < nRow >, < nCol > are the coordinates on the screen.
   Coordinates are always relative to position 0,0 ie. Top,Left
   of the parent object, unless the RELATIVE < oRel > argument is
   used.  If no parent is assigned, then the parent is the Dialog
   box.  IF the PIXEL option is set to .TRUE. in DCGETOPTIONS,
   then the numbers are in pixels otherwise they are in standard
   text-based coordinates.  You can also force the pixel
   mode by including PIXEL as a command argument.
   
   < nType > defines the "type" of the static object.  Static
   objects can be anything supported by the XbpStatic()
   class - Text, Icons, BitMaps, Boxes, etc.  < nType > must be
   a constant starting with XBPSTATIC_TYPE_.  These constants
   are defined in XBP.CH.
   
   RELATIVE < oRel > is an optional object in the Getlist which
   determines the start coordinates of this object.  If this
   option is used, then the < nSrow >, < nSCol > coordinates are
   relative to the starting coordinates of < oRel > rather than
   the parent object.
   
   SIZE < nWidth >, < nHeight > defines the size of the object.
   If no size is given, then the object will be automatically
   sized to fit the caption.  IF the PIXEL option is set to .TRUE.
   in DCGETOPTIONS, then the numbers are in pixels otherwise they
   are in standard text-based coordinates.  You can also force the
   pixel mode by including PIXEL in the command.
   
   CAPTION < ncbCaption > is the caption to place on the object.
   The caption is the part of a DCSTATIC object that is displayed
   within the area of the object.  The caption can be a character
   string, a bitmap/icon resource (raster image), a bitmap object,
   or a code-block which returns a character string, numeric
   resource or bitmap object. If it is a character string, the
   string is assigned. If the caption is a bitmap or icon, the
   numeric resource ID of the bitmap or icon is assigned. If a
   resource ID is used, it must be defined in a resource file that
   is linked to the EXE file using the resource compiler.  If an
   object is used, it must be an object of the XbpBitMap() class.
   An object may be used only with Xbase++ 1.7 or later.  If
   < ncboCaption > is a code-block, the caption is refreshed with the
   DC_GetRefresh() function.
   
   When the DCSTATIC object is used to display lines, borders or
   boxes, the caption is not generally displayed. The single
   exception is when a DCSTATIC object of the
   XBPSTATIC_TYPE_GROUPBOX type is used to display a box with a
   title (caption) at the upper left.
   
   Predefined system icons:
   
   If the type of the XbpStatic object is XBPSTATIC_TYPE_SYSICON,
   the constant assigned to the caption identifies a predefined
   system icon. These do not need to be defined in a resource
   file and can not be linked to the EXE file using the resource
   compiler.  The constants are defined in the XBP.CH file.
   
   OBJECT < oObject > is the name of the variable to assign as a
   storage place for this object.
   
   PARENT < oParent > is the name of the variable that was assigned to
   the parent object for this object.  Only use this clause if you
   are placing this object onto another dialogue object. If this
   argument is not passed then the parent will be the object set
   with the DCSETPARENT command.
   
   PARENTID < cParentID > may be used in lieu of the PARENT < oParent >
   clause.  This identifies the ID of the parent instead of the
   parent's object variable name.
   
   FONT < cFont > is a character string defining an optional font.
   The font string must conform to the Xbase++ standard, ie.
   "10.Courier.Bold". It may also be a font object or a code block
   that returns a character string or a font object to later
   refresh with DC_GetRefresh().
   
   PRESENTATION < aPres > is a two-dimensional array. If specified,
   this contains presentation parameters for the Static object.
   The first column of the array must contain #define constants
   from the XBP.CH file starting with the prefix XBP_PP_. These
   constants define the presentation parameters that can be set
   for the object and include colors and fonts. The second column
   of the array in < aPres > contains the value for each setting.
   These are also generally set using #define constants from the
   GRA.CH file.
   
   OPTIONS < nOptions > is a set of options that can be used to
   align the text within the rectangular area of the Static object.
   Constants defined in the XBP.CH file are used for these options.
   If combinations of alignment options are required, the sum of
   the appropriate constants must be included in < nOptions >.
   
   TOOLTIP < bcToolTip > is a character string which will display
   as a "Tool Tip" next to the object when the cursor is passed
   over the object. A semi-colon within the text indicates a new
   line.  If < bcToolTip > is a code-block, it must return a character
   string.  NOTE: The Tooltip painting method is run in another
   thread, therefore the codeblock should not run code that points
   to the current work area.  It may however, contain local, public
   or private variables.
   
   CURSOR < naCursor > may be either a numeric value or an array of
   3 elements which defines an optional mouse pointer to use for
   this object.  System mouse pointers start with
   XBPWINDOW_POINTERTYPE_ and are defined in XPB.CH.  The default
   pointer is XBPWINDOW_POINTERTYPE_POINTER.  < naCursor > may be a
   numeric resource ID that points to a Bit-Map that has been
   compiled with the resource compiler and linked to the .EXE.
   < naCursor > may be a 3-element array described as follows:
   
     Element  Type  Description
     -------  ---- ---------------------------------------------
       [1]      C   Optional name of .DLL containing the pointer
                    resource.
   
       [2]      N   The numeric resource ID of the pointer.  If
                    element 1 is a NIL, then this resource must be
                    linked into the .EXE.
   
       [3]      N   The type of resource as defined in XBP.CH.
   
   PREEVAL < bPreEval > is a code block to be evaluated by the GUI
   reader before the Xbase Parts object is created.  The object is
   passed to the code block.
   
   EVAL < bEval > is a code block to be evaluated by the GUI reader
   after the Xbase Parts object is created.  The object is passed
   to the code block.
   
   CARGO < xCargo > is any kind of data you wish to to add to the
   :cargo container for this object.  The cargo may be accessed
   at any time via the :cargo exported variable, however it will not
   be stored in the same manner it is entered.  The :cargo container
   of DCDIALOG objects is an array of at least three elements:
   
    [1] - A numeric value that is a pointer to the Getlist array
          for this object.
   
    [2] - A pointer to the GetList array.
   
    [3] - The value of < xCargo >.
   
    [4] and up - optional values added by the GUI reader.
   
   COLOR < ncFGc >, < ncBGc > are foreground and background colors.
   They may be character strings representing valid text-based
   colors supported by SetColor() or they may be numeric constants
   which begin with either the prefix GRA_CLR_ or the prefix
   XBPSYSCLR_ as defined in GRA.CH or XBP.CH. If < bncFGc > is a
   code block is must return a 2-element array containing a
   foreground and background color.
   
   ID < cId > is a unique identifier for this object.  This ID is used
   with functions like DC_GETORIGUPDATED() to determine the status
   of a get object.
   
   TITLE < cTitle > is a title to assign to this object.  The title
   is not displayed on the screen but is simply a description of the
   get object which is saved in the GetList.
   
   HIDE < bHide > is a code block that is evaluated in the event loop.
   This code block must return a logical value.  If the value
   returned is .TRUE. then the object will be hidden from view.  If
   the value returned is .FALSE. then the object will be displayed.
   The object is passed as a parameter to the code block.
   
   GOTFOCUS < bGotFocus > is a code block that is evaluated when this
   object receives input focus.  < bGotFocus > := {|uNIL1,uNIL2,self|...}
   
   LOSTFOCUS < bLostFocus > is a code block that is evaluated when this
   object loses input focus.  < bLostFocus > := {|uNIL1,uNIL2,self|...}
   
   TABSTOP will cause the object (Xbase Part) to be set when using
   the Tab key.  Note: When logical groups are defined in a dialog
   using TABGROUP < nTabGroup >, TABSTOP is usually set to .T. (true)
   for the first dialog element in the group.  This allows the first
   dialog element of a group to be activated using the Tab key.
   
   NOTABSTOP will cause the object (Xbase Part) to be ignored when
   using the Tab key. This clause is needed only to override any
   default setting of TabStop by the DCGETOPTIONS [TABSTOP] command.
   
   TABGROUP < nTabGroup > allows objects (Xbase Parts) that are created
   immediately after one another in the GetList to be combined into
   logical groups. This allows the user to navigate within a dialog
   from group to group by pressing the Tab key.  Within a group of
   dialog elements navigation is performed using the cursor keys.
   
   Only constants defined in the XBP.CH file can be used as values
   for this instance variable.  The following table lists the
   available constants:
   
   #define constants for < nTabGroup >:
   
    Constant             Description
   
    XBP_NO_GROUP     *)  Dialog element does not belong to a group
    XBP_BEGIN_GROUP      Dialog element is the first in a group
                         (this begins the definition of the group)
    XBP_WITHIN_GROUP     Dialog element is within a group
    XBP_END_GROUP        Dialog element is the last in a group
                         (this ends the definition of the group)
   
   *) Default value
   
   GROUP < cGroup > is a "group" name (case-sensitive) to assign to
   this GetList object.  Assignment to a group makes it possible to
   perform operations only on GetList items which are members of a
   specified group, using functions such as DC_GetRefresh() or
   DC_ReadGui().
   
   VISIBLE determines whether the object is visible immediately after
   the call to the method :create() . By default the object follows
   the VISIBLE clause of the DCGETOPTIONS command.  Use the
   INVISIBLE clause to override the VISIBLE clause of DCGETOPTIONS
   
   VSCROLL is used to attach a vertical scroll bar to the right side
   of parent object < oParentV > and scroll the static window within
   the range of < nVStart > and, < nVEnd >.  For best results the static
   window created by this DCSTATIC command should be a child of
   < oParentV >.  The optional clause OBJECT < oObjectV > is used to
   store a pointer to the scrollbar object.  See the example.
   
   HSCROLL is used to attach a horizontal scroll bar to the bottom
   of parent object < oParentH > and scroll the static window within
   the range of < nHStart > and, < nHEnd >.  For best results the static
   window created by this DCSTATIC command should be a child of
   < oParentH >.  The optional clause OBJECT < oObjectH > is used to
   store a pointer to the scrollbar object.  See the example.
   

Description:

    The command @..DCSTATIC creates a new Static object and
    adds the object to the array named GETLIST which is later
    processed by the DC_READGUI() function or by the DCREAD GUI
    command.  The GETLIST array must be first declared and
    initialized to the value of {}.  The command DCREAD GUI activates
    the edit mode for all objects found in the GetList array.
    A Getlist object remains stored as long as it is referenced
    in an array or by a variable.  The commands CLEAR and
    CLEAR GETS assign an empty array to the GetList variable.
    This also occurs after the completion of the DCREAD command
    if it is called without the SAVE option, causing all Get
    objects referenced by the GetList array to be released.
   
    @..DCSTATIC objects can be combined with any objects that
    that use the DCDIALOG system, such as @..DCSAY..GET,
    @..DCRADIO, @..DCPUSHBUTTON or @..DCMULTILINE.
   

Notes:

    The object created by @ DCSTATIC is an object of the
    XbpStatic() class, therefore it can be manipulated with
    any iVar or method supported by XbpStatic().
   

Examples:

   #include "dcdialog.ch"
   
   * -- Example 1 -- *
   
   PROCEDURE Xtest()
   
   LOCAL GetList := {}, oStatic1
   
   @ 0,0 DCSTATIC XBPSTATIC_TYPE_RECESSEDBOX SIZE 20,4 ;
      OBJECT oStatic1
   
   @ 6,0 DCSTATIC XBPSTATIC_TYPE_RAISEDBOX SIZE 20,4
   
   @ 2,1 DCSTATIC XBPSTATIC_TYPE_TEXT SIZE 15,1 ;
      CAPTION 'This is text' PARENT oStatic1
   
   DCREAD GUI ;
      TITLE 'Static Demo' ;
      FIT ;
      ADDBUTTONS
   
   RETURN
   
   
   *-- Example 2 --*
   
   FUNCTION ScrollTest()
   
   LOCAL GetList := {}, oStatic1, oStatic2, oStatic3, i, aGets[20]
   
   @ 0,0 DCSTATIC TYPE XBPSTATIC_TYPE_RECESSEDBOX SIZE 40,10 ;
         OBJECT oStatic1
   
   @ .5,1 DCSTATIC TYPE XBPSTATIC_TYPE_TEXT SIZE 38,9 ;
         OBJECT oStatic2
   
   @ 1,1 DCSTATIC TYPE XBPSTATIC_TYPE_TEXT SIZE 70,25 ;
         OBJECT oStatic3 ;
         PARENT oStatic2 ;
         FONT '12.Alaska Crt' ;
         VSCROLL oStatic1 RANGE 0,500 ;
         HSCROLL oStatic1 RANGE 0,500
   
   FOR i := 1 TO 20
     aGets[i] := i
     @ i-1,1 DCSAY Str(i,2) + ;
       ' This................is.................Get ' + ;
       Str(i,2) GET aGets[i] PICT '99999' ;
       SAYSIZE 0 PARENT oStatic3
   NEXT
   
   DCREAD GUI FIT ADDBUTTONS TITLE 'Scrolling a Static Window'
   
   RETURN nil
   

Source/Library:

  DCDIALOG.CH

@ DCTABPAGE

Create a TAB PAGE object for displaying with GUI reader

Syntax:

   @ < nSRow >,< nSCol > DCTABPAGE < oGroup > ;
       [SIZE < nWidth >, < nHeight >] ;
       [TYPE < nType >] ;
       [TABHEIGHT < nTabH >] ;
       [TABWIDTH < nTabW >] ;
       [PREOFFSET < nPre >] ;
       [POSTOFFSET < nPost >] ;
       [PARENT < oParent >] ;
       [PARENTID < cParentId >] ;
       [GROUP < nGroup >] ;
       [CAPTION < cText >] ;
       [CARGO < xCargo >] ;
       [MESSAGE < bcMsg >] ;
       [HELPCODE < cHelpCode >] ;
       [COLOR < bncColor > [,< ncDisabled >] ] ;
       [WHEN < bWhen >] ;
       [FONT < bocFont >] ;
       [HIDE < bHide >] ;
       [VALID < bValid >] ;
       [PIXEL] ;
       [TOOLTIP < bcToolTip >] ;
       [MESSAGE < cMsg > [INTO < oMsgBox >]] ;
       [CURSOR < naCursor >] ;
       [RELATIVE < oRel >] ;
       [PREEVAL < bPreEval >] ;
       [EVAL < bEval >] ;
       [ID < cId >] ;
       [TITLE < cTitle >] ;
       [ACCELKEY < anAccel >] ;
       [GOTFOCUS < bGotFocus >] ;
       [LOSTFOCUS < bLostFocus >] ;
       [TABSTOP]  ;
       [NOTABSTOP];
       [TABGROUP < nTabGroup >] ;
       [VISIBLE] ;
       [INVISIBLE] ;
       [GROUP < cGroup >] ;
       [STATICAREA < oStaticArea >] ;
       [ANGLE < nAngle >]
   

Arguments:

   < nSRow >, < nSCol > are the coordinates on the screen.
   Coordinates are always relative to position 0,0 ie. Top,Left
   of the parent object unless the RELATIVE argument is used.
   If no parent is assigned, then the parent is the Dialogue box.
   IF the PIXEL option is set to .TRUE. in DCGETOPTIONS, then
   the numbers are in pixels otherwise they are in standard
   text-based coordinates.  You can also force the pixel
   mode by including PIXEL as a command argument.
   
   CAPTION < cCaption > is the caption to place on the tab.
   
   RELATIVE < oRel > is an optional object in the Getlist which
   determines the start coordinates of this object.  If this
   option is used, then the < nSrow >, < nSCol > coordinates are
   relative to the starting coordinates of < oRel > rather than
   the parent object.  This option also allows for the automatic
   sizing of the TabPage, Tab Widths, and Tab locations.
   
   SIZE < nWidth >, < nHeight > defines the size of the tabpage.
   If no size is given, then the tabpage will be automatically
   sized to fit the parent window.  IF the PIXEL option is set to
   .TRUE. in DCGETOPTIONS, then the numbers are in pixels,
   otherwise they are in standard text-based coordinates.  You
   can also force the pixel mode by including PIXEL in the command.
   It is recommended that the SIZE parameters be used only on the
   first tabpage in a set and that all other tabpages be established
   as "relative" to the previous tabpage.  Assigning a tabpage as
   RELATIVE to a previous tabpage will cause the TabPage size to be
   the same size as the previous tabpage.
   
   TYPE < nType > is one of the #define constants XBPTABPAGE_TAB_TOP
   or XBPTABPAGE_TAB_BOTTOM.  TYPE will determine whether to
   display the tab at the top or bottom of the page. The default
   is top.
   
   < oGroup > is the name of the variable to assign as a storage
   place for this object.
   
   PARENT < oParent > is the name of the variable that was assigned to
   the parent object for this object.  Only use this clause if you
   are placing this object onto another dialogue object. If this
   argument is not passed then the parent will be the object set
   with the DCSETPARENT command.
   
   PARENTID < cParentID > may be used in lieu of the PARENT < oParent >
   clause.  This identifies the ID of the parent instead of the
   parent's object variable name.
   
   MESSAGE < bcMsg > is the message you want to display in the
   message area of the dialogue screen defined by the DCMESSAGEBOX
   command when the object is in focus.  Optionally, INTO < oMsgBox >
   will designate which message box to display the message into.
   If the INTO clause is not used, then the last message box in the
   GetList is the default. < oMsgBox > may also be any object that
   supports the :setCaption() method.  If < bcMsg > is a code-block,
   it must return a character string.
   
   HELPCODE < cHelp > is a character string that is passed to the
   DC_HelpF1() function if F1 is pressed when the mouse is placed
   over any area of the tab page that does not contain an object.
   The help code is used by the Help system to override the
   passing of the Procedure and Varname for more specific
   context-help.
   
   TABHEIGHT < nTabH > is the height of the tab (in pixels).  The
   default height is calculated automatically as 1.5 times the
   height of the title bar of the window. This is usually 33
   pixels. If < nTabH > is set to zero, no tab is displayed.
   
   TABWIDTH < nTabW > is the width of the tab.  The numeric value is
   in text-based columns unless the PIXEL clause is used.  This
   optional clause is intended to be used in lieu of the PREOFFSET
   and POSTOFFSET clauses because it is simpler.  It should also
   be used only on the first TabPage of a group of relative
   tabpages.  All relative TabPages will inherit this width.
   
   PREOFFSET < nPre > and POSTOFFSET < nPost > are numeric values
   used to determine the starting and ending position of each tab.
   The numeric values are percentage values from 0 to 100 for the
   for the percentage of the offset.  See the XbpTabPage()
   documentation for more information.  If a value is not given then
   a PREOFFSET of 0 and a POSTOFFSET of 85 are default.  It is
   recommended that PREOFFSET/POSTOFFSET be used only on the first
   tabpage in a set and that all other tabpages be established as
   "relative" to the previous tabpage.  Assigning a tabpage as
   RELATIVE to a previous tabpage will cause the Tab Size and
   location to be automatically assigned.
   
   PRESENTATION < aPres > is a two-dimensional array. If specified,
   this contains presentation parameters for the TabPage object.
   The first column of the array must contain #define constants
   from the XBP.CH file starting with the prefix XBP_PP_. These
   constants define the presentation parameters that can be set
   for the object and include colors and fonts. The second column
   of the array in < aPres > contains the value for each setting.
   These are also generally set using #define constants from the
   GRA.CH file.
   
   FONT < cFont > is a character string defining an optional font.
   The font string must conform to the Xbase++ standard, ie.
   "10.Courier.Bold". It may also be a font object or a code block
   that returns a character string or a font object to later
   refresh with DC_GetRefresh().
   
   TOOLTIP < bcToolTip > is a character string which will display
   as a "Tool Tip" next to the object when the cursor is passed
   over the object. A semi-colon within the text indicates a new
   line.  If < bcToolTip > is a code-block, it must return a character
   string.  NOTE: The Tooltip painting method is run in another
   thread, therefore the codeblock should not run code that points
   to the current work area.  It may however, contain local, public
   or private variables.
   
   CURSOR < naCursor > may be either a numeric value or an array of
   3 elements which defines an optional mouse pointer to use for
   this object.  System mouse pointers start with
   XBPWINDOW_POINTERTYPE_ and are defined in XPB.CH.  The default
   pointer is XBPWINDOW_POINTERTYPE_POINTER.  < naCursor > may be a
   numeric resource ID that points to a Bit-Map that has been
   compiled with the resource compiler and linked to the .EXE.
   < naCursor > may be a 3-element array described as follows:
   
     Element  Type  Description
     -------  ---- ---------------------------------------------
       [1]      C   Optional name of .DLL containing the pointer
                    resource.
   
       [2]      N   The numeric resource ID of the pointer.  If
                    element 1 is a NIL, then this resource must be
                    linked into the .EXE.
   
       [3]      N   The type of resource as defined in XBP.CH.
   
   PREEVAL < bPreEval > is a code block to be evaluated by the GUI
   reader before the Xbase Parts object is created.  The object is
   passed to the code block.
   
   EVAL < bEval > is a code block to be evaluated by the GUI reader
   after the Xbase Parts object is created.  The object is passed
   to the code block.
   
   VALID < bValid > is a code block to evaluate when the tabpage
   is minimized and another tabpage is selected.  This code block
   must return a logical value.  If the value returned is .TRUE.
   then the tabpage will be minimized otherwise another tabpage
   cannot be selected.
   
   CARGO < xCargo > is any kind of data you wish to to add to the
   :cargo container for this object.  The cargo may be accessed
   at any time via the :cargo exported variable, however it will not
   be stored in the same manner it is entered.  The :cargo container
   of DCDIALOG objects is an array of at least three elements:
   
    [1] - A numeric value that is a pointer to the Getlist array
          for this object.
   
    [2] - A pointer to the GetList array.
   
    [3] - The value of < xCargo >.
   
    [4] and up - optional values added by the GUI reader.
   
   COLOR < bncColor >, < ncDisabled > are enabled and disabled colors.
   The tabpage will be set to the enable color if the WHEN clause
   evaluates .TRUE. and to the disabled color if the WHEN clause
   evaluates .FALSE.  They must be numeric constants which begin
   with either the prefix GRA_CLR_ or the prefix XBPSYSCLR_ as
   defined in GRA.CH or XBP.CH. If < bncColor > is a code block is
   must return a 2-element array containing an enabled and
   disabled color.
   
   ID < cId > is a unique identifier for this object.  This ID is used
   with functions like DC_GETORIGUPDATED() to determine the status
   of a get object.
   
   TITLE < cTitle > is a title to assign to this object.  The title
   is not displayed on the screen but is simply a description of the
   get object which is saved in the GetList.
   
   WHEN < bWhen > is a code block that is evaluated in the event loop.
   This code block must return a logical value.  If the value
   returned is .FALSE. then the tabpage will be disabled and grayed.
   If the value returned is .TRUE. then the tabpage will be enabled.
   The object is passed as a parameter to the code block.
   
   HIDE < bHide > is a code block that is evaluated in the event loop.
   This code block must return a logical value.  If the value
   returned is .TRUE. then the tabpage will be hidden from view.  If
   the value returned is .FALSE. then the tabpage will be displayed.
   The object is passed as a parameter to the code block.
   
   ACCELKEY < anAccel > is a numeric "hot-key" assignment that will set
   focus to the checkbox object when the hot-key is pressed.  The key
   must be a valid key with the prefix xbeK_*.  These keys are
   defined in APPEVENT.CH.  < anAccel > may also be an array of numeric
   values to assign more than one key to the object.
   
   GOTFOCUS < bGotFocus > is a code block that is evaluated when this
   object receives input focus.  < bGotFocus > := {|uNIL1,uNIL2,self|...}
   
   LOSTFOCUS < bLostFocus > is a code block that is evaluated when this
   object loses input focus.  < bLostFocus > := {|uNIL1,uNIL2,self|...}
   
   TABSTOP will cause the object (Xbase Part) to be set when using
   the Tab key.  Note: When logical groups are defined in a dialog
   using TABGROUP < nTabGroup >, TABSTOP is usually set to .T. (true)
   for the first dialog element in the group.  This allows the first
   dialog element of a group to be activated using the Tab key.
   
   NOTABSTOP will cause the object (Xbase Part) to be ignored when
   using the Tab key. This clause is needed only to override any
   default setting of TabStop by the DCGETOPTIONS [TABSTOP] command.
   
   TABGROUP < nTabGroup > allows objects (Xbase Parts) that are created
   immediately after one another in the GetList to be combined into
   logical groups. This allows the user to navigate within a dialog
   from group to group by pressing the Tab key.  Within a group of
   dialog elements navigation is performed using the cursor keys.
   
   Only constants defined in the XBP.CH file can be used as values
   for this instance variable.  The following table lists the
   available constants:
   
   #define constants for < nTabGroup >:
   
    Constant             Description
   
    XBP_NO_GROUP     *)  Dialog element does not belong to a group
    XBP_BEGIN_GROUP      Dialog element is the first in a group
                         (this begins the definition of the group)
    XBP_WITHIN_GROUP     Dialog element is within a group
    XBP_END_GROUP        Dialog element is the last in a group
                         (this ends the definition of the group)
   
   *) Default value
   
   GROUP < cGroup > is a "group" name (case-sensitive) to assign to
   this GetList object.  Assignment to a group makes it possible to
   perform operations only on GetList items which are members of a
   specified group, using functions such as DC_GetRefresh() or
   DC_ReadGui().
   
   VISIBLE determines whether the object is visible immediately after
   the call to the method :create() . By default the object follows
   the VISIBLE clause of the DCGETOPTIONS command.  Use the
   INVISIBLE clause to override the VISIBLE clause of DCGETOPTIONS
   
   STATICAREA < oStaticArea > will create an XbpStatic object covering
   the entire area of the TabPage.  This is a text-type static which
   will appear to be invisible.  This clause should be used when
   placing @..DCSAY..GET or DCGET objects on a Tab page and the
   HILITE < nColor > clause of DCGETOPTIONS is used to hilite the
   currently selected GET.  The gets should use < oStaticArea > as the
   parent rather than < oTabPage > to prevent the TabPage from looking
   strange after highlighting gets - this is an Xbase++ anomoly.
   
   ANGLE < nAngle > is used to put a beveled edge on the sides of
   the tab.  This is a numeric value from 0 - 90.
   

Description:

    The command @..DCTABPAGE creates a new Tab Page object and
    adds the object to the array named GETLIST which is later
    processed by the DC_READGUI() function or by the DCREAD GUI
    command.  The GETLIST array must be first declared and
    initialized to the value of {}.  The command DCREAD GUI activates
    the edit mode for all objects found in the GetList array.
    A Getlist object remains stored as long as it is referenced
    in an array or by a variable.  The commands CLEAR and
    CLEAR GETS assign an empty array to the GetList variable.
    This also occurs after the completion of the DCREAD command
    if it is called without the SAVE option, causing all Get
    objects referenced by the GetList array to be released.
   
    @..DCTABPAGE objects can be combined with any objects that
    that use the DCDIALOG system, such as @..DCSAY..GET,
    @..DCRADIO, @..DCPUSHBUTTON or @..DCMULTILINE.
   

Exported Instance Variables:

   

Methods:

   

Notes:

    The TabPage object created by @ DCTABPAGE is an object of the
    XbpTabPage() class, therefore it can be manipulated with
    any iVar or method supported by XbpTabPage().
   
    Navigation between Tab-Pages is accomplished via the following
    keys:
   
    Key                         Action
    ------------------------  ------------------------------------
    Control-Tab               Select Next Tab-Page
    Control-Shift-Tab         Select Previous Tab-Page
   

Examples:

   #include 'dcdialog.ch'
   
   PROCEDURE Xtest()
   
   LOCAL oTabPage1, oTabPage2, oTabPage3, cDesc := Space(30),;
         aType := {'Star-Trek','Hollywood','Sports','Other'},;
         cType := Space(15), dDateOrig := Date(), dDateAcqu := Date(),;
         nOrigPrice := 0, nApprValue := 0, cMemo := '', ;
         GetList := {}
   
   /* ---- Tab Page #1 ---- */
   
   @  0,0 DCTABPAGE oTabPage1 CAPTION 'Collection' ;
      SIZE 72,15 PREOFFSET 0 POSTOFFSET 85
   
   @  3,2  DCSAY "Description" GET cDesc SAYRIGHT PARENT oTabPage1
   
   @  5,10  DCSAY "Type" PARENT oTabPage1 SAYSIZE 8
   
   @  6,10 DCCOMBOBOX cType LIST aType SIZE 12,6 PARENT oTabPage1
   
   
   /* ---- Tab Page #2 ---- */
   
   @  0,0 DCTABPAGE oTabPage2 CAPTION 'Financial' ;
      RELATIVE oTabPage1
   
   @  4,2 DCSAY "  Original Date" GET dDateOrig  PICT '99/99/9999' ;
      PARENT oTabPage2 SAYRIGHT
   
   @  6,2 DCSAY "  Acquired Date" GET dDateAcqu  PICT '99/99/9999' ;
      PARENT oTabPage2 SAYRIGHT
   
   @  8,2 DCSAY " Acquired Price" GET nOrigPrice PICT '9999.99'  ;
      PARENT oTabPage2 SAYRIGHT
   
   @ 10,2 DCSAY "Appraised Value" GET nApprValue PICT '9999.99'  ;
      PARENT oTabPage2 SAYRIGHT
   
   /* ---- Tab Page #3 ---- */
   
   @  0,0 DCTABPAGE oTabPage3 CAPTION 'Memo' ;
      RELATIVE oTabPage2
   
   @  5,2 DCMULTILINE cMemo PARENT oTabPage3 SIZE 65,8 ;
      FONT "10.Courier.Bold"
   
   DCREAD GUI ;
      TITLE 'Tab-Page Demo' ;
      FIT ;
      ADDBUTTONS
   
   RETURN
   

Source/Library:

  DCDIALOG.CH

@ DCTOOLBAR

Create a TOOLBAR object for displaying with GUI reader

Syntax:

   [@ < nSRow >, < nSCol >] DCTOOLBAR < oToolBar > ;
       [TYPE < nType >] ;
       [FANCY] ;
       [VERTICAL] ;
       [HORIZONTAL] ;
       [SIZE < nWidth > [,< nHeight >]] ;
       [BUTTONSIZE < nBWidth >, [< nBHeight >]] ;
       [PARENT < oParent >] ;
       [PARENTID < cParentId >] ;
       [PRESENTATION < aPres >] ;
       [COLOR < ncFgC > [,< ncBgC >] ] ;
       [WHEN < bWhen >] ;
       [HIDE < bHide >] ;
       [CARGO < xCargo >] ;
       [PIXEL] ;
       [PREEVAL < bPreEval >] ;
       [EVAL < bEval >] ;
       [ID < cId >] ;
       [CURSOR < naCursor >] ;
       [TITLE < cTitle >] ;
       [GROUP < cGroup >] ;
       [VISIBLE] ;
       [INVISIBLE]
   

Arguments:

   < nSRow >, < nSCol > are the optional coordinates on the screen.
   Coordinates are always relative to position 0,0 ie. Top,Left
   of the parent object unless the RELATIVE argument is used.
   If no parent is assigned, then the parent is the Dialogue box.
   IF the PIXEL option is set to .TRUE. in DCGETOPTIONS, then
   the numbers are in pixels otherwise they are in standard
   text-based coordinates.  You can also force the pixel
   mode by including PIXEL as a command argument.
   
   < oToolBar > is the name of the variable to assign as a storage
   place for this object.
   
   TYPE < nType > is the type of toolbar.  ToolBars are created using
   XbpStatic() objects, so valid constants start with the prefix
   XBPSTATIC_TYPE_ and are listed in XBP.CH.  The default is
   XBPSTATIC_TYPE_RAISEDBOX.
   
   FANCY will cause all buttons to be displayed in a special mode
   in which the button will be displayed only as a caption on the
   toolbar until the mouse is passed over the caption which will
   then display the raised button.  DC_FancyButtonMode(1) can be
   used to override this clause and force normal buttons.
   CAUTION: FANCY cannot be used with a button captions that are
   bitmap objects, however it can be used with captions that are
   bitmap resources.
   
   VERTICAL or HORIZONTAL is required only if the orientation of
   the buttons on the toolbar cannot be automatically determined
   by the width/height ratio of the toolbar.  For example, by
   default a toolbar with a width greater than the height would
   automatically stack buttons from left to right.
   
   PARENT < oParent > is the name of the variable that was assigned to
   the parent object for this object.  Only use this clause if you
   are placing this object onto another dialogue object.  If this
   argument is not passed then the parent will be the object set
   with the DCSETPARENT command.
   
   PARENTID < cParentID > may be used in lieu of the PARENT < oParent >
   clause.  This identifies the ID of the parent instead of the
   parent's object variable name.
   
   SIZE < nWidth >, < nHeight > optionally define the size of the
   toolbar.  If no size is given, then the toolbar will be
   automatically sized to fit the parent window.  IF the PIXEL
   option is set to .TRUE. in DCGETOPTIONS, then the numbers are
   in pixels otherwise they are in standard text-based coordinates.
   You can also force the pixel mode by including PIXEL in the
   command.
   
   BUTTONSIZE < nBWidth >, < nBHeight > optionally define the size of
   the buttons which will be added to the toolbar via the DCADDBUTTON
   command in the event that the SIZE clause of the DCADDBUTTON
   command is not used.
   
   PRESENTATION < aPres > is a two-dimensional array. If specified,
   this contains presentation parameters for the Toolbar object.
   The first column of the array must contain #define constants
   from the XBP.CH file starting with the prefix XBP_PP_. These
   constants define the presentation parameters that can be set
   for the object and include colors and fonts. The second column
   of the array in < aPres > contains the value for each setting.
   These are also generally set using #define constants from the
   GRA.CH file.
   
   PREEVAL < bPreEval > is a code block to be evaluated by the GUI
   reader before the Xbase Parts object is created.  The object is
   passed to the code block.
   
   EVAL < bEval > is a code block to be evaluated by the GUI reader
   after the Xbase Parts object is created.  The object is passed
   to the code block.
   
   WHEN < bWhen > is a code block that is evaluated in the event loop.
   This code block must return a logical value.  If the value
   returned is .FALSE. then the object will be disabled and grayed.
   If the value returned is .TRUE. then the object will be enabled.
   The object is passed as a parameter to the code block.
   
   HIDE < bHide > is a code block that is evaluated in the event loop.
   This code block must return a logical value.  If the value
   returned is .TRUE. then the toolbar will be hidden from view.  If
   the value returned is .FALSE. then the toolbar will be displayed.
   The object is passed as a parameter to the code block.
   
   CARGO < xCargo > is any kind of data you wish to to add to the
   :cargo container for this object.  The cargo may be accessed
   at any time via the :cargo exported variable, however it will not
   be stored in the same manner it is entered.  The :cargo container
   of DCDIALOG objects is an array of at least three elements:
   
    [1] - A numeric value that is a pointer to the Getlist array
          for this object.
   
    [2] - A pointer to the GetList array.
   
    [3] - The value of < xCargo >.
   
    [4] and up - optional values added by the GUI reader.
   
   ID < cId > is a unique identifier for this object.  This ID is used
   with functions like DC_GETOBJECT() to determine the status
   of a get object.
   
   CURSOR < naCursor > may be either a numeric value or an array of
   3 elements which defines an optional mouse pointer to use for
   this object.  System mouse pointers start with
   XBPWINDOW_POINTERTYPE_ and are defined in XPB.CH.  The default
   pointer is XBPWINDOW_POINTERTYPE_POINTER.  < naCursor > may be a
   numeric resource ID that points to a Bit-Map that has been
   compiled with the resource compiler and linked to the .EXE.
   < naCursor > may be a 3-element array described as follows:
   
     Element  Type  Description
     -------  ---- ---------------------------------------------
       [1]      C   Optional name of .DLL containing the pointer
                    resource.
   
       [2]      N   The numeric resource ID of the pointer.  If
                    element 1 is a NIL, then this resource must be
                    linked into the .EXE.
   
       [3]      N   The type of resource as defined in XBP.CH.
   
   TITLE < cTitle > is a title to assign to this object.  The title
   is not displayed on the screen but is simply a description of the
   get object which is saved in the GetList.
   
   GROUP < cGroup > is a "group" name (case-sensitive) to assign to
   this GetList object.  Assignment to a group makes it possible to
   perform operations only on GetList items which are members of a
   specified group, using functions such as DC_GetRefresh() or
   DC_ReadGui().
   
   VISIBLE determines whether the object is visible immediately after
   the call to the method :create() . By default the object follows
   the VISIBLE clause of the DCGETOPTIONS command.  Use the
   INVISIBLE clause to override the VISIBLE clause of DCGETOPTIONS
   
   COLOR < ncFGc >, < ncBGc > are foreground and background colors.
   They may be character strings representing valid text-based
   colors supported by SetColor() or they may be numeric constants
   which begin with either the prefix GRA_CLR_ or the prefix
   XBPSYSCLR_ as defined in GRA.CH or XBP.CH. If < bncFGc > is a
   code block is must return a 2-element array containing a
   foreground and background color.
   

Description:

    The command @ DCTOOLBAR creates a new ToolBar object and
    adds the object to the array named GETLIST which is later
    processed by the DC_READGUI() function or by the DCREAD GUI
    command.  The GETLIST array must be first declared and
    initialized to the value of {}.  The command DCREAD GUI activates
    the edit mode for all objects found in the GetList array.
    A Getlist object remains stored as long as it is referenced
    in an array or by a variable.  The commands CLEAR and
    CLEAR GETS assign an empty array to the GetList variable.
    This also occurs after the completion of the DCREAD command
    if it is called without the SAVE option, causing all Get
    objects referenced by the GetList array to be released.
   
    Even though a toolbar can be created with a DCSTATIC object
    and DCPUSHBUTTON objects, the DCTOOLBAR command is much
    simpler to use for toolbars because it can optionally anchor
    the toolbar to the top, left, bottom, or right border of
    the main dialogue box or the parent.  DCTOOLBAR is used with
    DCADDBUTTON to add pushbuttons to the toolbar.
   
    DCTOOLBAR objects can be combined with any objects that
    that use the DCDIALOG system, such as @..DCSAY..GET,
    @..DCRADIO, @..DCPUSHBUTTON or @..DCMULTILINE.
   

Notes:

    The toolbar object created by @ DCTOOLBAR is an object of the
    XbpStatic() class, therefore it can be manipulated with
    any iVar or method supported by XbpStatic().
   

Examples:

   #include "dcdialog.ch"
   #include "dcbitmap.ch"
   
   PROCEDURE Xtest()
   
   LOCAL GetList := {}, oToolBar
   
   DCTOOLBAR oToolBar ALIGN TOOLBAR_TOP
   
   DCADDBUTTON PARENT oToolBar CAPTION 'Exit' ;
               SIZE 9 ;
               ACTION {||DC_ReadGuiEvent(DCGUI_EXIT_OK)}
   
   DCADDBUTTON PARENT oToolBar CAPTION 'Open' ;
               SIZE 9 ;
               ACTION {||OpenFile()}
   
   DCADDBUTTON PARENT oToolBar CAPTION 'Close' ;
               SIZE 9 ;
               ACTION {||CloseFile()}
   
   DCREAD GUI FIT ADDBUTTONS
   
   RETURN
   
   /* ---------------------- */
   
   STATIC PROCEDURE OpenFile()
   
   DC_MsgBox('File is now open')
   
   RETURN
   
   /* ---------------------- */
   
   STATIC PROCEDURE CloseFile()
   
   DC_MsgBox('File has been closed')
   
   RETURN
   

Source/Library:

  DCDIALOG.CH

See Also:

   DCADDBUTTON
   dc_fancybuttonmode()



@ DCTREEARRAY

Browse a multi-dimensional array using Tree-View

Syntax:

   @ < nRow >, < nCol > DCTREEARRAY < aArray > ;
          [ VAR < xVar > ] ;
          [ PARENT < oParent > ]       ;
          [ COLOR < fgC > [, < bgC > ] ] ;
          [ FONT < bocFont > ]          ;
          [ DATALINK < bLink > ]       ;
          [ SIZE < nWidth > [, < nHeight >] ] ;
          [ TITLE < title > ]          ;
          [ HIDE < bHide > ]           ;
          [ WHEN < bWhen > ]           ;
          [ PREEVAL < bPreEval > ]     ;
          [ EVAL < bEval > ]           ;
          [ RELATIVE < oRel > ]        ;
          [ OPTIONS < aOptions > ]     ;
          [ OBJECT < oObject > ]       ;
          [ ID < cId > ]               ;
          [ HASBUTTONS ]             ;
          [ HASLINES ]               ;
          [ GOTFOCUS < bGotFocus > ]   ;
          [ LOSTFOCUS < bLostFocus > ] ;
          [ TABSTOP ]                ;
          [ NOTABSTOP ]              ;
          [ VISIBLE ]                ;
          [ INVISIBLE ]              ;
          [ TABGROUP < nTabGroup > ]   ;
          [ GROUP < cGroup > ]                                            ;
   

Arguments:

   < nRow > and < nCol > are the row and column of the screen.
   Coordinates are always relative to position 0,0 ie. Top,Left
   of the parent object, unless the RELATIVE < oRel > argument is
   used.  If no parent is assigned, then the parent is the Dialog
   box. IF the PIXEL option is set to .TRUE. in DCGETOPTIONS,
   then the numbers are in pixels otherwise they are in standard
   text-based coordinates.  You can also force the pixel
   mode by including PIXEL as a command argument.
   
   < aArray > is the multi-dimensional array to browse.
   
   VAR < xVar > is the name of a local variable to store the value
   of the array item that is selected by the user.
   
   DATALINK < bLink > is a code block that is evaluated each time
   a new item is selected in the tree browse.
   
   OBJECT < oObject > is the variable to use as a container for the
   object after it is created by the GUI reader.
   
   RELATIVE < oRel > is an optional object in the Getlist which
   determines the start coordinates of this object.  If this
   option is used, then the < nSrow >, < nSCol > coordinates are
   relative to the starting coordinates of < oRel > rather than
   the parent object.
   
   FONT < cFont > is a character string defining an optional font.
   The font string must conform to the Xbase++ standard, ie.
   "10.Courier.Bold". It may also be a font object or a code block
   that returns a character string or a font object to later
   refresh with DC_GetRefresh().
   
   SIZE < nWidth > [,< nHeight >]] is the size to allocate to the
   Tree View window.  If the PIXEL option is set to .TRUE. in
   DCGETOPTIONS, then the size must be entered in pixels otherwise
   it must be entered in standard text length.
   
   PARENT < oParent > is the name of the variable that was assigned to
   the parent object for this object.  Only use this clause if you
   are placing this object onto another dialogue object. If this
   argument is not passed then the parent will be the object set
   with the DCSETPARENT command.
   
   WHEN < bWhen > is a code block that is evaluated in the event loop.
   This code block must return a logical value.  If the value
   returned is .FALSE. then the object will be disabled and grayed.
   If the value returned is .TRUE. then the object will be enabled.
   The object is passed as a parameter to the code block.
   
   HIDE < bHide > is a code block that is evaluated in the event loop.
   This code block must return a logical value.  If the value
   returned is .TRUE. then the object will be hidden from view.  If
   the value returned is .FALSE. then the object will be displayed.
   The object is passed as a parameter to the code block.
   
   COLOR < ncFGc >, < ncBGc > are foreground and background colors.
   They may be character strings representing valid text-based
   colors supported by SetColor() or they may be numeric constants
   which begin with either the prefix GRA_CLR_ or the prefix
   XBPSYSCLR_ as defined in GRA.CH or XBP.CH. If < bncFGc > is a
   code block is must return a 2-element array containing a
   foreground and background color.
   
   ID < cId > is a unique identifier for this object.  This ID is used
   with functions like DC_GETOBJECT() to determine the status
   of a get object.
   
   PREEVAL < bPreEval > is a code block to be evaluated by the GUI
   reader before the Xbase Parts object is created.  The object is
   passed to the code block.
   
   EVAL < bEval > is a code block to be evaluated by the GUI reader
   after the Xbase Parts object is created.  The object is passed
   to the code block.
   
   GOTFOCUS < bGotFocus > is a code block that is evaluated when this
   object receives input focus.
   
   LOSTFOCUS < bLostFocus > is a code block that is evaluated when this
   object loses input focus.
   
   TABSTOP will cause the object (Xbase Part) to be set when using
   the Tab key.  Note: When logical groups are defined in a dialog
   using TABGROUP < nTabGroup >, TABSTOP is usually set to .T. (true)
   for the first dialog element in the group.  This allows the first
   dialog element of a group to be activated using the Tab key.
   
   NOTABSTOP will cause the object (Xbase Part) to be ignored when
   using the Tab key. This clause is needed only to override any
   default setting of TabStop by the DCGETOPTIONS [TABSTOP] command.
   
   TABGROUP < nTabGroup > allows objects (Xbase Parts) that are created
   immediately after one another in the GetList to be combined into
   logical groups. This allows the user to navigate within a dialog
   from group to group by pressing the Tab key.  Within a group of
   dialog elements navigation is performed using the cursor keys.
   
   Only constants defined in the XBP.CH file can be used as values
   for this instance variable.  The following table lists the
   available constants:
   
   #define constants for < nTabGroup >:
   
    Constant             Description
   
    XBP_NO_GROUP     *)  Dialog element does not belong to a group
    XBP_BEGIN_GROUP      Dialog element is the first in a group
                         (this begins the definition of the group)
    XBP_WITHIN_GROUP     Dialog element is within a group
    XBP_END_GROUP        Dialog element is the last in a group
                         (this ends the definition of the group)
   
   *) Default value
   
   GROUP < cGroup > is a "group" name (case-sensitive) to assign to
   this GetList object.  Assignment to a group makes it possible to
   perform operations only on GetList items which are members of a
   specified group, using functions such as DC_GetRefresh() or
   DC_ReadGui().
   
   VISIBLE determines whether the object is visible immediately after
   the call to the method :create() . By default the object follows
   the VISIBLE clause of the DCGETOPTIONS command.  Use the
   INVISIBLE clause to override
   
   OPTIONS < aRef > is an optional reference array that is used to
   format the data in the browse.  If < aRef > is a NIL then the tree
   view will display the exact contents of the array.  < aRef > is an
   array of 5-element sub-arrays, 1 for each level of the array
   being browsed. The sub-arrays are defined as follows:
   
   Element Type Description
   ------- ---- ----------------------------------------------------
   
     [1]     B  Optional code block used to format the displayed
                data.  The array item and it's ordinal position
                within the array are passed as parameters.
                examples: {|a,n|a[1]}
                          {|a,n|filedata(a,n)}
   
     [2]     N  The resource ID of a bitmap or icon image to
                visualize the normal state of the array item
                (not marked and not expanded).
   
     [3]     N  The resource ID of a bitmap or icon image to
                visualize the marked state of the array item.
   
     [4]     N  The resource ID of a bitmap or icon image to
                visualize the expanded state of the array item.
   
     [5]     A  An optional array of numeric values containing
                the array elements to include in the expanded
                view.
   
   HASBUTTONS displays a Plus or Minus sign at each node of the
   tree. This indicates whether the next level of the tree can be
   expanded or suppressed.
   
   HASLINES displays lines between the nodes of the tree and their
   leaves. This results in a more readable display.
   

Description:

    The command @..DCTREEARRAY creates a new Tree Array object and
    adds the object to the array named GETLIST which is later
    processed by the DC_READGUI() function or by the DCREAD GUI
    command.  The GETLIST array must be first declared and
    initialized to the value of {}.  The command DCREAD GUI activates
    the edit mode for all objects found in the GetList array.
    A Getlist object remains stored as long as it is referenced
    in an array or by a variable.  The commands CLEAR and
    CLEAR GETS assign an empty array to the GetList variable.
    This also occurs after the completion of the DCREAD command
    if it is called without the SAVE option, causing all Get
    objects referenced by the GetList array to be released.
   
    @..DCTREEARRAY is used to browse a multi-dimensional array using
    a Tree-View style dialog.
   

Notes:

    The object created by @ DCTREEARRAY is an object of the
    XbpTreeView() class, therefore it can be manipulated with
    any iVar or method supported by XbpTreeView().
   

Examples:

   #INCLUDE "dcicon.ch"
   #INCLUDE "dctree.ch"
   
   FUNCTION Xtest()
   
   LOCAL aDirectory, aDirOptions, Getlist := {}, oDirtree1, oDirtree2
   
   aDirectory := Directory( '*.*' )
   IF Len(aDirectory) > 50
     ASize(aDirectory,50)
   ENDIF
   
   aDirOptions := { { {|a,n|a[1]},         ;
                      ICON_CLOSEDFOLDER, ;
                      ICON_CLOSEDFOLDER, ;
                      ICON_OPENFOLDER }, ;
                    { {|a,n|FileData(a,n)}, ;
                      ICON_CLOSEDFOLDER, ;
                      ICON_CLOSEDFOLDER, ;
                      ICON_OPENFOLDER, ;
                      { 2,3,4,7,8 } } }
   
   @ 2, 5 DCTREEARRAY aDirectory SIZE 40,13 ;
          OBJECT oDirTree1 OPTIONS aDirOptions
   
   @ 2,45 DCTREEARRAY aDirectory SIZE 40,13 ;
          OBJECT oDirTree2
   
   DCREAD GUI FIT BUTTONS DCGUI_BUTTON_EXIT ;
      TITLE 'Directory Browsers'
   
   RETURN nil
   
   /* ------------------- */
   
   STATIC FUNCTION FileData ( xData, nElement )
   
   LOCAL cData := DC_XtoC( xData ), cPrefix
   
   DO CASE
     CASE nElement = 2
       cPrefix := 'File Size: '
     CASE nElement = 3
       cPrefix := 'File Date: '
     CASE nElement = 4
       cPrefix := 'File Time: '
     CASE nElement = 7
       cPrefix := 'Creation Date: '
     CASE nElement = 8
       cPrefix := 'Creation Time: '
     OTHERWISE
       cPrefix := ''
   ENDCASE
   
   RETURN cPrefix + cData
   

Source/Library:

  DCTREE.CH

See Also:

   dc_guiabrowse()



@ DCTREEROOT

Create a Root object for a Tree View

Syntax:

   @ < nRow >, < nCol > DCTREEROOT  ;
        [ PARENT < oParent > ] ;
        [ COLOR < fgC > [, < bgC > ] ] ;
        [ FONT < bocFont > ] ;
        [ SIZE < nWidth > [, < nHeight >] ] ;
        [ HIDE < bHide > ] ;
        [ WHEN < bWhen > ] ;
        [ PREEVAL < bPreEval > ] ;
        [ EVAL < bEval > ] ;
        [ RELATIVE < oRel > ] ;
        [ OBJECT < oObject > ] ;
        [ ID < cId > ] ;
        [ TOOLTIP < cToolTip > ] ;
        [ TITLE < title > ] ;
        [ ACCELKEY < anAccel > ] ;
        [ HASBUTTONS ] ;
        [ HASLINES ] ;
        [ ALWAYSSHOWSELECTION ] ;
        [ GOTFOCUS < bGotFocus > ] ;
        [ LOSTFOCUS < bLostFocus > ] ;
        [ TABSTOP ] ;
        [ NOTABSTOP ] ;
        [ VISIBLE ] ;
        [ INVISIBLE ] ;
        [ TABGROUP < nTabGroup > ] ;
        [ GROUP < cGroup > ] ;
        [ ITEMCOLLAPSED < bItemCollapsed > ] ;
        [ ITEMEXPANDED < bItemExpanded > ] ;
        [ ITEMMARKED < bItemMarked > ] ;
        [ ITEMSELECTED < bItemSelected > ]
   

Arguments:

   < nRow > and < nCol > are the row and column of the screen.
   Coordinates are always relative to position 0,0 ie. Top,Left
   of the parent object, unless the RELATIVE argument is used.
   If no parent is assigned, then the parent is the Dialog box.
   IF the PIXEL option is set to .TRUE. in DCGETOPTIONS, then
   the numbers are in pixels otherwise they are in standard
   text-based coordinates.  You can also force the pixel
   mode by including PIXEL as a command argument.
   
   SIZE < nWidth >,< nHeight > is the width and height of the TreeView
   window.  If the PIXEL option is set to .TRUE. in DCGETOPTIONS,
   then the numbers are in pixels otherwise they are in standard
   text-based numbers.
   
   PARENT < oParent > is the name of the variable that was assigned to
   the parent object for this object.  Only use this clause if you
   are placing this object onto another dialogue object. If this
   argument is not passed then the parent will be the object set
   with the DCSETPARENT command.
   
   OBJECT < oObject > is the variable to use as a container for the
   object after it is created by the GUI reader.
   
   FONT < cFont > is a character string defining an optional font.
   The font string must conform to the Xbase++ standard, ie.
   "10.Courier.Bold". It may also be a font object or a code block
   that returns a character string or a font object to later
   refresh with DC_GetRefresh().
   
   MESSAGE < bcMsg > is the message you want to display in the
   message area of the dialogue screen defined by the DCMESSAGEBOX
   command when the object is in focus.  Optionally, INTO < oMsgBox >
   will designate which message box to display the message into.
   If the INTO clause is not used, then the last message box in the
   GetList is the default.
   
   WHEN < bWhen > is a code block that is evaluated in the event loop.
   This code block must return a logical value.  If the value
   returned is .FALSE. then the object will be disabled and grayed.
   If the value returned is .TRUE. then the object will be enabled.
   The object is passed as a parameter to the code block.
   
   HIDE < bHide > is a code block that is evaluated in the event loop.
   This code block must return a logical value.  If the value
   returned is .TRUE. then the object will be hidden from view.  If
   the value returned is .FALSE. then the object will be displayed.
   The object is passed as a parameter to the code block.
   
   HELPCODE < cHelp > is a character string that is passed to the
   DC_HelpF1() function if F1 is pressed or the HELP button
   is clicked when this GET has focus.  This HELPCODE allows
   the Help system to override the passing of the Procedure and
   Varname for more specific context-help.
   
   PRESENTATION < aPres > is a two-dimensional array. If specified,
   this contains presentation parameters for the ComboBox object.
   The first column of the array must contain #define constants
   from the XBP.CH file starting with the prefix XBP_PP_. These
   constants define the presentation parameters that can be set
   for the object and include colors and fonts. The second column
   of the array in < aPres > contains the value for each setting.
   These are also generally set using #define constants from the
   GRA.CH file.
   
   TOOLTIP < bcToolTip > is a character string which will display
   as a "Tool Tip" next to the object when the cursor is passed
   over the object. A semi-colon within the text indicates a new
   line.  If < bcToolTip > is a code-block, it must return a character
   string.  NOTE: The Tooltip painting method is run in another
   thread, therefore the codeblock should not run code that points
   to the current work area.  It may however, contain local, public
   or private variables.
   
   CURSOR < naCursor > may be either a numeric value or an array of
   3 elements which defines an optional mouse pointer to use for
   this object.  System mouse pointers start with
   XBPWINDOW_POINTERTYPE_ and are defined in XPB.CH.  The default
   pointer is XBPWINDOW_POINTERTYPE_POINTER.  < naCursor > may be a
   numeric resource ID that points to a Bit-Map that has been
   compiled with the resource compiler and linked to the .EXE.
   < naCursor > may be a 3-element array described as follows:
   
     Element  Type  Description
     -------  ---- ---------------------------------------------
       [1]      C   Optional name of .DLL containing the pointer
                    resource.
   
       [2]      N   The numeric resource ID of the pointer.  If
                    element 1 is a NIL, then this resource must be
                    linked into the .EXE.
   
       [3]      N   The type of resource as defined in XBP.CH.
   
   PREEVAL < bPreEval > is a code block to be evaluated by the GUI
   reader before the Xbase Parts object is created.  The object is
   passed to the code block.
   
   EVAL < bEval > is a code block to be evaluated by the GUI reader
   after the Xbase Parts object is created.  The object is passed
   to the code block.
   
   RELATIVE < oRel > is an optional object in the Getlist which
   determines the start coordinates of this object.  If this
   option is used, then the < nSrow >, < nSCol > coordinates are
   relative to the starting coordinates of < oRel > rather than
   the parent object.
   
   CARGO < xCargo > is any kind of data you wish to to add to the
   :cargo container for this object.  The cargo may be accessed
   at any time via the :cargo exported variable, however it will not
   be stored in the same manner it is entered.  The :cargo container
   of DCDIALOG objects is an array of at least three elements:
   
    [1] - A numeric value that is a pointer to the Getlist array
          for this object.
   
    [2] - A pointer to the GetList array.
   
    [3] - The value of < xCargo >.
   
    [4] and up - optional values added by the GUI reader.
   
   COLOR < ncFGc >, < ncBGc > are foreground and background colors.
   They may be character strings representing valid text-based
   colors supported by SetColor() or they may be numeric constants
   which begin with either the prefix GRA_CLR_ or the prefix
   XBPSYSCLR_ as defined in GRA.CH or XBP.CH.  IF < bncFGc > is a
   code block is must return a 2-element array containing a
   foreground and background color.
   
   ID < cId > is a unique identifier for this object.  This ID is used
   with functions like DC_GETORIGUPDATED() to determine the status
   of a get object.
   
   TITLE < cTitle > is a title to assign to this object.  The title
   is not displayed on the screen but is simply a description of the
   get object which is saved in the GetList.
   
   ACCELKEY < anAccel > is a numeric "hot-key" assignment that will set
   focus to the checkbox object when the hot-key is pressed.  The key
   must be a valid key with the prefix xbeK_*.  These keys are
   defined in APPEVENT.CH.  < anAccel > may also be an array of numeric
   values to assign more than one key to the object.
   
   GOTFOCUS < bGotFocus > is a code block that is evaluated when this
   object receives input focus.  < bGotFocus > := {|uNIL1,uNIL2,self|...}
   
   LOSTFOCUS < bLostFocus > is a code block that is evaluated when this
   object loses input focus.  < bLostFocus > := {|uNIL1,uNIL2,self|...}
   
   TABSTOP will cause the object (Xbase Part) to be set when using
   the Tab key.  Note: When logical groups are defined in a dialog
   using TABGROUP < nTabGroup >, TABSTOP is usually set to .T. (true)
   for the first dialog element in the group.  This allows the first
   dialog element of a group to be activated using the Tab key.
   
   NOTABSTOP will cause the object (Xbase Part) to be ignored when
   using the Tab key. This clause is needed only to override any
   default setting of TabStop by the DCGETOPTIONS [TABSTOP] command.
   
   TABGROUP < nTabGroup > allows objects (Xbase Parts) that are created
   immediately after one another in the GetList to be combined into
   logical groups. This allows the user to navigate within a dialog
   from group to group by pressing the Tab key.  Within a group of
   dialog elements navigation is performed using the cursor keys.
   
   Only constants defined in the XBP.CH file can be used as values
   for this instance variable.  The following table lists the
   available constants:
   
   #define constants for < nTabGroup >:
   
    Constant             Description
   
    XBP_NO_GROUP     *)  Dialog element does not belong to a group
    XBP_BEGIN_GROUP      Dialog element is the first in a group
                         (this begins the definition of the group)
    XBP_WITHIN_GROUP     Dialog element is within a group
    XBP_END_GROUP        Dialog element is the last in a group
                         (this ends the definition of the group)
   
   *) Default value
   
   GROUP < cGroup > is a "group" name (case-sensitive) to assign to
   this GetList object.  Assignment to a group makes it possible to
   perform operations only on GetList items which are members of a
   specified group, using functions such as DC_GetRefresh() or
   DC_ReadGui().
   
   VISIBLE determines whether the object is visible immediately after
   the call to the method :create() . By default the object follows
   the VISIBLE clause of the DCGETOPTIONS command.  Use the
   INVISIBLE clause to override the VISIBLE clause of DCGETOPTIONS
   
   HASBUTTONS causes the TreeView to display a Plus or Minus sign
   at each node of the tree. This indicates whether the next level
   of the tree can be expanded or suppressed.
   
   HASLINES causes the TreeView to display lines between the nodes
   of the tree and their leaves. This results in a more readable
   display.
   
   ALWAYSSHOWSELECTION displays the selected item always highlighted,
   even if the tree view has no input focus.
   
   ITEMCOLLAPSED < bItemCollapsed > is a code block that is evaluated
   after the sub-items of a DCTREEITEM object are suppressed in
   the display. This is achieved by clicking the Minus sign with
   the left mouse button, or when the Minus key or left arrow key
   is pressed.
   
   ITEMEXPANDED < bItemExpanded > is a code block that is evaluated
   after the sub-items of a DCTREEITEM object became visible in
   the display. This is achieved by clicking the Plus sign with the
   left mouse button, or when the Plus key or right arrow key is
   pressed.
   
   ITEMMARKED < bItemMarked > is a code block that is evaluated after
   an item is marked within the tree view. This occurs while
   navigating with the cursor keys or when an item is clicked.
   
   ITEMSELECTED < bItemSelected > is a code block that is evaluated
   after an item is selected. This occurs when an item is double
   clicked or by pressing the Return key.
   

Description:

    The command DCTREEROOT creates a new TreeView root object and
    adds the object to the array named GETLIST which is later
    processed by the DC_READGUI() function or by the DCREAD GUI
    command.  The GETLIST array must be first declared and
    initialized to the value of {}.  The command DCREAD GUI activates
    the edit mode for all objects found in the GetList array.
    A Getlist object remains stored as long as it is referenced
    in an array or by a variable.  The commands CLEAR and
    CLEAR GETS assign an empty array to the GetList variable.
    This also occurs after the completion of the DCREAD command
    if it is called without the SAVE option, causing all Get
    objects referenced by the GetList array to be released.
   
    DCTREEROOT is used with the DCTREEITEM command to create
    a TreeView system for viewing any kind of data.
   

Notes:

    The object created by @ DCTREEROOT is an object of the
    XbpTreeView() class, therefore it can be manipulated with
    any iVar or method supported by XbpTreeView().
   

Examples:

   #include "dctree.ch"
   
   PROCEDURE Xtest()
   
   LOCAL GetList := {}, oTree, oSubTree1, oSubTree2, cSelected
   
   @ 1,1 DCTREEROOT SIZE 30,10 OBJECT oTree CAPTION 'Tree Root' ;
     HASLINES ;
     HASBUTTONS ;
     ITEMSELECTED {|o| cSelected := o:caption, ;
                       DC_ReadGuiEvent(DCGUI_EXIT_OK,GetList)}
   
   DCTREEITEM CAPTION 'SubTree 1' PARENT oTree OBJECT oSubTree1
     DCTREEITEM CAPTION 'Sub-SubTree 1/1' PARENT oSubTree1
     DCTREEITEM CAPTION 'Sub-SubTree 1/2' PARENT oSubTree1
     DCTREEITEM CAPTION 'Sub-SubTree 1/3' PARENT oSubTree1
   
   DCTREEITEM CAPTION 'SubTree 2' PARENT oTree OBJECT oSubTree2
     DCTREEITEM CAPTION 'Sub-SubTree 2/1' PARENT oSubTree2
     DCTREEITEM CAPTION 'Sub-SubTree 2/2' PARENT oSubTree2
     DCTREEITEM CAPTION 'Sub-SubTree 2/3' PARENT oSubTree2
   
   DCREAD GUI FIT ADDBUTTONS
   
   DC_MsgBox({'You Selected:',cSelected})
   
   RETURN nil
   

Source/Library:

  DCTREE.CH

See Also:

   DCTREEITEM



@ SAYWIN

Write a SAY text string in a Text or GUI dialog

Syntax:

   @ < nRow >,< nCol > SAYWIN < cText > ;
       [COLOR < cColor >] ;
       [PARENT < oParent >] ;
       [FONT < cFont >] ;
       [OK]
   

Arguments:

   PARENT < aParent > is an array of screen information that was
   originally returned by DCEXPLODE.  If no parameter is
   passed, then the static array posted by the last usage of
   DCEXPLODE will be used for the screen information.  If no
   call to DCEXPLODE is made since the last call to DCIMPLODE,
   then the text is written to the CRT window and treated as
   a normal @..SAY.
   
   < nRow > is the row position within the window. If the
   FIXED option was used with DCEXPLODE when the window
   was created, then this must be a coordinate which is
   relative to 0,0 of the screen, otherwise it must be relative
   to 0,0 of the window.
   
   < nCol > is the column position within the window. If the
   FIXED option was used with DCEXPLODE when the window
   was created, then this must be a coordinate which is
   relative to 0,0 of the screen, otherwise it must be relative
   to 0,0 of the window.
   
   < cText > is the text to display.
   
   The OK clause will display an "OK" button on the bottom
   of the Window and pause program execution until the user
   hits ENTER or clicks the mouse on the OK button.
   
   FONT < cFont > will override the optional font that was used
   with DCEXPLODE for this Say object only, otherwise the
   default font will be used.  This parameter is used in GUI
   mode only.
   
   COLOR < cColor > is a valid Clipper color string.  If this option
   is not used, then the background color of the window will
   be used.
   
   EVAL < bEval > is a code block to be evaluated by the GUI reader
   after the Xbase Parts object is created.  The object is passed
   to the code block.
   
   CARGO < xCargo > is any kind of data you wish to to add to the
   :cargo container for this object.  The cargo may be accessed
   at any time via the < oMsgBox >:cargo exported variable, however
   it will not be stored in the same manner it is entered.  The
   :cargo container of DCDIALOG objects is an array of at least
   two elements:
   
    [1] - A numeric value that is a pointer to the Getlist array
          for this object.
   
    [2] - The value of < xCargo >.
   
    [3] and up - optional values added by the GUI reader.
   

Description:

    The command @..SAYWIN is a Dual-Mode command which allows for
    writing text to a Text Window, a GUI window or the standard
    CRT window.  This command is included in EXPRESS.CH to
    replace the standard @..SAY command with @..SAYWIN commands
    and make it easier to migrate existing Clipper applications with
    @..SAYs by changing them to @..SAYWIN commands.
   
    The command functions identical to the standard @..SAY command
    unless the DCEXPLODE command is used first.  DCEXPLODE creates
    a window on the screen which defines either a Text-area or
    a GUI dialogue for all successive @..SAYWINs.  @..SAYWIN
    commands will cause the text to be routed either to the text
    window area or the GUI dialogue window until a DCIMPLODE command
    is used to destroy the window.
   
   
    CAUTION:
   
    @..SAY commands are translated by EXPRESS.CH to use the Getlist
    system and the DC_ReadGets() Dual-Mode reader.  Including
    EXPRESS.CH in your application code will treat @..SAY commands
    as though they are part of a Dialog Getlist.
   

Examples:

   

Source/Library:

  EXPRESS.CH

ABROWSE

Browse an array

Syntax:

   ABROWSE <  array  > [SYMMETRICAL] [NONSYMETRICAL]
   

Arguments:

   < array > is the name of an array to browse.  If this command is
   used at the dot prompt, then the array must be public or private.
   
   SYMMETRICAL will browse the array using the columnar-style
   browser.
   
   NONSYMMETRICAL will browse the array using the indented-
   style browser.
   

Description:

    ABROWSE is a full-screen (text-mode) array browser that gives
    a full-view of all elements in a multi-dimensional array or
    object.  A symetrical array may be browsed using a columnar
    style browse or any type of array may be browsed using an
    indented-style browse.
   
    Indented style browsing displays sub-elements as automatically
    indented and the type and value of each element is displayed.
    Indented-style browsing allows you to change the type, value, or
    length of any element or sub-element.  You can grow or shrink
    arrays or change elements of any type to an array or arrays to
    any other type.
   

Examples:

    . DIR := DIRECTORY('*.PRG')
    . ABROWSE DIR
   

Source/Library:

  DCSTD.CH

See Also:

   AVIEW
   DC_ArrayView()



AEDIT

Edit an Array

Syntax:

   AEDIT <  array  >
   

Arguments:

   < array > is the name of any multidimensional array or subarray to
   edit.  If this command is used at the dot-prompt, the array
   must be a private or public variable.
   

Description:

    AEDIT is a full-screen (text-mode) array editor that allows
    editing of any type of multidimensional array.
   

Examples:

    . aDir := directory()
    . AEDIT aDir
   

Source/Library:

  DCSTD.CH

See Also:

   ABROWSE
   AVIEW



AEVAL

Evaluate an Array

Syntax:

   AEVAL < array > [,< parameter >] [DO] < xpr list > ;
     [START < elem >] [COUNT < elems >]
   

Arguments:

   < array > is the name of the array to evaluate.
   
   < parameter > is an optional parameter used by expressions in
   the expression list.
   
   < xpr list > is a list of expressions (separated by commas) to
   evaluate for each array element.
   
   START < elem > is the starting element number.
   
   COUNT < elems > is the number of elements to evaluate.
   

Description:

    AEVAL functions identically to the AEVAL() function except the
    expressions do not need to be code blocks.
   

Examples:

    . DIR := DIRECTORY()
    . AEVAL DIR QOUT(DIR[1],DIR[2]) START 10 COUNT 5
   

Source/Library:

  DCSTD.CH

APPEND

Append and Edit a new record

Syntax:

    APPEND
   

Arguments:

   None.
   

Description:

    APPEND adds a new record to the currently selected database and
    then invokes the full-screen (text-mode) editor.
   

Examples:

    . USE COLLECT
    . APPEND
   

Source/Library:

  DCSTD.CH

See Also:

   APPEND FROM



APPEND BLANK

Append a Blank record

Syntax:

    APPEND BLANK
   

Arguments:

   None.
   

Description:

    APPEND BLANK will append a blank record to the currently
    selected database.  This functions identical to the Xbase++
    APPEND BLANK command except it automatically locks and unlocks
    the record.
   

Examples:

    . USE COLLECT
    . APPEND BLANK
    . EDIT
   

Source/Library:

  DCSTD.CH

See Also:

   APPEND



APPEND FROM

Append records from another file

Syntax:

   APPEND FROM < file > [ < args > ]
   

Arguments:

   See the Xbase++ documentation for details about < args >.
   

Description:

    APPEND FROM works identical to the Xbase++ APPEND FROM command
    except a progress odometer will display the number of records
    scanned and the number of records that were actually appended
    if using the FROM option.
   

Examples:

   . USE COLLECT
   . APPEND FROM JUNK
   

Source/Library:

  DCSTD.CH

See Also:

   APPEND



APPEND VIRTUAL

Append Virtual Record to selected database

Syntax:

   APPEND VIRTUAL
   

Arguments:

   None
   

Description:

   APPEND VIRTUAL will append the virtual record to the currently
   selected database.  The virtual record must first exist in the
   form of a *.DCV file originally created by the SAVE VIRTUAL
   command or DC_VirtSave() function.
   

Examples:

   . USE COLLECT
   . GO 10
   . SAVE VIRTUAL
   . APPEND VIRTUAL
   

Source/Library:

  DCSTD.CH

See Also:

   SAVE VIRTUAL
   REPLACE VIRTUAL



AVERAGE

Average numeric fields in selected database

Syntax:

    AVERAGE [ < args > ]
   

Arguments:

    See the Xbase++ documentation for details about < args >.
   

Description:

    AVERAGE is used to average numeric fields in the currently
    selected database based on a set of conditions. This command
    functions identical to the Xbase++ AVERAGE command with the
    exception that a progress bar is displayed during the averaging
    and the number of records actually averaged is displayed.
   
    If no arguments are given, then AVERAGE uses the DC_Average()
    function to display a GUI dialog for selecting fields and
    options.
   

Examples:

    . USE COLLECT
    . AVERAGE orig_price TO nPrice
    . AVERAGE
   

Source/Library:

  DCSTD.CH

See Also:

   dc_average()



AVIEW

A Tree style array/object browser

Syntax:

    AVIEW  aArray | oObject [EXPAND]
   

Arguments:

   < aArray > is any type of array.
   
   < oObject > is any type of object.
   
   EXPAND will expand all elements in the tree.
   

Returns:

    NIL.
   

Description:

    AVIEW is used to browse multidimensional arrays and/or objects
    using a Tree-View style browser.
   
    The array can be any type of array with any dimensions and may
    contain any type of data. When expanding the array tree, the
    user has the option of opening a new window to display the
    contents of the sub-tree.  When expanding an object, the user
    has the option of displaying the properties of the object
    using DC_InspectObject().
   

Examples:

    . aDir := directory()
    . AVIEW aDir EXPAND
   

Source/Library:

  DCSTD.CH

See Also:

   ABROWSE
   dc_arrayview()
   dc_inspectobject()



BATCH

Process a Batch file with Dot-Prompt commands

Syntax:

   BATCH [NEW] < batch file > ;
      [ < param1 > [ < param2 > [ < param3 > [ < param4 > [ < param5 > ]]]]]
   

Arguments:

   < batch file > is the name of the batch file to execute.  If no
   extension is given, then .DCB is assumed.  If no directory
   path is included, then eXPress++ will search the current
   directory followed by the directory established in the SET
   DCLIP=< directory > environment command.
   
   NEW will run the batch file in a new thread.
   
   < param1 > - < param5 > are arguments which are replaced in the
   batch file by %1 - %5 in the same manner as replacement is
   accomplished in DOS .BAT files.
   

Description:

    BATCH execute all commands in a .DCB batch file in sequential
    order.   A batch file can include any commands which can be
    entered at the dot-prompt and executed by the eXPress++
    interpreter other than structural commands, like DO WHILE, DO CASE
    IF..ENDIF or FOR..NEXT.  All commands in DCSTD.CH, DCDIALOG.CH,
    or DCCUSTOM.CH may be used in batch files.
   

Notes:

    DC_Dot() will automatically execute an AUTOEXEC.DCB batch file
    found in the directory containing the executable program or
    the or the directory named by the dos SET DCLIP=<þdirectoryþ>
    environment setting.
   

Examples:

    . BATCH OUTPUT MYFILE.PRG PRN
   
   // start up the same browse in two different threads
    . BATCH NEW BROWSE
    . BATCH NEW BROWSE
   

Source/Library:

  DCSTD.CH

See Also:

   INTERPRET
   DC_Batch()
   DC_BatchNewThread()



BLANK

Blank record(s) in currently selecte database

Syntax:

   BLANK [FOR < lCondition] ;
         [WHILE < lCondition >] ;
         [NEXT < nRecords >] ;
         [RECORD < nRecNo >] ;
         [REST] ;
         [ALL]
   

Arguments:

   See the Xbase++ documentation for information on how to use the
   FOR, WHILE, NEXT, ALL, REST, and RECORD clauses.
   
   If no arguments are used, only the current record will be
   blanked.
   

Description:

    BLANK is used to blank out all fields in selected records
    of the current work area.
   

Examples:

    . BLANK FOR deleted()
    . BLANK FOR user_id='GOOFY'
    . BLANK
   

Source/Library:

  DCSTD.CH

See Also:

   dc_blank()



BROWSE

A text-base Database browsing system

Syntax:

   BROWSE [PROTECT] ;
          [EDIT] ;
          [CLEAR [ALL]] ;
          [FIELDS < fields,... >] ;
          [HEADERS < headers,... >] ;
          [DEFAULT] ;
          [RESTORE [FROM] < cBrowName >]
          [OVERLAY]
   

Arguments:

   EDIT will re-paint all previously created Editing Screens
   that were created with the EDIT command.
   
   FIELDS < fields > is a list of fields to browse.  If no field
   list is passed, then all fields will be included in the
   browse.
   
   HEADERS < headers > is a list of headers that matches the list
   of fields to browse.  If no header list is passed, then the
   headers will default to the field names.
   
   CLEAR will clear any previously configured browse window for
   the current work area and create a browse window with the
   default configuration using the full screen and all fields.
   
   CLEAR ALL will clear all browse windows for all work areas.
   
   PROTECT will protect data from being modified by the user.
   
   DEFAULT will display a default browse even if there is a
   browse in the Browse dictionary that matches the alias name
   of the browse.  A default browse is a one that displays all
   fields.
   
   RESTORE FROM < cBrowName > will restore a specified browse
   from the Browse dictionary.  < cBrowName > is the name of the
   browse to restore.  This stored browse configuration much
   match the field names of the current database or an error
   will occur.
   
   OVERLAY will display the browse screen over any existing
   screens.  If this clause is not used, then the screen will
   be cleared first.
   

Description:

    BROWSE is a multi-windowing database manager that utilizes a
    browse-style menu for viewing, printing or editing databases.
   
    BROWSE maintains a multi-dimensional array of information for
    all open work areas which is remembered even after the browse
    is exited. When the BROWSE command is used again in any work
    area which was previously browsed, the browse configuration
    (including field pointers, column configuration, etc.) will
    automatically be restored.
   
    BROWSE is a complete DBMS system that supports a set of pop-up
    menus for selection of files, viewing options, editing options,
    printing options, search options, and utilities.
   
    BROWSE supports importing/exporting, cut and paste and a
    built-in support for replaceable database drivers (DBE's).
    Databases of different types may be opened in different windows
    and macros can be created to easily move data between fields
    and records from any database window.
   

Examples:

    . USE CUSTOMER
    . BROWSE CUST_NAME, BALANCE
   

Source/Library:

  DCSTD.CH

See Also:

   dc_browsedb()



CALC

A popup, full-function calculator

Syntax:

    CALC
   

Arguments:

    None.
   

Description:

    CALC displays a GUI calculator.
   

Examples:

    . CALC
   

Source/Library:

  DCSTD.CH

See Also:

   dc_popcalc()



CD | CHDIR

Change system directory

Syntax:

    CD | CHDIR < dir >
   

Arguments:

   < dir > is the drive and directory to select.
   

Returns:

   .
   

Description:

    CD is used to select a new system drive and directory.
   

Examples:

    . C:
    . CD \express\lib
    . CD ..\sample
   

Source/Library:

  DCSTD.CH

See Also:

   dc_chdir()



CHR

Display an ASCII Character Chart

Syntax:

    CHR
   

Arguments:

    None.
   

Description:

    CHR will display a chart of the 256 ASCII text-mode characters
    in a new CRT window.
   

Examples:

    . CHR
   

Source/Library:

  DCSTD.CH

See Also:

   dc_chrsel()



CLEAR SCOPE

Clear scoping values for the current work area

Syntax:

    CLEAR SCOPE
   

Arguments:

    None.
   

Description:

    CLEAR SCOPE is used to clear both the SCOPETOP and SCOPEBOTTOM
   "scoping range" values that were previously set by SET SCOPE or
    DC_SetScope().
   

Notes:

    SET SCOPE does not establish the scoping range at the
    DBE-layer level, but instead is just a handy way of storing
    the SCOPE TOP and SCOPE BOTTOM to be retrieved by programs
    that can use this information such as data-entry systems and
    browse systems.  It does not affect the behavior of the
    data-driver nor does it set any filters on the data.
   

Examples:

    . SET SCOPETOP TO 'B'
    . SET SCOPEBOTTOM TO 'D'
    . BROWSE
    . CLEAR SCOPE
   

Source/Library:

  DCSTD.CH

See Also:

   dc_clrscope()



CODE DELETE

Delete a code table

Syntax:

    CODE DELETE [ < tableName > ]
   

Arguments:

   < tableName > is the name of the code table.  This is a name of
   up to eight (8) characters.  If no argument is passed, then a
   pick list of all code tables in the code table file will be
   displayed.
   

Description:

    CODE DELETE is used to delete a code table from the code
    table file.
   

Notes:

    The DCCODES.DBF file and its indexes will be created by
    the DC_CodeOpen() function if it they do not already exist.
   

Examples:

    CODE DELETE POSITION
   

Source/Library:

  DCSTD.CH

See Also:

   dc_codedelete()
   CODE EDIT



CODE EDIT

Edit a Code Table

Syntax:

   CODE EDIT [ [TABLE] < cTable > ]
   

Arguments:

   < cTable > is the name of the code table in DCCODES.DBF
   to load and edit (up to 8 characters).  If no parameter is
   passed then a pick-list of available code tables will be
   displayed.
   

Description:

    CODE EDIT is an editor that is used to maintain the DCCODES.DBF
    dictionary file.  Code Tables are groups of records that are
    loaded into an array pick-list and used in validations when
    using the eXPress++ data-driven Browse and Edit (data-entry)
    system.  When a "T" validation is used in a field-array, this
    pops-up a code table pick-list for the operator to choose
    possible values.  Code tables can also be used in custom
    applications where validations and/or choice boxes are required.
   
    For example a code table named "POSITION" can be added to
    provide a picklist of available entries for a field of
    baseball player positions.  They would be entered in a code
    table as follows:
   
     1B  -  First Base
     2B  -  Second Base
     3B  -  Third Base
     P   -  Pitcher
     SS  -  Short Stop
     RF  -  Right Field
     LF  -  Left Field
     CF  -  Center Field
     C   -  Catcher
   
    A choice from this table can then be selected by calling
    DC_CodeGet() in a validation or popup routine.
   

Notes:

    The DCCODES.DBF file and its indexes will be created by
    the DC_CodeOpen() function if it they do not already exist.
   

Examples:

    -- Example 1 --
    // Load a code table from the dictionary and edit it //
    CODE EDIT
   
    -- Example 2 --
    // Edit code table "POSITION"
    CODE EDIT POSITION
   

Source/Library:

  DCSTD.CH

See Also:

   dc_codeedit()



CODE IMPORT

Import a code table

Syntax:

   CODE IMPORT [table name] | "ALL"]
   

Arguments:

   < tablename > is the name of the code table.  This is a name of
   up to eight (8) characters.  If a code table name is passed then
   the DXCODES.DBF database will be searched and all code table
   items that match the code table name will be imported into
   DCCODES.DBF.  If no name is passed, then a pick-list of all tables
   stored in the DXCODES.DBF database will be displayed.
   
   If ALL is passed as the table name, then all tables in the
   DXCODES.DBF will be imported into DCCODES.DBF.
   

Returns:

    A logical .TRUE. if the code table was saved, .FALSE. otherwise.
   

Description:

    CODE IMPORT is used to import a code table from the DXCODES.DBF
    import/export file to the DCCODES.DBF file.
   

Notes:

    The DCCODES.DBF file is the data-dictionary database that
    contains all code tables.  If this file does not exist in your
    default directory or path then it will be created.   The
    DXCODES.DBF file is the data-dictionary database that contains
    all code tables that were exported from another system.
   

Examples:

    . CODE IMPORT ALL
   

Source/Library:

  DCSTD.CH

See Also:

   dc_codeimp()
   CODE EDIT



CODE RENAME

Rename a Code Table

Syntax:

    CODE RENAME < cTableName > TO < cNewName >
   

Arguments:

   < cTableName > is the name of the table to rename.  This is a
   name of up to 10 characters.  If no name is given, then a pick
   list of all code tables will be displayed.
   
   TO < cNewName > is the new name.  If no name is given, then a
   dialog window will be displayed to enter a new name.
   

Description:

    CODE RENAME is used to rename a Code Table.
   

Examples:

   CODE RENAME BULLET TO BULLETS
   

Source/Library:

  DCSTD.CH

See Also:

   dc_coderename()
   CODE EDIT



COMPILE

Compile a source .PRG or all changed .PRGs

Syntax:

    COMPILE [ < filename > ], ;
            [OPTIONS < options >], ;
            [QUIET], ;
            [NOWINDOW], ;
            [RECOMPILE]
   

Arguments:

   < filename > is the name of the file to compile.  If this
   argument is left blank, then all .PRG files which have a later
   date stamp than the associated .OBJ file will be compiled.
   
   OPTIONS < options > is a string of compiler options.  If no argument is
   given, then the options established by DC_SETT('XPPOPT',< cOptions >),
   SET XPPOPT TO < cOptions > or XPPOPT=< cOptions > (DCLIP.SYS) are
   used as the default.
   
   QUIET will prevent displaying the status after compiling.
   
   NOWINDOW will suppress the display a window showing the compiled
   results.
   
   RECOMPILE will force a recompile of < filename > regardless of
   the date/time of < filename >.  If this clause is not used,
   then < filename > will be compiled only if it's date/time stamp
   is later than the date/time stamp of it's associated. .OBJ file.
   

Description:

    COMPILE | XPP compiles a specified .PRG file into an .OBJ file
    or recompiles all .PRG files which have been modified and
    have a later date/time stamp than their associated .OBJ file.
   
    Use COMPILE | XPP after editing your source files.  COMPILE | XPP
    checks the date and time stamp on .PRG files and compares them
    to the date and time on any corresponding .OBJ files.  If the
    date and/or time on a .PRG is later than the corresponding
    .OBJ, the .PRG will be compiled with the /m option.
   

Notes:

    If <þcFileNameþ> contains a full-path specification of a .PRG
    file, then the compiled .OBJ will be created in the same
    directory as the .PRG file unless the /o compiler switch is
    used to direct the output.
   
    If <þcFileNameþ> does not contain a full path then the .PRG file
    must exist in the current directory or the directory
    established by DC_SETT('PDIR',<þcPathþ>),  SET PDIR TO <þcPathþ>
    or PDIR=<þcPathþ> (DCLIP.SYS).
   
    If <þcFileNameþ> does not contain a full path or the /o compiler
    switch is not used, then the compiled .OBJ will be created in
    the directory established by DC_SETT('ODIR',<þcPathþ>),  SET ODIR
    TO <þcPathþ> or ODIR=<þcPathþ> (DCLIP.SYS).
   

Examples:

    accept 'Enter a file to edit and compile' TO cFile
    dc_editprg(cFile)
    DC_COMPILE(cFile,'/n/m/w/l')
   

Source/Library:

  DCSTD.CH

See Also:

   dc_compile()



CONTINUE

Continue Locating a record

Syntax:

    LOCATE [ < clauses > ]
   

Arguments:

    See the Xbase++ documentation for a description of < clauses >.
   

Description:

    CONTINUE is a front-end to the Xbase++ CONTINUE command. It
    functions identically with the exception that it stays within
    any scope that was  previously set with SET SCOPE or
    DC_SetScope().
   

Examples:

    . USE EXPRESS VIA FOXCDX
    . LOCATE FOR COMMAND = 'dc_dot'
   

Source/Library:

  DCSTD.CH

See Also:

   dc_dbcontinue()
   dc_dblocate()
   LOCATE



COPY TO

Copy records from selected database to a new database

Syntax:

    COPY TO [ < args > ]
   

Arguments:

    See the Xbase++ documentation for details about < args >.
   

Description:

    COPY TO is used to copy records from the currently selected
    database to a new database based on a set of conditions.
    This command function identical to the Xbase++ COPY TO command
    with the exception that a progress bar is displayed during the
    copy and the number of records actually copied is displayed.
   

Examples:

    . USE COLLECT
    . COPY TO JUNK FOR RecNo() > 5
   

Source/Library:

  DCSTD.CH

COPYNEW

Copy only new files to another directory

Syntax:

    COPYNEW < cFromSpec > TO < cToSpec >
   

Arguments:

   < cFromSpec > is the specification of the file(s) to copy from.
   If this argument is not given, then a dialog will be displayed
   prompting the user for the file specification.
   
   < cToSpec > is the specification of the directory to copy to.
   If this argument is not given, then a dialog will be displayed
   prompting the user for the directory specification.
   

Description:

    COPYNEW is used to copy a file or set of files to another
    directory only if they are newer than the sames files in the
    destination directory.
   
    A dialog window will display the status of all files copied.
   

Examples:

    COPYNEW *.TXT TO C:\express\sample
   

Source/Library:

  DCSTD.CH

See Also:

   dc_copynew()



COUNT

Count records in selected database

Syntax:

    COUNT [ < args > ]
   

Arguments:

    See the Xbase++ documentation for details about < args >.
   

Description:

    COUNT is used to count records from the currently selected
    database based on a set of conditions. This command functions
    identical to the Xbase++ COUNT command with the exception that
    a progress bar is displayed during the copy and the number of
    records actually counted is displayed.
   
    If no arguments are passed COUNT will use DC_Count() to display
    a GUI dialog for selection of conditions.
   

Examples:

    . USE COLLECT
    . COUNT FOR RecNo() > 5
    . COUNT
    . COUNT TO nCount
   

Source/Library:

  DCSTD.CH

See Also:

   dc_count()



CREATE

Create a new database

Syntax:

    CREATE < database >
   

Arguments:

   < database > is the name of the new database to create.  If you
   do not include an extension, then the default extension for the
   currently selected database driver will be used.
   

Description:

    CREATE is used to create a new database from a menu in which
    the user is prompted for entering field names, types, lengths,
    etc.
   
    The currently selected default DBE is used when the new database
    is created.
   

Examples:

    . SET DBE TO FOXCDX
    . CREATE JUNK
   

Source/Library:

  DCSTD.CH

See Also:

   dc_create()



CRT

Run a text-based procedure in a new CRT Window

Syntax:

    CRT < bBlock > [TITLE < cTitle >] ;
                 [COLOR < cColorString >]
   

Arguments:

   < bBlock > is the code block to evaluate after the CRT window
   is created or selected.
   
   TITLE < cTitle > is the title to place into the title bar of the CRT
   window.
   
   COLOR < cColorString > is the color to clear the CRT window.
   

Description:

    CRT is used to run a text-based procedure in a new CRT Window.
   
    The function DC_CrtRunWindow() is used to store a pointer to
    any existing XbpCrt() class window to use.  If this function
    returns anything other than an XbpCrt() object, then a new
    CRT window is created before the code block is evaluated and
    then destroyed after returning from the code block.
   

Examples:

    . CRT {||DC_ChrSel()} TITLE 'ASCII Chart' COLOR 'N/W'
   

Source/Library:

  DCSTD.CH

See Also:

   dc_crtrun()



DATACONVERT

Convert a database to a different DBE driver

Syntax:

    DATACONVERT < cFileName > ;
          FROMDBE < fromDBE > ;
          TODBE < toDBE >] ;
          EXTENSION < ext >
   

Arguments:

   < filename > is the name of the database to convert.  If this
   argument is not passed a GUI dialog window will be displayed to
   enter information required.  Enter ALL to convert all databases
   with a specified extension.
   
   < fromDBE > is the DBE to use to open < cFileName >.
   
   < toDBE > is the DBE to use to create the converted file.
   
   < ext > is the extension to use when using ALL as the file name.
   

Description:

    DATACONVERT is used to convert a database to use another
    DBE driver.
   

Examples:

    // convert all files that have a .DBT memo file.
    . DATACONVERT COLLECT FROMDBE DBFNTX TODBE FOXCDX EXTE .DBT
   
    // convert all files that have a .DBF extension
    . DATACONVERT ALL FROMDBE DBFNTX TODBE DBFCDX EXTE .DBF
   

Source/Library:

  DCSTD.CH

See Also:

   dc_dataconvert()



DATE

A pop-up calendar for selecting a date

Syntax:

    DATE
   

Arguments:

    None.
   

Description:

    DATE displays a GUI calendar.
   

Examples:

    . DATE
   

Source/Library:

  DCSTD.CH

See Also:

   dc_popdate()



DCADDBUTTON

Add BUTTON to TOOLBAR object for displaying with GUI reader

Syntax:

   DCADDBUTTON ;
       [CAPTION < bcnoCaption >] ;
       [SIZE < nWidth > [,< nHeight >] ] ;
       [TYPE < nType >] ;
       [OBJECT < oButton >] ;
       [ACTION < bAction >] ;
       [PARENT < oParent >] ;
       [PARENTID < cParentId >] ;
       [MESSAGE < bcMsg > [INTO < oMsgBox >]] ;
       [HELPCODE < cHelpCode >] ;
       [COLOR < bncFgC > [,< ncBgC >] ] ;
       [FONT < bocFont >] ;
       [PRESENTATION < aPres >] ;
       [PIXEL] ;
       [TOOLTIP < bcToolTip >] ;
       [OBJECT < oObject >] ;
       [CURSOR < nCursor >] ;
       [PREEVAL < bPreEval >] ;
       [EVAL < bEval >] ;
       [ID < cId >] ;
       [TITLE < cTitle >] ;
       [WHEN < bWhen >] ;
       [HIDE < bHide >] ;
       [ACCELKEY < anAccel >] ;
       [GOTFOCUS < bGotFocus >] ;
       [LOSTFOCUS < bLostFocus >] ;
       [TABSTOP]  ;
       [NOTABSTOP];
       [TABGROUP < nTabGroup >] ;
       [VISIBLE] ;
       [INVISIBLE] ;
       [CARGO < xCargo >] [CARGO "CANCEL"] ;
       [GROUP < cGroup >] ;
       [STATIC] * ;
         [FOCUSCOLOR < nTextColor > [,< nFrameColor >]] * ;
         [BITMAP < xBMUp > [,< xBMDown > [,< xBMNeutral > [,< xBMFlash >]]]] * ;
         [FLASH < nFlashIterations > [,< nFlashDelay >]] ;
         [REGION < aRegion >] *
   
     * Supported by eXPress++ 1.7 or later
   

Arguments:

   CAPTION < bcnoCaption > is the part of the PushButton object that
   is displayed within the area of the pushbutton. The caption may
   be one of the following:
   
   1) A character string.  An ampersand (&) preceding a character in
      the text assigns the ALT-< char > key as a hotkey for the
      pushbutton and underlines the character.  A tilde (~) preceding
      the character will only underline the character and will not
      enable the hot-key.  A tilde (~) could be used with the
      ACCELKEY clause to establish the hot key(s).
   
   2) A bitmap resource. The numeric resource ID of the bitmap is
      assigned to the instance variable.  If a resource ID is used,
      it must be defined in a resource file that is linked to the
      EXE file using the resource compiler.
   
   3) A bitmap object created with the XbpBitMap() class. (Xbase++
      1.7 or later).
   
   4) A two-element array.  This array must contain either two
      character strings, two bitmap objects or two bitmap numeric
      values.  The first value is the caption to use when the
      pushbutton is "enabled" by the WHEN clause.  The second value
      is the caption to use when the pushbutton is "disabled" by
      the WHEN clause.
   
   4. A code block.  A code block is evaluated whenever the
      DC_GetRefresh() function is called.  This is used to change
      the caption dynamically after the pushbutton object is created.
      The code block must return either a character string, a bitmap
      numeric resource, a bitmap object or an array of 2 elements.
   
   OBJECT < oButton > is an optional variable name to assign to this
   button for storage of the XbpPushbutton() object after the
   dialogue screen is painted.  This provides a LOCAL variable
   as a pointer to the button object.
   
   ACTION < bAction > is a code block that gets evaluated when
   the button is activated.
   
   PARENT < oParent > is the name of the variable that was
   assigned to the parent ToolBar for this Button.  A ToolBar object
   is created by the @ DCTOOLBAR command.
   
   PARENTID < cParentID > may be used in lieu of the PARENT < oParent >
   clause.  This identifies the ID of the parent instead of the
   parent's object variable name.
   
   SIZE < nWidth >, < nHeight > optionally defines the size of the
   button.  If no size is given, then the button will be
   automatically sized to fit the parent toolbar based on option
   clauses used via the DCTOOLBAR command.  If the BUTTONSIZE
   clause of the DCTOOLBAR command is used, then the button will be
   sized accordingly, otherwise the wdith will be equal to the
   height.  IF the PIXEL option is set to .TRUE. in DCGETOPTIONS,
   then the numbers are in pixels otherwise they are in standard
   text-based coordinates. You can also force the pixel mode by
   including PIXEL in the command.
   
   TYPE < nType > is used for displaying a SEPARATOR rather than an
   action button.  < nType > may be any numerical value starting with
   XBPSTATIC_TYPE_* defined in XBP.CH.
   
   MESSAGE < bcMsg > is the message you want to display in the
   message area of the dialogue screen defined by the DCMESSAGEBOX
   command when the object is in focus.  Optionally, INTO < oMsgBox >
   will designate which message box to display the message into.
   If the INTO clause is not used, then the last message box in the
   GetList is the default. If < bcMsg > is a code-block, it must
   return a character string.
   
   HELPCODE < cHelp > is a character string that is passed to the
   DC_HelpF1() function if F1 is pressed when the mouse is placed
   over the button. The help code is used by the Help system to
   for specific context-help.
   
   TOOLTIP < bcToolTip > is a character string which will display
   as a "Tool Tip" next to the object when the cursor is passed
   over the object. A semi-colon within the text indicates a new
   line.  If < bcToolTip > is a code-block, it must return a character
   string.  NOTE: The Tooltip painting method is run in another
   thread, therefore the codeblock should not run code that points
   to the current work area.  It may however, contain local, public
   or private variables.
   
   PRESENTATION < aPres > is a two-dimensional array. If specified,
   this contains presentation parameters for the Button object.
   The first column of the array must contain #define constants
   from the XBP.CH file starting with the prefix XBP_PP_. These
   constants define the presentation parameters that can be set
   for the object and include colors and fonts. The second column
   of the array in < aPres > contains the value for each setting.
   These are also generally set using #define constants from the
   GRA.CH file.
   
   CURSOR < naCursor > may be either a numeric value or an array of
   3 elements which defines an optional mouse pointer to use for
   this object.  System mouse pointers start with
   XBPWINDOW_POINTERTYPE_ and are defined in XPB.CH.  The default
   pointer is XBPWINDOW_POINTERTYPE_POINTER.  < naCursor > may be a
   numeric resource ID that points to a Bit-Map that has been
   compiled with the resource compiler and linked to the .EXE.
   < naCursor > may be a 3-element array described as follows:
   
     Element  Type  Description
     -------  ---- ---------------------------------------------
       [1]      C   Optional name of .DLL containing the pointer
                    resource.
   
       [2]      N   The numeric resource ID of the pointer.  If
                    element 1 is a NIL, then this resource must be
                    linked into the .EXE.
   
       [3]      N   The type of resource as defined in XBP.CH.
   
   PREEVAL < bPreEval > is a code block to be evaluated by the GUI
   reader before the Xbase Parts object is created.  The object is
   passed to the code block.
   
   EVAL < bEval > is a code block to be evaluated by the GUI reader
   after the Xbase Parts object is created.  The object is passed
   to the code block.
   
   CARGO < xCargo > is any kind of data you wish to to add to the
   :cargo container for this object.  The cargo may be accessed
   at any time via the :cargo exported variable, however it will not
   be stored in the same manner it is entered.  The :cargo container
   of DCDIALOG objects is an array of at least three elements:
   
    [1] - A numeric value that is a pointer to the Getlist array
          for this object.
   
    [2] - A pointer to the GetList array.
   
    [3] - The value of < xCargo >.
   
    [4] and up - optional values added by the GUI reader.
   
   COLOR < ncFGc >, < ncBGc > are foreground and background colors.
   They may be character strings representing valid text-based
   colors supported by SetColor() or they may be numeric constants
   which begin with either the prefix GRA_CLR_ or the prefix
   XBPSYSCLR_ as defined in GRA.CH or XBP.CH. If < bncFGc > is a
   code block is must return a 2-element array containing a
   foreground and background color.
   
   FONT < cFont > is a character string defining an optional font.
   The font string must conform to the Xbase++ standard, ie.
   "10.Courier.Bold". It may also be a font object or a code block
   that returns a character string or a font object to later
   refresh with DC_GetRefresh().
   
   ID < cId > is a unique identifier for this object.  This ID is used
   with functions like DC_GETOBJECT() to determine the status
   of a get object.
   
   TITLE < cTitle > is a title to assign to this object.  The title
   is not displayed on the screen but is simply a description of the
   get object which is saved in the GetList.
   
   WHEN < bWhen > is a code block that is evaluated in the event loop.
   This code block must return a logical value.  If the value
   returned is .FALSE. then the object will be disabled and grayed.
   If the value returned is .TRUE. then the object will be enabled.
   
   HIDE < bHide > is a code block that is evaluated in the event loop.
   This code block must return a logical value.  If the value
   returned is .TRUE. then the object will be hidden from view.  If
   the value returned is .FALSE. then the object will be displayed.
   
   ACCELKEY < anAccel > is a numeric "hot-key" assignment that will set
   focus to the checkbox object when the hot-key is pressed.  The key
   must be a valid key with the prefix xbeK_*.  These keys are
   defined in APPEVENT.CH.  < anAccel > may also be an array of numeric
   values to assign more than one key to the object.
   
   GOTFOCUS < bGotFocus > is a code block that is evaluated when this
   object receives input focus.  < bGotFocus > := {|uNIL1,uNIL2,self|...}
   
   LOSTFOCUS < bLostFocus > is a code block that is evaluated when this
   object loses input focus.  < bLostFocus > := {|uNIL1,uNIL2,self|...}
   
   TABSTOP will cause the object (Xbase Part) to be set when using
   the Tab key.  Note: When logical groups are defined in a dialog
   using TABGROUP < nTabGroup >, TABSTOP is usually set to .T. (true)
   for the first dialog element in the group.  This allows the first
   dialog element of a group to be activated using the Tab key.
   
   NOTABSTOP will cause the object (Xbase Part) to be ignored when
   using the Tab key. This clause is needed only to override any
   default setting of TabStop by the DCGETOPTIONS [TABSTOP] command.
   
   TABGROUP < nTabGroup > allows objects (Xbase Parts) that are created
   immediately after one another in the GetList to be combined into
   logical groups. This allows the user to navigate within a dialog
   from group to group by pressing the Tab key.  Within a group of
   dialog elements navigation is performed using the cursor keys.
   
   Only constants defined in the XBP.CH file can be used as values
   for this instance variable.  The following table lists the
   available constants:
   
   #define constants for < nTabGroup >:
   
    Constant             Description
   
    XBP_NO_GROUP     *)  Dialog element does not belong to a group
    XBP_BEGIN_GROUP      Dialog element is the first in a group
                         (this begins the definition of the group)
    XBP_WITHIN_GROUP     Dialog element is within a group
    XBP_END_GROUP        Dialog element is the last in a group
                         (this ends the definition of the group)
   
   *) Default value
   
   GROUP < cGroup > is a "group" name (case-sensitive) to assign to
   this GetList object.  Assignment to a group makes it possible to
   perform operations only on GetList items which are members of a
   specified group, using functions such as DC_GetRefresh() or
   DC_ReadGui().
   
   VISIBLE determines whether the object is visible immediately after
   the call to the method :create() . By default the object follows
   the VISIBLE clause of the DCGETOPTIONS command.  Use the
   INVISIBLE clause to override the VISIBLE clause of DCGETOPTIONS
   
   
   The following options are supported by eXPress++ 1.7 or later:
   
   When the STATIC * clause is used, a class created from the
   XbpDialog() class is used instead of the XbpPushButton() class.
   This allows for the creation of complex pushbuttons by allowing
   the pushbutton object to be a parent for any other object such
   as DCSTATIC or DCSAY for the display of text, icons, bitmaps
   etc. on the button.
   
   FOCUSCOLOR * is used to determine the color of any text on the
   button when it receives focus by passing the mouse over the button.
   < anTextColor > is the color of the text.  If this argument is a
   NIL the text color will not be changed.  < anFrameColor > is the
   color of a frame that is drawn around the perimeter of the button
   to hilight the button when it receives focus.  If this argument
   is a NIL, there will be no frame drawn.  These arguments may be
   be a numeric color defined by GRA_CLR_* in GRA.CH or a 3 element
   array of RGB colors.
   
   BITMAP * < xBMUp > is the background bitmap for the button in the
   UP (unpressed) condition.  < xBMDown > is the background bitmap for
   the button in the DOWN (pressed) condition and < xBMNeutral > is the
   background bitmap of the button in the NEUTRAL (fancy button)
   condition.  < xBMFlash > is the bitmap to be used with the FLASH
   clause.  Each bitmap will be replicated over the entire pushbutton
   background area.  The bitmaps may be numeric resources,
   XbpBitMap() objects, or character strings containing a .BMP, .GIF,
   or .JPG file name.
   
   FLASH is used with the < xBMFlash > bitmap.  This bitmap will flash
   on just before the action block is evaluated.  This feature is for
   touch-screen applications or other applications where some kind of
   tactile feedback is desired to indicate to the user that the button
   has been pressed.  < nFlashIterations > is the number of times that
   the bitmap should flash.  < nFlashDelay > is the amount of delay in
   100th/second between flashes.
   
   REGION < aRegion > is an array defining the region of the button
   to display.  All other areas will be removed.  < aRegion > may be
   an array that is created by DC_RegionArray() or may be any other
   multidimensional array containing a set of rectangular regions.
   < aRegion > is used to display the button as a circle, ellipse,
   octagon, diamond, or other irregular shape.
   

Description:

    The command DCADDBUTTON creates a new PushButton object and
    adds the object to the array named GETLIST which is later
    processed by the DC_READGETS() function or by the DCREAD
    command.  DCADDBUTTON is used with DCTOOLBAR to add a
    PushButton to the toolbar.  Each button is automatically
    placed in the next open place on the previously declared
    ToolBar.  The GETLIST array must be first declared and
    initialized to the value of {}.  The command DCREAD activates
    the edit mode for all objects found in the GetList array.
    A Getlist object remains stored as long as it is referenced
    in an array or by a variable.  The commands CLEAR and
    CLEAR GETS assign an empty array to the GetList variable.
    This also occurs after the completion of the DCREAD command
    if it is called without the SAVE option, causing all Get
    objects referenced by the GetList array to be released.
   
    The GetList is  passed to the function DC_READGETS() which
    looks at the DC_GUI() flag  and determines whether to process
    this list as a standard text-based get screen or as a
    GUI-based dialogue.
   

Notes:

    If the STATIC clause is not used, the object created by
    DCADDBUTTON is an object of the XbpPushButton() class,
    therefore it can be manipulated with  any iVar or method
    supported by XbpPushButton() class.
   
    If the STATIC clause is used, the object created by
    DCADDBUTTON is an object of the XbpDialog() class, therefore
    it can be manipulated with any iVar or method supported by the
    XbpDialog() class (eXPress++ version 1.7 or later).
   
    Use the clause CARGO 'CANCEL' if the pushbutton is to be used
    to exit a dialog without testing validations.  This will insure
    that if the pushbutton is clicked while in a DCGET with a
    validation the validation code block will not be evaluated.
   
    For an example of STATIC buttons, run XDEMO.EXE (sample group 5).
   

Examples:

   #include "dcdialog.ch"
   #include "dcbitmap.ch"
   
   PROCEDURE Xtest()
   
   LOCAL GetList := {}, oToolBar
   
   DCTOOLBAR oToolBar ALIGN TOOLBAR_TOP
   
   DCADDBUTTON PARENT oToolBar CAPTION 'Exit' ;
               SIZE 9 ;
               ACTION {||DC_ReadGuiEvent(DCGUI_EXIT_OK)}
   
   DCADDBUTTON PARENT oToolBar CAPTION 'Open' ;
               SIZE 9 ;
               ACTION {||OpenFile()}
   
   DCADDBUTTON PARENT oToolBar CAPTION 'Close' ;
               SIZE 9 ;
               ACTION {||CloseFile()}
   
   DCREAD GUI FIT ADDBUTTONS
   
   RETURN
   
   /* ---------------------- */
   
   STATIC PROCEDURE OpenFile()
   
   DC_MsgBox('File is now open')
   
   RETURN
   
   /* ---------------------- */
   
   STATIC PROCEDURE CloseFile()
   
   DC_MsgBox('File has been closed')
   
   RETURN
   

Source/Library:

  DCDIALOG.CH

See Also:

   @ DCPUSHBUTTON
   @ DCTOOLBAR



DCAPPBROWSE

Create an APPLICATION BROWSE object for displaying with GUI reade

Syntax:

   DCAPPBROWSE INTO < oBrowse > ;
     [ PARENT < oParent > ] ;
     [ FIELDS < fields,... > ] ;
     [ COLOR < fgC > [, < bgC > ] ] ;
     [ HILITE < fgHC > [, < bcHC > ] ] ;
     [ FONT < (font) > ] ;
     [ POSITION < nRow > [, < nCol >] ] ;
     [ SIZE < nWidth > [, < nHeight >] [< per:PERCENT >] ] ;
     [ TITLE < title > ] ;
     [ ALIGN < cAlign:LEFT,CENTER,RIGHT > ] ] ;
     [ FONT < (hFont) >] ;
     [ STYLE < style > ] ;
     [ ALIAS < (alias) > ] ;
     [ FOR < bFor > ] ;
     [ EVAL < bEval > ] ;
     [ RELATIVE < oRel > ] ;
     [ GROUP < cGroup > ] ;
     [ ID < cId > ] ;
     [ VISIBLE ] ;
     [ INVISIBLE ]
   

Arguments:

   INTO < oBrowse > is the name of the memory variable that gets the
   AppBrowse object assigned which is created by the DCAPPBROWSE
   command. If the INTO clause is used it must appear as the first
   option of the DCAPPBROWSE command.  If it is not used the object
   is assigned to the variable appObject.
   
   PARENT < oParent > is the name of the variable that was assigned to
   the parent object for this object.  Only use this clause if you
   are placing this object onto another dialogue object.  If this
   clause is not used, then the object will be displayed in the
   top-level dialogue screen.
   
   FIELDS < fields,... > specifies a comma-separated list of field
   names to be edited in the AppEdit window. The field names can be
   specified as literals or as character expressions in parentheses.
   If particular fonts or colors should be used for single fields
   the DCAPPFIELD command must be used for field specification.
   This is also the case when calculation fields are to be
   displayed.
   
   If neither the FIELDS option nor command DCAPPFIELD is used, all
   fields of the current work area are displayed as columns in the
   AppBrowse window.
   
   POSITION < pos1 > [, < pos2 >] positions an AppBrowse window.  If not
   specified the AppBrowse window is displayed at the point {0,0}
   (bottom left corner of the parent).
   
   There are three possibilities to position an AppBrowse object.
   Depending on the data types used for < pos1 > and/or < pos2 > the
   AppBrowse window can be positioned absolute or relative in its
   parent window.  In addidion, text orientde (row, column) or
   graphic coordinates (x,y) may be used:
   
   Coordinates to position an AppBrowse window
   
    < pos1 >    Value    < pos2 >    Value   Description
   
    Array     {nX,nY}  n.a.      NIL     < pos1 > is an array containing
                                         grafic coordinates for the
                                         AppBrowse window
    Numeric   nRow     Numeric   nCol    < pos1 > is a numeric value
                                         used as row coordinate,
                                         and < pos2 > specifies the
                                         column coordinate according
   
                                         to a text mode window
    Key word  TOP      Key word  TOP     The AppBrowse window is displayed
    Key word  LEFT     Key word  LEFT    at the top, left, bottom, right
    Key word  BOTTOM   Key word  BOTTOM  and/or centered within its parent,
    Key word  RIGHT    Key word  RIGHT   according to the keywords used
    Key word  CENTER   Key word  CENTER  for positioning
   
   The key word SIZE defines the size of an AppBrowse window. As with
   POSITION, the size can be specified using graphic or text oriented
   coordinates. Additionaly, percentage values may be used. The next
   table shows different possibilities:
   
   Coordinates used for size definition of an AppBrowse window
   
    < size1 >  Value            < size2 >  Value   Description
   
   
    Array    {nXsize,nYsize}  n.a.     NIL     A two element array defines
                                               the size in pixel.
    Numeric  nHeight          Numeric  nWidth  Two numeric values specify
                                               the number of rows and columns
                                               according to a text mode window
   
   If a numeric value is used for < size1 > and/or < size2 > in conjunction
   with the key word PERCENT, the values are interpreted as percentage
   of the parent window's height and/or width.
   
   TITLE < cTitle > is a character expression which is displayed in the
   title bar of an AppBrowse window.  It defaults to the alias name of
   the current work area.
   
   COLOR < nForeGround > [, < nBackGround > ] specifies foreground and
   background color for the :drawingArea of the AppBrowse window.
   #define constants from XBP.CH or GRA.CH must be used
   (XBPSYSCLR_* or GRA_CLR_*).
   
   FONT < cFontCompoundName > optionally specifies a character string
   defining the compound name of the font to be selected for the
   Browse columns (see also the :setFontCompoundName() method of
   Xbase Parts).
   
   STYLE 3D | PLAIN | FANCY | < nStyle > defines the style, or the
   appearance, of an AppEdit window.  Default styles are selected
   specifying either option 3D, PLAIN, or FANCY.  Optionally, styles
   can be defined by adding constants listed in the next table, and
   using the result for < nStyle > :
   
   Constants for style definition of an AppBrowse window
   
    Constant                  Description
   
   
    APPSTYLE_FANCY            Is equal to STYLE FANCY
   
    APPSTYLE_3D               Is equal to STYLE 3D
   
    APPSTYLE_PLAIN            Is equal to STYLE PLAIN
   
    APPSTYLE_NOBORDER         The border of the dialog window is suppressed
   
    APPSTYLE_NOTITLEBAR       The title of the dialog window is suppressed
   
   
    APPSTYLE_NOFRAMECONTROLS  Control elements in the title bar are suppressed
   
                              (maximize, minimize button and system menu)
   
   
    APPSTYLE_RAISED           Frames appear in raised style
   
    APPSTYLE_HORIZONTAL       Fields are positioned horizontally row by row
   
   
   ALIAS < cAlias > specifies the alias name for the work area to be
   used for database navigation by the AppBrowse object.  It defaults
   to the current work area.
   
   FOR < lForCondition > is an optional logical expression defining a
   condition, or a code block with a logical return value.  Only
   records for which  < lForCondition > returns the value .T. (true)
   can be edited.  This allows to edit a subset of database records.
   
   ID < cId > is a unique identifier for this object.  This ID is used
   with functions like DC_GETOBJECT() to determine the status
   of a get object.
   
   TITLE < cTitle > is a title to assign to this object.  The title
   is not displayed on the screen but is simply a description of the
   get object which is saved in the GetList.
   
   GROUP < cGroup > is a "group" name (case-sensitive) to assign to
   this GetList object.  Assignment to a group makes it possible to
   perform operations only on GetList items which are members of a
   specified group, using functions such as DC_GetRefresh() or
   DC_ReadGui().
   
   VISIBLE determines whether the object is visible immediately after
   the call to the method :create() . By default the object follows
   the VISIBLE clause of the DCGETOPTIONS command.  Use the
   INVISIBLE clause to override the VISIBLE clause of DCGETOPTIONS
   

Description:

    DCAPPBROWSE is an adaption of the Xbase Application Parts command
    APPBROWSE to the DCDIALOG Getlist system.  APPBROWSE is a very
    powerful command that allows to program standardized browse dialogs
    for databases in a comfortable way.  It creates an object of the
    AppBrowse class and adds Xbase Parts, which access database fields
    (note: an AppBrowse object is a container for Xbase Parts).
    Although the command has many options it is easy to use.  The
    minimum requirements to display an edit dialog are two lines of
    code:
   
       USE Customer NEW
       DCAPPBROWSE
       DCREAD GUI ADDBUTTONS FIT
   
    These two lines open a database (USE) and add an AppBrowse object
    (DCAPPBROWSE) to the GetList for later display by the DCREAD GUI
    command.  The AppBrowse window contains columns for all fields of
    the database.
   
    Options for display
   
     Key word  Description
   
     PARENT    Defines the parent
     POSITION  Positions the AppBrowse window within the parent
     SIZE      Defines the size of the AppBrowse window
     TITLE     Character string to be displayed in the title bar
     COLOR     Defines colors for table columns
     FONT      Defines font for table columns
     HILITE    Defines colors for the column selection bar
     STYLE     Defines display style
   
   
    See the APPBROWSE command in the Xbase++ documentation for more
    information.
   

Examples:

   
    #include "dcapp.ch"
    #include "xbp.ch"
    #include "gra.ch"
    #include "appevent.ch"
   
   
    PROCEDURE XTest()
   
    LOCAL oTabPage1, oTabPage2, oStatic1, oStatic2, GetList := {},;
          GetOptions, oAppEdit, oAppBrowse, oToolBar
   
   
    USE COLLECT NEW SHARED
   
    /* ---- Tab Page #1 ---- */
   
    @  0,0 DCTABPAGE oTabPage1 CAPTION 'Edit' ;
       SIZE 80,20.5 PREOFFSET 0 POSTOFFSET 85 ;
       COLOR GRA_CLR_BLUE
   
    @  1.5,1 DCSTATIC XBPSTATIC_TYPE_RAISEDBOX SIZE 78,18.5 ;
       GROUP oStatic1 PARENT oTabPage1
   
    DCAPPEDIT INTO oAppEdit STYLE PLAIN POSITION 0,0 PARENT oStatic1
   
    /* ---- Tab Page #2 ---- */
   
    @  0,0 DCTABPAGE oTabPage2 CAPTION 'Browse' ;
       RELATIVE oTabPage1 ;
       COLOR GRA_CLR_RED
   
    @  1.5,1 DCSTATIC XBPSTATIC_TYPE_RAISEDBOX SIZE 78,18.5 ;
       GROUP oStatic2 PARENT oTabPage2
   
    DCAPPBROWSE INTO oAppBrowse STYLE FANCY POSITION 0,0 PARENT oStatic2
   
   
    /* ---- Tool Bar ---- */
   
    DCTOOLBAR oToolBar ALIGN TOOLBAR_RIGHT SIZE 7.1
   
    DCADDBUTTON CAPTION '&Exit' ;
                PARENT oToolBar ;
                SIZE 7,1 ;
                ACTION {||DC_ReadGuiEvent(DCGUI_EXIT_OK)}
   
    DCGETOPTIONS WINDOW HEIGHT 440 ;
                  WINDOW WIDTH 620
   
    DCREAD GUI ;
      OPTIONS GetOptions ;
      TITLE "Application Edit/Browse Demo"
   
    CLOSE collect
   
    RETURN
   

Source/Library:

  DCAPP.CH

See Also:

   DCREAD GUI
   dc_readgui()



DCAPPEDIT

Create an APPLICATION EDIT object for displaying with GUI reader

Syntax:

   DCAPPEDIT INTO < oEdit > ;
     [ PARENT < oParent > ] ;
     [ FIELDS < fields,... > ] ;
     [ COLOR < fgC > [, < bgC > ] ] ;
     [ FONT < (font) > ] ;
     [ POSITION < nRow > [, < nCol >] ] ;
     [ SIZE < nWidth > [, < nHeight >] [< per:PERCENT >] ] ;
     [ TITLE < title > ] ;
     [ CAPTION [ FONT < (cFont) >] ;
     [ ALIGN < cAlign:LEFT,CENTER,RIGHT > ] ] ;
     [ HEADING < (head) > ] ;
     [ STYLE < style > ] ;
     [ NOACTION < suppress > ] ;
     [ ALIAS < (alias) > ] ;
     [ SEEK < bSeek > ] ;
     [ FOR < bFor > ] ;
     [ WHILE < bWhile > ] ;
     [ TRIGGER < bDelete > [ON] DELETE ] ;
     [ TRIGGER < bInsert > [ON] INSERT ] ;
     [ TRIGGER < bUpdate > [ON] UPDATE ] ;
     [ BITMAP < bitmap > ;
     [ < fit:FIT > ]  ;
     [ EVAL < bEval > ] ;
     [ RELATIVE < oRel > ] ;
     [ GROUP < cGroup > ] ;
     [ ID < cId > ] ;
     [ VISIBLE ] ;
     [ INVISIBLE ]
   

Arguments:

   INTO < oEdit > is the name of the memory variable that gets the
   AppEdit object assigned which is created by the DCAPPEDIT command.
   If the INTO clause is used it must appear as the first option of
   the DCAPPEDIT command.  If it is not used the object is assigned
   to the variable appObject.
   
   PARENT < oParent > is the name of the variable that was assigned to
   the parent object for this object.  Only use this clause if you
   are placing this object onto another dialogue object.  If this
   clause is not used, then the object will be displayed in the
   top-level dialogue screen.
   
   FIELDS < fields,... > specifies a comma-separated list of field
   names to be edited in the AppEdit window. The field names can be
   specified as literals or as character expressions in parentheses.
   If particular fonts or colors should be used for single fields
   the DCAPPFIELD command must be used for field specification.
   This is also the case when calculation fields are to be
   displayed.
   
   If neither the FIELDS option nor command DCAPPFIELD is used, all
   fields of the current work area are displayed in the AppEdit
   window.
   
   POSITION < pos1 > [, < pos2 >] positions an AppEdit window.  If not
   specified the AppEdit window is displayed at the point {0,0}
   (bottom left corner of the parent).
   
   There are three possibilities to position an AppEdit object.
   Depending on the data types used for < pos1 > and/or < pos2 > the
   AppEdit window can be positioned absolute or relative in its
   parent window.  In addidion, text orientde (row, column) or
   graphic coordinates (x,y) may be used:
   
   Coordinates to position an AppEdit window
   
    < pos1 >    Value    < pos2 >    Value   Description
   
    Array     {nX,nY}  n.a.      NIL     < pos1 > is an array containing
                                         grafic coordinates for the
                                         AppEdit window
    Numeric   nRow     Numeric   nCol    < pos1 > is a numeric value
                                         used as row coordinate,
                                         and < pos2 > specifies the
                                         column coordinate according
   
                                         to a text mode window
    Key word  TOP      Key word  TOP     The AppEdit window is displayed
    Key word  LEFT     Key word  LEFT    at the top, left, bottom, right
    Key word  BOTTOM   Key word  BOTTOM  and/or centered within its parent,
    Key word  RIGHT    Key word  RIGHT   according to the keywords used
    Key word  CENTER   Key word  CENTER  for positioning
   
   The key word SIZE defines the size of an AppEdit window. As with
   POSITION, the size can be specified using graphic or text oriented
   coordinates. Additionaly, percentage values may be used. The next
   table shows different possibilities:
   
   Coordinates used for size definition of an AppEdit window
   
    < size1 >  Value            < size2 >  Value   Description
   
   
    Array    {nXsize,nYsize}  n.a.     NIL     A two element array defines
                                               the size in pixel.
    Numeric  nHeight          Numeric  nWidth  Two numeric values specify
                                               the number of rows and columns
                                               according to a text mode window
   
   If a numeric value is used for < size1 > and/or < size2 > in conjunction
   with the key word PERCENT, the values are interpreted as percentage
   of the parent window's height and/or width.
   
   TITLE < cTitle > is a character expression which is displayed in the
   title bar of an AppEdit window.  It defaults to the alias name of
   the current work area.
   
   COLOR < nForeGround > [, < nBackGround > ] specifies foreground and
   background color for the :drawingArea of the AppEdit window.
   #define constants from XBP.CH or GRA.CH must be used
   (XBPSYSCLR_* or GRA_CLR_*).
   
   FONT < cFontCompoundName > optionally specifies a character string
   defining the compound name of the font to be selected for the
   :drawingArea of the AppEdit window (see also the
   :setFontCompoundName() method of Xbase Parts).
   
   HEADING < headingOptions > initiates the definition of a heading
   to be displayed in the AppEdit Window.  The minimum requirement
   for < headingOptions > is a character string to be used as heading.
   Optionally, the COLOR clause can be used to define a foreground
   and shadow color, a font can be selected with FONT, and the
   heading can be aligned with ALIGN LEFT|CENTER|RIGHT. The complete
   HEADING otpions are:
   
       HEADING < cHeadingText > ;
       [ COLOR < nForeGround > [, < nShadow >] ] ;
       [ ALIGN LEFT | CENTER | RIGHT ] ;
   
       [  FONT < cFontCompoundName > ]
   
   CAPTION < captionOptions > defines color, font and alignment for
   the captions of edit controls. The complete CAPTION options are:
   
       CAPTION ;
       [ COLOR < nForeGround > [, < nShadow >] ] ;
       [ ALIGN LEFT | CENTER | RIGHT ] ;
   
       [  FONT < cFontCompoundName > ]
   
   NOACTION < nSuppress > allows to suppress single or all default
   controls of an AppEdit window.  Values for < nSuppress > are
   #define constants that must be added.  The following table lists
   all possible constants:
   
   Constants to suppress default controls
   
    Constant                Description
   
    APPACTION_NOGOTOP       Pushbutton "First" is suppressed
    APPACTION_NOPREVIOUS    Pushbutton "Previous" is suppressed
    APPACTION_NONEXT        Pushbutton "Next" is suppressed
    APPACTION_NOGOBOTTOM    Pushbutton "Last" is suppressed
    APPACTION_NOINSERT      Pushbutton "New" is suppressed
    APPACTION_NODELETE      Pushbutton "Delete" is suppressed
    APPACTION_NOCANCEL      Pushbutton "Cancel" is suppressed
   
    APPACTION_NOEDIT        Pushbutton "Edit" is suppressed
    APPACTION_NOSEEK        Pushbutton "Seek" is suppressed
    APPACTION_NONAVIGATION  Pushbuttons for navigation are suppressed
    APPACTION_NOMODIFY      Pushbuttons for editing are suppressed
    APPACTION_NONE          No pushbuttons are displayed
    APPACTION_NOFIELDS      Fields are not automatically created
   
   BITMAP < nBitmapID > [ FIT ] specifies the resource ID of a
   bitmap which is to be displayed in the background of an AppEdit
   window.  Without the option FIT, the bitmap is displayed
   repeatedly until it has filled the entire display area.  If FIT
   is used, the bitmap is displayed once, and scaled to the size of
   the display area of the AppEdit window.
   
   STYLE 3D | PLAIN | FANCY | < nStyle > defines the style, or the
   appearance, of an AppEdit window.  Default styles are selected
   specifying either option 3D, PLAIN, or FANCY.  Optionally, styles
   can be defined by adding constants listed in the next table, and
   using the result for < nStyle > :
   
   Constants for style definition of an AppEdit window
   
    Constant                  Description
   
   
    APPSTYLE_FANCY            Is equal to STYLE FANCY
   
    APPSTYLE_3D               Is equal to STYLE 3D
   
    APPSTYLE_PLAIN            Is equal to STYLE PLAIN
   
    APPSTYLE_NOBORDER         The border of the dialog window is suppressed
   
    APPSTYLE_NOTITLEBAR       The title of the dialog window is suppressed
   
   
    APPSTYLE_NOFRAMECONTROLS  Control elements in the title bar are suppressed
   
                              (maximize, minimize button and system menu)
   
    APPSTYLE_NOHEADING        The heading of the AppEdit window is suppressed
   
    APPSTYLE_NOSTATUS         The status bar is suppressed
   
    APPSTYLE_ACTIONICONS      Pushbuttons are displayed as icons
   
   
    APPSTYLE_ACTIONTEXT       Pushbuttons have text captions
   
    APPSTYLE_ACTIONTOP        Pushbuttons are displayed at the top of the AppEdit
   window
    APPSTYLE_ACTIONLEFT       Pushbuttons are displayed on the left in the AppEdit
   window
    APPSTYLE_ACTIONBOTTOM     Pushbuttons are displayed at the bottom of the
   AppEdit window
    APPSTYLE_ACTIONRIGHT      Pushbuttons are displayed on the right in the
   AppEdit window
   
    APPSTYLE_RAISED           Frames appear in raised style
   
    APPSTYLE_HORIZONTAL       Fields are positioned horizontally row by row
   
   
   ALIAS < cAlias > specifies the alias name for the work area to be
   used for database navigation by the AppEdit object.  It defaults
   to the current work area.
   
   FOR < lForCondition > is an optional logical expression defining a
   condition, or a code block with a logical return value.  Only
   records for which  < lForCondition > returns the value .T. (true)
   can be edited.  This allows to edit a subset of database records.
   
   WHILE < lWhileCondition > is an optional logical expression defining
   a condition, or a code block with a logical return value.  It is
   evaluated after database navigation.  The AppEdit window is
   automatically closed when < lWhileCondition > yields .F. (false).
   
   SEEK < exprSeek > is a literal numeric expression or a code block
   with a numeric return value.  It is evaluated after the "Seek"
   pushbutton is clicked.  This allows to embed user defined search
   routines into the AppEdit window.  The numeric return value of
   < exprSeek > must correspond to an APPOP_* #define constant
   (see below).
   
   TRIGGER < deleteFunc > ON DELETE is a character string with the
   name of a user defined function.  It is called when the "Delete"
   pushbutton is clicked.  Alternately, a code block can be
   specified for < deleteFunc >.  The return value of the function, or
   code block, must correspond to an APPOP_* #define constant
   (see below).
   
   TRIGGER < insertFunc > ON INSERT is a character string with the
   name of a user defined function.  It is called when the "Save"
   pushbutton is clicked while the AppEdit window is in INSERT
   mode.  This mode is activated by clicking the "New" pushbutton.
   Alternately, a code block can be specified for < insertFunc >.
   The return value of the function, or code block, must correspond
   to an APPOP_* #define constant (see below).
   
   TRIGGER < updateFunc > ON UPDATE is a character string with the
   name of a user defined function.  It is called when the "Save"
   pushbutton is clicked while an existing record is edited.
   Alternately, a code block can be specified for < updateFunc >.
   The return value of the function, or code block, must correspond
   to an APPOP_* #define constant (see below).
   
   ID < cId > is a unique identifier for this object.  This ID is used
   with functions like DC_GETOBJECT() to determine the status
   of a get object.
   
   TITLE < cTitle > is a title to assign to this object.  The title
   is not displayed on the screen but is simply a description of the
   get object which is saved in the GetList.
   
   GROUP < cGroup > is a "group" name (case-sensitive) to assign to
   this GetList object.  Assignment to a group makes it possible to
   perform operations only on GetList items which are members of a
   specified group, using functions such as DC_GetRefresh() or
   DC_ReadGui().
   
   VISIBLE determines whether the object is visible immediately after
   the call to the method :create() . By default the object follows
   the VISIBLE clause of the DCGETOPTIONS command.  Use the
   INVISIBLE clause to override the VISIBLE clause of DCGETOPTIONS
   

Description:

    DCAPPEDIT is an adaption of the Xbase Application Parts command
    APPEDIT in the DCDIALOG Getlist system.  APPEDIT is a very
    powerful command that allows to program standardized edit dialogs
    for databases in a comfortable way.  It creates an object of the
    AppEdit class and adds Xbase Parts, which access database fields
    (note: an AppEdit object is a container for Xbase Parts).
    Although the command has many options it is easy to use.  The
    minimum requirements to display an edit dialog are two lines of
    code:
   
       USE Customer NEW
       DCAPPEDIT
       DCREAD GUI ADDBUTTONS FIT
   
    These two lines open a database (USE) and add an AppEdit object
    (DCAPPEDIT) to the GetList for later display by the DCREAD GUI
    command.  The AppEdit window contains edit controls for all
    fields of the database.  In addition, pushbuttons are included
    for database navigation.  All other options of the DCAPPEDIT
    command are used to configure the edit window in detail or to
    specify the fields and pushbuttons to be displayed.
   
    Options for display
   
     Key word  Description
   
     PARENT    Defines the parent
     POSITION  Positions the AppBrowse window within the parent
     SIZE      Defines the size of the AppBrowse window
     TITLE     Character string to be displayed in the title bar
     COLOR     Defines colors for table columns
     FONT      Defines font for table columns
     HEADING   Defines colors, font and alignment of a heading
     CAPTION   Defines colors, font and alignment for captions
   
     STYLE     Defines display style
     NOACTION  Suppresses default controls
     BITMAP    Defines a background bitmap
   
    See the APPEDIT command in the Xbase++ documentation for more
    information.
   

Examples:

    #include "dcapp.ch"
    #include "xbp.ch"
    #include "gra.ch"
    #include "appevent.ch"
   
    PROCEDURE Xtest()
   
    LOCAL GetList := {}, GetOptions, oTabPage1, oTabPage2, oTabPage3, ;
          oStatic1, oStatic2, oStatic3, oToolBar, oAppEdit1, oAppEdit2, ;
          oAppEdit3
   
   
    USE COLLECT NEW SHARED
   
    /* ---- Tab Page #1 ---- */
   
    @  0,0 DCTABPAGE oTabPage1 CAPTION 'Plain' ;
       SIZE 80,20.5 PREOFFSET 0 POSTOFFSET 85 ;
       COLOR GRA_CLR_BLUE
   
    @  1.5,1 DCSTATIC XBPSTATIC_TYPE_RAISEDBOX SIZE 78,18.5 ;
       GROUP oStatic1 PARENT oTabPage1
   
    DCAPPEDIT INTO oAppEdit1 STYLE PLAIN POSITION 0,0 PARENT oStatic1
   
    /* ---- Tab Page #2 ---- */
   
    @  0,0 DCTABPAGE oTabPage2 CAPTION '3D' ;
       RELATIVE oTabPage1 ;
       COLOR GRA_CLR_RED
   
    @  1.5,1 DCSTATIC XBPSTATIC_TYPE_RAISEDBOX SIZE 78,18.5 ;
       GROUP oStatic2 PARENT oTabPage2
   
    DCAPPEDIT INTO oAppEdit2 STYLE 3D POSITION 0,0 PARENT oStatic2
   
   
    /* ---- Tab Page #3 ---- */
   
    @  0,0 DCTABPAGE oTabPage3 CAPTION 'Fancy' ;
       RELATIVE oTabPage2 ;
       COLOR GRA_CLR_YELLOW
   
    @  1.5,1 DCSTATIC XBPSTATIC_TYPE_RAISEDBOX SIZE 78,18.5 ;
       GROUP oStatic3 PARENT oTabPage3
   
    DCAPPEDIT INTO oAppEdit3 STYLE FANCY POSITION 0,0 PARENT oStatic3
   
   
    /* ---- Tool Bar ---- */
   
    DCTOOLBAR oToolBar ALIGN TOOLBAR_RIGHT SIZE 7.1
   
    DCADDBUTTON CAPTION '&Exit' ;
                PARENT oToolBar ;
                SIZE 7,1 ;
                ACTION {||DC_ReadGuiEvent(DCGUI_EXIT_OK)}
   
    DCGETOPTIONS WINDOW HEIGHT 440 ;
                  WINDOW WIDTH 620
   
    DCREAD GUI ;
      OPTIONS GetOptions ;
      TITLE 'Application Edit Demo'
   
    CLOSE collect
   
    RETURN
   

Source/Library:

  DCAPP.CH

See Also:

   DCREAD GUI
   dc_readgui()



DCAPPFIELD

Create an APPLICATION FIELD object for displaying with GUI reader

Syntax:

    DCAPPFIELD < cFieldName > | < memvar > := < expression > ;
      [ INTO   < oApp >  ] ;
      [ TYPE   < cType > ] ;
      [ LEN    < nLen >  ] ;
      [ DEC    < nDec >  ] ;
      [ FONT   < cFontCompoundName > ] ;
      [ COLOR  < nForeGround1 > [, < nBackGround1 >] ] ;
      [ HILITE < nForeGround2 > [, < nBackGround2 >] ] ;
      [ ALIGN LEFT | CENTER | RIGHT ] ;
      [ WIDTH  < nWidth > ] ;
      [ READONLY ] ;
      [ HEADING | CAPTION < cHeading >    ;
        [ FONT  < cFontCompoundName > ] ;
        [ COLOR < nForeGround > [, < nBackGround >] ] ;
   
        [ ALIGN LEFT | CENTER | RIGHT > ] ;
      ] ;
      [ FOOTING | COMMENT < cFooting >   ;
        [ FONT  < cFontCompoundName > ] ;
        [ COLOR < nForeGround > [, < nBackGround >] ] ;
        [ ALIGN LEFT | CENTER | RIGHT ] ;
      [ GROUP < cGroup > ]
   

Arguments:

   < cFieldName >
   
     < cFieldName > is a literal field name or a character expression in
     parentheses. It defines the database field to be displayed next
     in an Application Part.
   
   < memvar > := < expression >
   
     If an Application Part is to display not a field but the result
     of an expression, an assignment must be specified, instead of a
     field name. The assignment must be coded using the inline
     assignment operator (:=). An expression is to be assigned to a
     memory variable (LOCAL, STATIC, PRIVATE oder PUBLIC).  < memvar >
     is the name for this variable and the result of < expression > is
     assigned to it, each time the record pointer is moved.
   
   INTO < oApp >
   
     < oApp > is the name of the memory variable that references an
     Application Part. It defaults to appObject (refer to the INTO
     clause of DCAPPEDIT or DCAPPBROWSE).
   
   TYPE < cType >
   
     < cType > is an upper case letter that optionally specifies the
     data type of the field < cFieldName > .
   
   LEN < nLen >
   
     < nLen > is a numeric value that optionally specifies the length of
     the field < cFieldName > .
   
   DEC < nDec >
   
     < nDec > is a numeric value that optionally specifies the number of
     decimal places of the field < cFieldName > .
   
   FONT < cFontCompoundName >
   
     The FONT clause optionally specifies a character string defining
     the compound name of the font to be used for displaying a field
     (see also the  :setFontCompoundName() method of Xbase Parts).
   
   COLOR < nForeGround1 > [, < nBackGround1 >]
   
     The COLOR option specifies foreground and background color for
     the display of a single field. #define constants from XBP.CH or
     GRA.CH must be used (XBPSYSCLR_* or GRA_CLR_*).
   
   HILITE < nForeGround2 > [, < nBackGround2 >]
   
     The option HILITE defines foreground and background color for
     hilighted display of a field. This option is used differently in
     different Application Parts. For APPBROWSE it defines the color
     of the cell cursor, while APPEDIT uses it as color to mark text
     in an entry field.
   
   ALIGN  LEFT | CENTER | RIGHT
   
     The option ALIGN defines alignment of displayed data: left,
     center or right.
   
   WIDTH < nWidth >
   
     < nWidth > defines the width of a field for display. It is a
     numeric value and corresponds to "number of characters". The
     width is calculated from the expression Replicate("W",< nWidth >),
     because W is the widest character in a proportional font.
   
   READONLY
   
     The option READONLY suppresses the possibility to edit a field.
     READONLY is always set when DCAPPFIELD is not used with a field
     name, but with an assignment (< memvar > := < expression >).
   
   HEADING | CAPTION < cHeading > [ < Options > ]
   
     < cHeading > is a character string that is displayed as column
     heading with DCAPPBROWSE, and as caption of an entry field with
     DCAPPEDIT. The key words COLOR, FONT and ALIGN can be used for
     < Options > . This allows to define color, font and alignment for
     a single column heading or caption.
   
   FOOTING | COMMENT < cFooting > [ < Options > ]
   
     < cFooting > is a character string that is displayed as column
     footing with DCAPPBROWSE, and as message in the status line with
     APPEDIT. The key words COLOR, FONT and ALIGN can be used for
     < Options > . This allows to define color, font and alignment for
     a single column heading or message.
   
   GROUP < cGroup > is a "group" name (case-sensitive) to assign to
    this GetList object.  Assignment to a group makes it possible to
    perform operations only on GetList items which are members of a
    specified group, using functions such as DC_GetRefresh() or
    DC_ReadGui().
   

Description:

    DCAPPFIELD is an adaption of the Xbase Application Parts command
    APPFIELD in the DCDIALOG Getlist system.
   
    The DCAPPFIELD command is used to configure the display of single
    fields in Application Parts in greater detail, compared to the
    available options of the DCAPPEDIT or DCAPPBROWSE command. In
    addition, DCAPPFIELD allows to define an expression, rather than
    a field, whose result is displayed in an Application Part. This
    is coded as an assignment, where the inline assignment operator
    must be used to assign the result of an expression to a memory
    variable.
   
    The DCAPPFIELD command can only be used after a command that
    creates an Application part. For example, the command DCAPPEDIT
    or DCAPPBROWSE must be executed in a program (added to the
    GetList array) before DCAPPFIELD may be used (added to the
    GetList array).
   

Examples:

    #include "dcapp.ch"
   
    PROCEDURE Xtest()
   
    LOCAL GetList := {}, oStatic, oAppEdit
   
    USE COLLECT NEW SHARED
   
    @  0,0 DCSTATIC XBPSTATIC_TYPE_RAISEDBOX SIZE 78,18.5 ;
       GROUP oStatic
   
    DCAPPEDIT INTO oAppEdit STYLE 3D POSITION 0,0 PARENT oStatic
   
    DCAPPFIELD COLLECT->descrip INTO oAppEdit ;
      CAPTION 'Description' ;
      COLOR GRA_CLR_BLUE
   
    DCAPPFIELD COLLECT->type INTO oAppEdit  ;
      CAPTION 'Type'       ;
      COLOR GRA_CLR_BLUE
   
    DCAPPFIELD COLLECT->sub_type INTO oAppEdit  ;
      CAPTION 'Sub-Type' ;
      COLOR GRA_CLR_BLUE
   
    DCAPPFIELD COLLECT->location INTO oAppEdit  ;
      CAPTION 'Location' ;
      COLOR GRA_CLR_BLUE
   
    DCAPPFIELD COLLECT->date_orig INTO oAppEdit  ;
      CAPTION 'Date of Origin' ;
      COLOR GRA_CLR_BLUE
   
    DCAPPFIELD COLLECT->date_acqu INTO oAppEdit  ;
      CAPTION 'Acquired Date' ;
      COLOR GRA_CLR_BLUE
   
    DCAPPFIELD COLLECT->appr_value INTO oAppEdit  ;
      CAPTION 'Appraised Value' ;
      COLOR GRA_CLR_BLUE
   
    DCAPPFIELD COLLECT->for_sale INTO oAppEdit  ;
      CAPTION 'For Sale?' ;
      COLOR GRA_CLR_BLUE
   
    DCAPPFIELD COLLECT->condition INTO oAppEdit  ;
      CAPTION 'Condition' ;
      COLOR GRA_CLR_BLUE
   
    DCAPPFIELD COLLECT->bitmap1 INTO oAppEdit  ;
      CAPTION 'Bit Map File #1' ;
      COLOR GRA_CLR_BLUE
   
    DCAPPFIELD COLLECT->bitmap2 INTO oAppEdit  ;
      CAPTION 'Bit Map File #2' ;
      COLOR GRA_CLR_BLUE
   
    DCAPPFIELD COLLECT->comments INTO oAppEdit  ;
      CAPTION 'Comments' ;
      COLOR GRA_CLR_BLUE
   
    DCAPPFIELD COLLECT->memo INTO oAppEdit  ;
      CAPTION 'How was this item acquired?' ;
      COLOR GRA_CLR_BLUE ;
      WIDTH 60
   
    DCREAD GUI ;
      FIT ;
      ADDBUTTONS
   
    RETURN
   

Source/Library:

  DCAPP.CH

See Also:

   DCREAD GUI
   dc_readgui()



DCBITMAP

Create a BITMAP object for displaying with the GUI reader

Syntax:

   DCBITMAP < ncRes > ;
       [PARENT < oParent >] ;
       [PARENTID < cParentId >] ;
       [TARGETRECT < nTgtSrow >,< nTgtScol >,< nTgtErow >,< nTgtEcol >] ;
       [SOURCERECT < nSrcSRow >,< nSrcSCol >,< nSrcERow >,< nSrcECol >] ;
       [BITS < nB >] ;
       [PLANES < nP >] ;
       [OBJECT < oObject >] ;
       [CARGO < xCargo >] ;
       [AUTOSCALE] ;
       [CENTER] ;
       [PREEVAL < bPreEval >] ;
       [EVAL < bEval >] ;
       [ID < cId >] ;
       [TITLE < cTitle >] ;
       [GROUP < cGroup >]
   

Arguments:

   TARGETRECT < nTgtSRow >,< nTgtSCol >,< nTgtERow >,< nTgtECol > identifies
   the TARGET rectangular area in the presentation space where the
   bitmap is displayed.  If they are not included, the output area
   is the same size as the area of SOURCERECT.
   
   SOURCERECT < nSrcSRow >,< nSrcSCol >,< nSrcERow >,< nSrcECol > specifies
   a rectangular area of the bitmap that is displayed in the
   presentation space.  The coordinates must always be specified in
   pixels and are device dependent.  The default value for SOURCERECT
   aSourceRect > is {0, 0, oBitmap:xSize, oBitmap:ySize} which is the
   entire bitmap.
   
   < ncRes > is the numeric value of a BitMap resource that is linked
   to the .EXE or the name of a .BMP file to load or the name of a
   .JPG (JPEG) file to load. It must not be a macro unless < ncRes >
   is a codeblock. The < ncRes > is automatically anchored via a
   Get-Set codeblock created by DC_GetAnchorCB() unless < ncRes > is
   a custom Get-Set code block.
   
   PARENT < oParent > is the name of the variable that was
   assigned to the parent STATIC object for this BitMap Object.
   Only  use this command if you are placing this Browse onto
   another dialogue object.  If this clause is not used, then the
   BitMap will be displayed in the top-level dialogue screen.
   
   PARENTID < cParentID > may be used in lieu of the PARENT < oParent >
   clause.  This identifies the ID of the parent instead of the
   parent's object variable name.
   
   BITS < nB > contains the number of bits that are used for color
   coding in the bitmap.  This value is generally 8 for a color
   bitmap and 1 for a black and white bitmap.
   
   PLANES < nP > contains the number of bit planes (color levels) that
   are used to code pixels in the raster image.  Generally the value
   is 1.  For a true color bitmap, the value is 3, meaning that a
   screen dot is formed by 3x8 = 24 bits.
   
   OBJECT < oObject > is local variable name to store a reference
   to this object after it is created.
   
   AUTOSCALE will automatically scale the BitMap to fit the
   presentation space of the parent object using the same aspect
   ratio as the original bitmap.  If this option is not used, then
   the bitmap with fill the entire area of the presentation space.
   
   CENTER will center the bitmap in the presentation of the parent
   object.
   
   PREEVAL < bPreEval > is a code block to be evaluated by the GUI
   reader before the Xbase Parts object is created.  The object is
   passed to the code block.
   
   EVAL < bEval > is a code block to be evaluated by the GUI reader
   after the Xbase Parts object is created.  The object is passed
   to the code block.
   
   CARGO < xCargo > is any kind of data you wish to to add to the
   :cargo container for this object.  The cargo may be accessed
   at any time via the :cargo exported variable, however it will not
   be stored in the same manner it is entered.  The :cargo container
   of DCDIALOG objects is an array of at least three elements:
   
    [1] - A numeric value that is a pointer to the Getlist array
          for this object.
   
    [2] - A pointer to the GetList array.
   
    [3] - The value of < xCargo >.
   
    [4] and up - optional values added by the GUI reader.
   
   TITLE < cTitle > is a title to assign to this object.  The title
   is not displayed on the screen but is simply a description of the
   get object which is saved in the GetList.
   
   GROUP < cGroup > is a "group" name (case-sensitive) to assign to
   this GetList object.  Assignment to a group makes it possible to
   perform operations only on GetList items which are members of a
   specified group, using functions such as DC_GetRefresh() or
   DC_ReadGui().
   
   ID < cId > is a unique identifier for this object.  This ID is used
   with functions like DC_GETORIGUPDATED() to determine the status
   of a get object.
   

Description:

    The command DCBITMAP creates a new BitMap object and
    adds the object to the array named GETLIST which is later
    processed by the DC_READGETS() function or by the DCREAD
    command.  The GETLIST array must be first declared and
    initialized to the value of {}.  The command DCREAD activates
    the edit mode for all objects found in the GetList array.
    A Getlist object remains stored as long as it is referenced
    in an array or by a variable.  The commands CLEAR and
    CLEAR GETS assign an empty array to the GetList variable.
    This also occurs after the completion of the DCREAD command
    if it is called without the SAVE option, causing all Get
    objects referenced by the GetList array to be released.
   
    The GetList is  passed to the function DC_READGETS() which
    looks at the DC_GUI() flag  and determines whether to process
    this list as a standard text-based get screen or as a
    GUI-based dialogue.
   
    A DCBITMAP object is drawn into the presentation space of a
    parent DCSTATIC object.  This command is used to draw
    bitmaps like .BMP files, .JPG files and resources that have
    been linked in the .EXE.
   
    DCBITMAP objects can be combined with any objects that
    that use the DCDIALOG system, such as @..DCSAY..GET,
    @..DCRADIO, @..DCPUSHBUTTON or @..DCMULTILINE.
   

Notes:

   When displaying .JPG (JPEG) files, the DCLIPIMG.DLL and
   _ISOURCE.DLL files must be in the system path.
   

Examples:

   #include 'dcdialog.ch'
   #include 'appevent.ch'
   
   PROCEDURE Xtest()
   
   LOCAL GetList := {}, oClipPhoto, oBitMap, cBitMap, lPlayBack
   
   @  4,10 DCSTATIC XBPSTATIC_TYPE_RAISEDBOX SIZE 50,10 ;
      GROUP oClipPhoto
   
   cBitMap := ''
   DCBITMAP cBitMap PARENT oClipPhoto AUTOSCALE OBJECT oBitMap
   
   lPlayBack := .f.
   
   @ 4,65 DCPUSHBUTTON CAPTION 'PlayBack' SIZE 9,2 ;
          TOOLTIP 'Play Back all BitMaps in IMAGES.DBF' ;
          ACTION {||lPlayBack := .t., ;
                    DisplayImages(oClipPhoto,oBitMap,@lPlayBack) }
   
   @ 7,65 DCPUSHBUTTON CAPTION 'Stop' SIZE 9,2 ;
          TOOLTIP 'Stop the Play Back' ;
          ACTION {||lPlayBack := .f.}
   
   DCREAD GUI FIT ADDBUTTONS TITLE 'BitMap Demo'
   
   RETURN
   
   
   /* ------------------- */
   
   STATIC PROCEDURE DisplayImages( oClipPhoto, oBitMap, lPlayBack )
   
   LOCAL nSeconds, lClearBox := .t., nSaveArea := Select(), cBmpDb, ;
         nEvent, oXbp, mp1, mp2, cAlaskaDrive
   
   IF !lPlayBack
     RETURN
   ENDIF
   
   cBmpDb := 'C:\ALASKA\XPPW32\SOURCE\SAMPLES\DATA\BMPDB.DBF'
   IF !File(cBmpDb)
     cAlaskaDrive := SubStr(GetEnv('XPPRESOURCE'),1,2)
     cBmpDb := Strtran(cBmpDb,'C:',cAlaskaDrive)
   ENDIF
   IF File(cBmpDb)
     IF !DC_DbSel('BMPDB')
       USE (cBmpDb) NEW VIA foxcdx
     ENDIF
     nEvent := xbeP_None
     DO WHILE lPlayBack .AND. nEvent # xbeP_Close
       oBitMap:setBuffer(FIELD->BITMAP,XBPBMP_FORMAT_WIN3X)
       DC_BitMapDraw( oClipPhoto, oBitMap, lClearBox )
       lClearBox := .f.
       IF Eof()
         DbGoTop()
       ELSE
         DbSkip(1)
       ENDIF
       Sleep(0.1)
       nEvent := AppEvent( @mp1, @mp2, @oXbp, .01 )
       IF Valtype(oXbp) = 'O'
         oXbp:handleEvent( nEvent, mp1, mp2, oXbp )
       ENDIF
     ENDDO
     CLOSE
   ENDIF
   
   RETURN
   

Source/Library:

  DCDIALOG.CH

DCBROWSECOL

Create a BROWSE column object for displaying with GUI reader

Syntax:

   DCBROWSECOL ;
       [DATA < bData >] ;
       [FIELD < xField >] ;
       [ELEMENT < nElement >] ;
       [HEADER < cHeader > [HCOLOR < bncHFgC > [,< ncHBgC >]]] ;
     * [HEADPRES < aHeadPres >] ;
     * [WIDTH < nWidth > [PIXEL] ] ;
       [PICTURE < cPicture >] ;
       [FOOTER < cFooter >] ;
     * [FOOTPRES < aFootPres >] ;
     * [TYPE < nType >] ;
       [COLOR < bncFgC > [,< ncBgC >] ] ;
       [FONT < bocFont >] ;
       [PARENT < oParent >] ;
       [PARENTID < cParentId >] ;
       [TOOLTIP < bcToolTip >] ;
       [MESSAGE < bcMsg > [INTO < oMsgBox >]] ;
       [HELPCODE < cHelpCode >] ;
       [OBJECT < oObject >] ;
       [CARGO < xCargo >] ;
     * [PRESENTATION < aPres >] ;
     & [VALID < bValid >] ;
       [WHEN < bWhen >] ;
       [HIDE < bHide >] ;
     * [PROTECT < bProtect >] ;
       [PREEVAL < bPreEval >] ;
       [EVAL < bEval >] ;
       [SORT < bSort > [LEFTBUTTON] [DEFAULT] ] ;
       [ID < cId >] ;
       [TITLE < cTitle >] ;
     * [ACCELKEY < anAccel >] ;
     * [GOTFOCUS < bGotFocus >] ;
     * [LOSTFOCUS < bLostFocus >] ;
     * [VISIBLE] ;
     * [INVISIBLE] ;
       [GROUP < cGroup >] ;
     * [EDITOR < bcEditor > [EXITKEY < nExitKey >]] ;
     * [TYPE < anType >] ;
     * [REPRESENTATION < aRep >] ;
       [ALIGN < nAlign >] ;
     * [DATATOOLTIP < bToolEnable > [TIPBLOCK < bTipBlock >] ]
   

Arguments:

   NOTE: **** denotes that this feature is supported only when the
         parent object is a DCBROWSE (XbpBrowse) object.
   
         #### denotes that this feature is supported only when the
         parent object is a DCQUICKBROWSE (XbpQuickBrowse) object.
   
   DATA < bData > is a code block to evaluate.  If browsing an array
   use a code block like so:
   
    {||DC_GetColArray(< nArrayElement >,< oBrowse >)} ****
   
   If browsing a database use a code block like so:
   
    {||CUSTOMER- >cust_name}
   
   - or -
   
   FIELD < cField > is the name of a database field to browse.
   Use this clause only with databases instead of the DATA < bData >
   clause.  The field clause will create a GET/SET style codeblock
   which is needed when using the cell-editing feature with the
   EDIT clause of the @ DCBROWSE command.  The cell editor handles
   handles record locking and unlocking.
   
   - or -
   
   ELEMENT < nElement > is the element number of a multi-dimensional
   array.  Use this clause only with arrays instead of the DATA < bData >
   clause.
   
   < oBrowse > is the name of the variable to assign as a storage
   place for this object.
   
   WIDTH < nWidth > is the width of the column in characters unless
   the PIXEL clause is used thus making the column width in pixels.
   Note: If a proportional font is used (ie. Arial) and the PIXEL
   clause is not used, the width of the column will not be the
   same as the number of characters displayed.
   
   HEADER < cHeader > is the heading of the column.  If the parent
   is a DCBROWSE object, this may be a multiple-line header if
   the HEADLINES < nLines > clause of the parent @ DCBROWSE command
   is used.
   
   HCOLOR < bncHFGc >, < ncHBGc > are foreground and background colors of
   the header. They may be character strings representing valid
   text-based colors supported by SetColor() or they may be numeric
   constants which begin with either the prefix GRA_CLR_ or the prefix
   XBPSYSCLR_ as defined in GRA.CH or XBP.CH. If < bncFGc > is a code
   block is must return a 2-element array containing a foreground
   and background color. The array may also consist of two sub-arrays
   containing RGB colors. ****
   
   HEADPRES < aHeadPres > is a two-dimensional array. If specified,
   this contains presentation parameters for the Header object.
   The first column of the array must contain #define constants
   from the XBP.CH file starting with the prefix XBP_PP_. These
   constants define the presentation parameters that can be set
   for the header and include colors and fonts. The second column
   of the array in < aPres > contains the value for each setting.
   These are also generally set using #define constants from the
   GRA.CH file.  If no PRESENTATION clause is used, then the default
   is the PRESENTATION parameters of the parent Browse object. ****
   
   FOOTER < cFooter > is an optional footer for the column. This may be
   a multiple-line footer if the FOOTLINES < nLines > clause of the
   parent @ DCBROWSE command is used. ****
   
   FOOTPRES < aFootPres > is a two-dimensional array. If specified,
   this contains presentation parameters for the Footer object.
   The first column of the array must contain #define constants
   from the XBP.CH file starting with the prefix XBP_PP_. These
   constants define the presentation parameters that can be set
   for the header and include colors and fonts. The second column
   of the array in < aPres > contains the value for each setting.
   These are also generally set using #define constants from the
   GRA.CH file.  If no PRESENTATION clause is used, then the default
   is the PRESENTATION parameters of the parent Browse object. ****
   
   PICTURE < cPicture > is any valid picture clause which will modify
   the presentation of the data via the Transform() function.  ****
   
   PARENT < oParent > is the name of the variable that was assigned to
   the parent browse object previously created by the @ DCBROWSE
   command or the @ DCQUICKBROWSE command.
   
   PARENTID < cParentID > may be used in lieu of the PARENT < oParent >
   clause.  This identifies the ID of the parent instead of the
   parent's object variable name.
   
   FONT < cFont > is a character string defining an optional font.
   The font string must conform to the Xbase++ standard, ie.
   "10.Courier.Bold". It may also be a font object or a code block
   that returns a character string or a font object to later
   refresh with DC_GetRefresh().
   
   PRESENTATION < aPres > is a two-dimensional array. If specified,
   this contains presentation parameters for the Column object.
   The first column of the array must contain #define constants
   from the XBP.CH file starting with the prefix XBP_PP_. These
   constants define the presentation parameters that can be set
   for the object and include colors and fonts. The second column
   of the array in < aPres > contains the value for each setting.
   These are also generally set using #define constants from the
   GRA.CH file.  If no PRESENTATION clause is used, then the default
   is the PRESENTATION parameters of the parent Browse object. ****
   
   PREEVAL < bPreEval > is a code block to be evaluated by the GUI
   reader before the Xbase Parts object is created.  The object is
   passed to the code block.
   
   EVAL < bEval > is a code block to be evaluated by the GUI reader
   after the Xbase Parts object is created.  The object is passed
   to the code block.
   
   VALID < bValid > is a code block to be evaluated for validating
   the data-entered when cell-editing in the browse.  The code
   block is only used when cell-editing is enabled with the EDIT
   clause of the @ DCBROWSE command and cell editor object does not
   have its own VALID clause.  The code block must return a
   logical value.  The edit buffer is passed to the code block,
   therefore the codeblock should like like so:
   
    { |c| !Empty(c) }
   
   If the cell editor object has it's own valid clause then the
   VALID clause will be ignored and the editor object is passed to
   the editor's code block.
   
   MESSAGE < bcMsg > is the message you want to display in the
   message area of the dialogue screen defined by the DCMESSAGEBOX
   command when the object is in focus.  Optionally, INTO < oMsgBox >
   will designate which message box to display the message into.
   If the INTO clause is not used, then the last message box in the
   GetList is the default. If < bcMsg > is a code-block, it must
   return a character string.  < oMsgBox > may also be any object that
   supports the :setCaption() method. ****
   
   HELPCODE < cHelp > is a character string that is passed to the
   DC_HelpF1() function if F1 is pressed or the HELP button
   is clicked when this GET has focus.  This HELPCODE allows
   the Help system to override the passing of the Procedure and
   Varname for more specific context-help.
   
   OBJECT < oObject > is the name of a variable to use as a container
   for the XbpColumn object.
   
   TOOLTIP < bcToolTip > is a character string which will display
   as a "Tool Tip" next to the object when the cursor is passed
   over the object. A semi-colon within the text indicates a new
   line.  If < bcToolTip > is a code-block, it must return a character
   string.  NOTE: The Tooltip painting method is run in another
   thread, therefore the codeblock should not run code that points
   to the current work area.  It may however, contain local, public
   or private variables. ****
   
   WHEN < bWhen > is a code block to be evaluated before setting focus
   to this column.  The code block must return a logical value.  If
   the code block returns a .FALSE. the cell cannot be highlighted
   or resized. ****
   
   HIDE < bHide > is a code block to be evaluated to hide this column.
   The code block must return a logical value.  If the code block
   returns a .FALSE. the column will be displayed, otherwise it will
   be hidden.  The code block is evaluated by DC_GetRefresh().
   
   PROTECT < bProtect > is a code block to be evaluated before cell-
   editing in the browse.  The code block must return a logical value.
   If the code block returns a .TRUE. the cell cannot be edited.
   
   CARGO < xCargo > is any kind of data you wish to to add to the
   :cargo container for this object.  The cargo may be accessed
   at any time via the :cargo exported variable, however it will not
   be stored in the same manner it is entered.  The :cargo container
   of DCDIALOG objects is an array of at least three elements:
   
    [1] - A numeric value that is a pointer to the Getlist array
          for this object.
   
    [2] - A pointer to the GetList array.
   
    [3] - The value of < xCargo >.
   
    [4] and up - optional values added by the GUI reader..
   
   COLOR < bncFGc >, < ncBGc > are foreground and background colors.
   They may be character strings representing valid text-based
   colors supported by SetColor() or they may be numeric constants
   which begin with either the prefix GRA_CLR_ or the prefix
   XBPSYSCLR_ as defined in GRA.CH or XBP.CH. If < bncFGc > is a
   code block is must return a 2-element array containing a
   foreground and background color. ****
   
   SORT < bSort > is an optional code block to evaluate for sorting
   the browse when the mouse right button is clicked in the header
   area of a column.  ****  Usage of the code block is as follows:
   
   { | aPos, nColPos, self | ... }
   
   < aPos > is a two-element array containing the mouse coordinates.
   < nColPos > is the column number of the browse column.  < self > is
   the Column object.  LEFTBUTTON is an optional clause that enables
   the use of the LEFT mouse button in the header, otherwise only
   the RIGHT button is enabled.  The left button is disabled by
   default to prevent conflict with column sizing.
   
   DEFAULT will establish this column as the default sorted column,
   as though the mouse was clicked in the header.  This clause
   should be used only if the sort order established by the sort
   block is equal to the current sort order.
   
   NOTE: The heading colors and bitmaps for the sorted columns may
         be established by the SORT* clauses of the @ DCBROWSE
         command.
   
   ID < cId > is a unique identifier for this object.  This ID is used
   with functions like DC_GETORIGUPDATED() to determine the status
   of a get object.
   
   TITLE < cTitle > is a title to assign to this object.  The title
   is not displayed on the screen but is simply a description of the
   get object which is saved in the GetList.
   
   ACCELKEY < anAccel > is a numeric "hot-key" assignment that will set
   focus to the checkbox object when the hot-key is pressed.  The key
   must be a valid key with the prefix xbeK_*.  These keys are
   defined in APPEVENT.CH.  < anAccel > may also be an array of numeric
   values to assign more than one key to the object. ****
   
   GOTFOCUS < bGotFocus > is a code block that is evaluated when this
   object receives input focus.  < bGotFocus > := {|uNIL1,uNIL2,self|...}
   ****
   
   LOSTFOCUS < bLostFocus > is a code block that is evaluated when this
   object loses input focus.   < bLostFocus > := {|uNIL1,uNIL2,self|...}
   ****
   
   GROUP < cGroup > is a "group" name (case-sensitive) to assign to
   this GetList object.  Assignment to a group makes it possible to
   perform operations only on GetList items which are members of a
   specified group, using functions such as DC_GetRefresh() or
   DC_ReadGui().
   
   VISIBLE determines whether the object is visible immediately after
   the call to the method :create() . By default the object follows
   the VISIBLE clause of the DCGETOPTIONS command.  Use the
   INVISIBLE clause to override the VISIBLE clause of DCGETOPTIONS
   ****
   
   EDITOR < bcEditor > may be the character string ID of the object
   in the GetList which will be used as the Cell-Editor for this
   column or a code-block.  Cell-editing is enabled via the EDIT
   clause of the DCBROWSE command which created the parent object for
   this column.  If the EDITOR clause is not used then the cell-editor
   is a standard DCGET.  Any existing object such as a DCGET,
   DCMULTILINE, DCCOMBOBOX, etc. may be used as the cell editor,
   however it must have been assigned an ID.  All properties of the
   cell editor are used as they were defined by it's respective command
   with the exception of the width, which is determined by the width of
   the cell.  If < bcEditor > is a codeblock, the codeblock will be
   evaluated when the edit mode is invoked.
   
   
   CELL EDITING NOTE 1: When using a DC* command to create an object
   which will be used only as a cell editor and not displayed in
   the dialog, < nRow > and < nCol > coordinates must be entered as NIL
   and no parent clause is required. If the DC* command being used
   as the cell editor is a Getlist object that is also painted on a
   dialog screen with < nRow > and < nCol > coordinates, the SIZE must
   be in PIXELS.
   
   CELL EDITING NOTE 2: EXITKEY < nExitKey > is the key to use to exit
   the editing within the cell and move to the next cell.  The
   default is xbeK_ENTER.  When editing a cell with a DCMULTILINE
   object it is recommended that < nExitKey > be a key such as
   xbeK_END or xbeK_F10.
   
   CELL EDITING NOTE 3: The variable associated with the EDITOR
   object may be any Get/Set code block or a variable initialized
   to a NIL value.  When it is a NIL, then the Get/Set code block
   attached to the browse column will be used.  A NIL variable is
   recommended for ease of programming.
   
   TYPE < anType > is an array defining the type of each column.
   { < cValtype >, < nDisplayType >, < cPicture > }.
   
   < cValType > is the type of data displayed in the column. It is
   specified using a letter equivalent to the return value of the
   Valtype() function. These are usually the characters "C", "D",
   "L" or "N".
   
   < nDisplayType > defines the display type of the column, or how
   data is visualized. Data can be represented in textual (default)
   or graphic form. Constants defined in XBP.CH are used for
   < nDisplayType > . They are listed in the table below:
   
   Constants used for < nDisplayType >
   
    Constant                  Description
   
    XBPCOL_TYPE_BITMAP        The column displays bitmaps
    XBPCOL_TYPE_ICON          The column displays icons
    XBPCOL_TYPE_SYSICON       The column displays system-icons
    XBPCOL_TYPE_FILEICON      The column displays normal file-icons
    XBPCOL_TYPE_FILEMINIICON  The column displays small file-icons
    XBPCOL_TYPE_TEXT      *)  The column displays textual data
   
    *) default value
   
   < cPicture > optionally defines a picture string for textual data.
   Refer to the Transform() function for picture formatting rules.
   
   REPRESENTATION < aRep > is an array of information about the
   presentation of column. ####  The array looks like this:
   
    { < xValue >, < nNormalID >, < nHiliteID > }
   
     When data in a column cell has the value < xValue >  the image
     with the resource ID < nNormalID > is displayed in the cell. If
     the cell is to be hilited, the image with the ID < nHiliteID > is
     displayed. The value -1 is valid for both resource IDs. In this
     case, nothing is displayed in the cell. Once a visual
     representation is defined, it can be voided by specifying NIL
     for the resource IDs.
   
   ALIGN < nAlign > is a numeric value that defines horizontal and
   vertical alignment ####:
   
    Constants for alignment
   
    Constant          Description
   
    XBPALIGN_TOP      Alignment at the top
    XBPALIGN_LEFT     Alignment on the left
    XBPALIGN_BOTTOM   Alignment at the bottom
    XBPALIGN_RIGHT    Alignment on the right
    XBPALIGN_HCENTER  Horizontally centered
    XBPALIGN_VCENTER  Vertically centered
   
   DATATOOLTIP < bToolEnable > is a code block that is evaluated in
   the tooltip thread when the mouse is passed over the data area
   of a browse column.  If < bEnable > returns a .TRUE. the contents
   of the cell are displayed in a tooltip.  Use this clause when
   browse columns are shorter than the data in the cell. Semicolon (;)
   characters or CRLF (Chr(13)+Chr(10)) pairs in the cell are
   interpreted as a line break. If < bTipBlock > is a code block then
   the return value of the code block will be displayed as the
   tooltip.  The code block may return a text string or a pointer
   to an XbpBitMap() object.  If browsing a database, then the
   record pointer will be set to the same record as the cell
   requesting the tip.  If browsing an array, then the row element
   number of the cell requesting the tip will be passed to the code
   block.
   

Description:

    The command DCBROWSECOL creates a new Browse column definition
    and adds it to the array named GETLIST which is later
    processed by the DC_Read*() functions or by the DCREAD *
    commands.  The GETLIST array must be first declared and
    initialized to the value of {}.
   
    The command DCREAD GUI creates the DC_Xbp*() objects and
    activates the edit mode for all definitions found in the
    GetList array.
   
    The command DCREAD HTML creates the DC_Html*() objects and
    writes the HTML source code.
   
    A Getlist object remains stored as long as it is referenced
    in an array or by a variable.  The commands CLEAR and
    CLEAR GETS assign an empty array to the GetList variable.
    This also occurs after the completion of the DCREAD command
    if it is called without the SAVE option, causing all Get
    objects referenced by the GetList array to be released.
   
    A DCBROWSECOL object can only be added to a DCBROWSE object
    or a DCQUICKBROWSE object (the parent) which must be created
    first.
   
   
   
   NAME <þcVarNameþ> is the variable name to assign to the GET
   object (for HTML based applications.)
   

Notes:

    Clauses marked with an asterisk ( * ) are not supported by
    DCREAD HTML.
   
    GUI applications:
   
    When using a DCBROWSE object (DC_XbpBrowse) as the parent for
    DCBROWSECOL, a DC_XbpColumn object is created and added to the
    childlist of the DC_XbpBrowse parent.
   
    When using a DCQUICKBROWSE object (DC_XbpQuickBrowse) as the
    parent for a DCBROWSECOL, there is no child object created,
    instead the DCBROWECOL command creates a psuedo-object of
    the DC_QBColumn() class for use with cell-editing.  These
    column objects are not children of the DC_XbpQuickBrowse class
    but instead are added to an array that is stored in the
    parent's :cargo slot.
   
    ----------------------
   
    HTML applications:
   
    A column object of the DC_HtmlColumn() class is created
    and added to the childlist of the DC_HtmlBrowse() class.
   

Examples:

    /*
    This example demonstrates both a database browse and an
    array browse in the same dialogue screen.  The database
    browse is on Tab Page 1 and the Array browse (directory
    listing) is on Tab Page 2.
    */
   
    #include "dcdialog.ch"
    #include "xbp.ch"
   
   
    PROCEDURE Xtest()
   
    LOCAL GetList := {}, GetOptions, oTabPage1, oTabPage2, ;
          oBrowse, cAlias, aDirectory, oDirectory
   
    USE COLLECT NEW SHARED
   
    /* ---- Tab Page #1 ---- */
   
    @ 3,3 DCTABPAGE oTabPage1 CAPTION 'Browse' ;
      SIZE 60,12
   
    cAlias := "BASEBALL"
   
    @ 2,2 DCBROWSE oBrowse PARENT oTabPage1  ;
          DATA cAlias SIZE 55,9 FREEZELEFT { 1, 2 }
   
    DCBROWSECOL FIELD COLLECT->descrip ;
      HEADER "Description" PARENT oBrowse
   
    DCBROWSECOL FIELD COLLECT->type ;
      HEADER "Type" PARENT oBrowse
   
    DCBROWSECOL FIELD COLLECT->sub_type ;
      HEADER "SubType" PARENT oBrowse
   
    DCBROWSECOL FIELD COLLECT->location ;
      HEADER "Location" PARENT oBrowse
   
    DCBROWSECOL DATA {|a|a:={'Yes','No','Not Sure'},a[COLLECT->for_sale+1]} ;
      HEADER "For Sale?" PARENT oBrowse
   
    DCBROWSECOL FIELD COLLECT->date_orig ;
      HEADER "Orig Date" PARENT oBrowse
   
    DCBROWSECOL FIELD COLLECT->date_acqu ;
      HEADER "Acqu Date" PARENT oBrowse
   
    DCBROWSECOL FIELD COLLECT->orig_price ;
      HEADER "Acqu Price" PARENT oBrowse
   
    DCBROWSECOL FIELD COLLECT->appr_value ;
      HEADER "Appr Value" PARENT oBrowse
   
    DCBROWSECOL FIELD COLLECT->condition ;
      HEADER "Condition" PARENT oBrowse
   
    DCBROWSECOL DATA {||IIF(COLLECT->original,'Yes','No')} ;
      HEADER "Orig Owner?" PARENT oBrowse
   
   
    /* ---- Tab Page #2 ---- */
   
    @  0,0 DCTABPAGE oTabPage2 CAPTION 'Directory' ;
       RELATIVE oTabPage1
   
    aDirectory := Directory()
   
    @ 2,2 DCBROWSE oDirectory PARENT oTabPage2 ;
          DATA aDirectory SIZE 55,9
   
    DCBROWSECOL ELEMENT 1 HEADER "Name" PARENT oDirectory WIDTH 10
   
    DCBROWSECOL ELEMENT 2 HEADER "Size" PARENT oDirectory WIDTH 8
   
    DCBROWSECOL ELEMENT 3 HEADER "Date" PARENT oDirectory WIDTH 8
   
    DCBROWSECOL ELEMENT 4 HEADER "Time" PARENT oDirectory WIDTH 8
   
    DCREAD GUI ;
      TITLE "My COLLECTION" ;
      FIT ;
      ADDBUTTONS ;
      EVAL {||oBrowse:hide(), oBrowse:show()}
   
    RETURN
   
   /*
   This is an example of an array editor which
   uses custom EDITORs for cell-editing.
   */
   
   
   FUNCTION XSample_49()
   
   LOCAL oBrowse, oBrowBox, aStructure, aFields, GetList := {}, ;
         oToolBar, GetOptions, aOldStruct, lOk, oColumn1, nPointer, ;
         aField, xNIL := NIL
   
   USE collect VIA 'DBFNTX'
   aStructure := dbstruct()
   aOldStruct := AClone(aStructure)
   aFields := ARRAY(LEN(aStructure))
   aFields := aStructure[1]
   
   FOR nPointer := 1 TO Len(aStructure)
      aStructure[nPointer,1] := Pad(aStructure[nPointer,1],10)
   NEXT
   nPointer := 1
   
   @  2,2 DCSTATIC XBPSTATIC_TYPE_RECESSEDBOX SIZE 45,12 ;
           OBJECT oBrowBox
   
   @ .1,.5 DCBROWSE oBrowse DATA aStructure PARENT oBrowBox;
           SIZE 43,11.8 EDIT xbeBRW_ItemSelected ;
           INTO aField ;
           POINTER nPointer ;
           DELETE xbeK_DEL ;
           INSERT xbeK_INS
   
   DCBROWSECOL ELEMENT 1 WIDTH 8 HEADER "Name" PARENT oBrowse ;
      OBJECT oColumn1 ;
      EDITOR 'NAME'
   
   DCBROWSECOL ELEMENT 2 WIDTH 5 HEADER "Type" PARENT oBrowse ;
      EDITOR 'TYPE' // VALID {|c|_XSample49(2,c,aStructure,oBrowse)}
   
   DCBROWSECOL ELEMENT 3 WIDTH 5 HEADER "Length" PARENT oBrowse ;
      EDITOR 'LENGTH' // VALID {|n|_XSample49(3,n,aStructure,oBrowse)}
   
   DCBROWSECOL ELEMENT 4 WIDTH 5 HEADER "Decimals" PARENT oBrowse ;
      EDITOR 'DECIMALS' // VALID {|n|_XSample49(4,n,aStructure,oBrowse)}
   
   @ NIL,NIL DCGET xNIL PICT "@!" GETID 'NAME'  ;
             VALID {|o|_XSample49(1,aStructure,oBrowse,nPointer)}
   
   @ NIL,NIL DCGET xNIL PICT "!"  GETID 'TYPE' ;
             VALID {|o|_XSample49(2,aStructure,oBrowse,nPointer)}
   
   @ NIL,NIL DCGET xNIL PICT "999" GETID 'LENGTH' ;
             VALID {|o|_XSample49(3,aStructure,oBrowse,nPointer)} ;
             WHEN {|o|_XSample49(7,aStructure,oBrowse,nPointer)}
   
   @ NIL,NIL DCGET xNIL PICT "999"  GETID 'DECIMALS' ;
             VALID {|o|_XSample49(4,aStructure,oBrowse,nPointer)} ;
             WHEN {|o|_XSample49(8,aStructure,oBrowse,nPointer)}
   
   @ 15,1 DCTOOLBAR oToolBar SIZE 45,1.5 BUTTONSIZE 10,1.5
   
   DCADDBUTTON CAPTION '&Insert' PARENT oToolBar ;
      TOOLTIP 'Add New Field' ;
      ACCELKEY xbeK_ALT_I ;
      ACTION {||SetAppFocus(oColumn1),PostAppEvent(xbeK_INS,,,oBrowse)}
   
   DCADDBUTTON CAPTION '&Delete' PARENT oToolBar ;
      TOOLTIP 'Delete Field' ;
      ACCELKEY xbeK_ALT_D ;
      ACTION {||SetAppFocus(oColumn1),PostAppEvent(xbeK_DEL,,,oBrowse)}
   
   DCGETOPTIONS ABORTQUERY
   
   DCREAD GUI FIT TITLE "Database Structure Editor";
      BUTTONS DCGUI_BUTTON_OK + DCGUI_BUTTON_CANCEL ;
      ARRAYTRANSLATE ;
      OPTIONS GetOptions ;
      TO lOk ;
      SETFOCUS oColumn1 ;
      EVAL {|o|SetAppWindow(o)}
   
   RETURN IIF( lOk, aStructure, aOldStruct )
   
   /* ------------------- */
   
   STATIC FUNCTION _XSample49( nAction, aStructure, oBrowse, nPointer, xValue )
   
   LOCAL nFound, GetList := {}, GetOptions, ;
         nVarLength, nNumStart, nNumEnd, nVarPointer, cNewString, ;
         cFieldName, cFieldType, nFieldLen, nFieldDec, nFieldNmbr, lOk, ;
         nFieldCount, cVarName, cVar
   
   cFieldName := aStructure[nPointer,1]
   cFieldType := aStructure[nPointer,2]
   nFieldLen  := aStructure[nPointer,3]
   nFieldDec  := aStructure[nPointer,4]
   
   IF nAction = 1 // Validate field name
   
      nFound := AScan(aStructure,{|a|Upper(a[1])==Upper(cFieldName)})
      IF Empty(cFieldName)
         DC_WinAlert('Field name cannot be empty')
         RETURN .f.
      ELSEIF nFound # 0 .AND. nFound # nPointer
         DC_WinAlert('Duplicate Field Name.  Please re-enter')
         RETURN .f.
      ENDIF
   
   ELSEIF nAction = 2 // Validate field type
   
      IF !(cFieldType $ 'CLMND')
         DC_MsgBox(,,{ ;
                    'Valid Field types are:', ;
                    '', ;
                    'C - Character', ;
                    'N - Numeric', ;
                    'D - Date', ;
                    'L - Logical', ;
                    'M - Memo'}, ;
                    'Field Type Error' )
         RETURN .f.
      ENDIF
   
   ELSEIF nAction = 3 // Validate field Length
   
     IF nFieldLen <= 0
        DC_WinAlert('Length cannot be less than 1')
        RETURN .f.
     ENDIF
   
   ELSEIF nAction = 4 // Validate field decimals
   
     IF cFieldType $ 'CDLM'
       aStructure[nPointer,4] := 0
     ELSEIF nFieldDec > nFieldLen - 2
        DC_WinAlert('Decimals cannot be greater than ' + ;
                     Str(nFieldLen-2))
        RETURN .f.
     ENDIF
   
   ELSEIF nAction = 7 // When test for Field Length
   
     IF cFieldType $ 'MDL'
        RETURN .f.
     ENDIF
     RETURN .t.
   
   ELSEIF nAction = 8 // When test for Field Decimals
   
     IF cFieldType $ 'MDLC'
        RETURN .f.
     ENDIF
     RETURN .t.
   
   ENDIF
   
   IF cFieldType = 'C'
      aStructure[nPointer,4] := 0
   ELSEIF cFieldType = 'M'
      aStructure[nPointer,3] := 10
      aStructure[nPointer,4] := 0
   ELSEIF cFieldType = 'D'
      aStructure[nPointer,3] := 8
      aStructure[nPointer,4] := 0
   ELSEIF cFieldType = 'L'
      aStructure[nPointer,3] := 1
      aStructure[nPointer,4] := 0
   ENDIF
   oBrowse:refreshCurrent()
   
   RETURN .t.
   
    /*
    This example demonstrates an array browse with source
    written to HTML.
    */
   
   FUNCTION XTest2()
   
   LOCAL i, j, GetList[0], cHtml, oBrowse, aDir := Directory()
   
   @ 0,0 DCBROWSE oBrowse SIZE 4,10 DATA aDir
   
   DCBROWSECOL ELEMENT 1 HEADER 'File Name' PARENT oBrowse
   DCBROWSECOL ELEMENT 2 HEADER 'File Size' PARENT oBrowse
   DCBROWSECOL ELEMENT 3 HEADER 'File Date' PARENT oBrowse
   DCBROWSECOL ELEMENT 4 HEADER 'File Time' PARENT oBrowse
   
   DCREAD HTML TO cHtml
   MemoWrit('TEST.HTM',cHtml)
   
   RETURN nil
   

Source/Library:

  DCDIALOG.CH

See Also:

   @ DCBROWSE
   @ DCQUICKBROWSE
   dc_htmlcolumn()



DCDOT

Invoke a Dot-prompt window

Syntax:

   DCDOT
   

Arguments:

   None.
   

Description:

   DCDOT will load DCLIP1.DLL and run the DC_Dot() function
   to invoke a Dot-Prompt window.
   

Source/Library:

  DCDIALOG.CH

See Also:

   DC_Dot()
   DCQDEBUG



DCFINDADDCOL

Add column to an array to be used by DCFINDBROWSE

Syntax:

   DCFINDADDCOL                                            ;
        [DATA < nbData >] [ELEMENT < nElement >]               ;
        [FIELD < cField >]                                   ;
        [HEADER < cHeader > ]                                ;
        [WIDTH < nWidth > ]                                  ;
        [TAG,ORDER,INDEX < cIndexOrder >]                    ;
        [TAGPROMPT,ORDERPROMPT,INDEXPROMPT < cIndexPrompt >] ;
        [PREFIX < bcPrefix >]                                ;
        [SEEK < bSeek]                                      ;
        [TO < aArray >]
   

Arguments:

   DATA < nbData > is a code block for the data to be displayed or
   the element number if browsing an array. ex: {||CUSTOMER- >name}
   Alternatively, if browsing an array, the clause ELEMENT < nElement >
   may be used.
   
    or
   
   FIELD < cField > is the name of a database field.
   
   HEADER < cHeader > is the heading of the column.
   
   WIDTH < nWidth > is the width of the column
   
   TAG | ORDER | INDEX < cIndexOrder > is the Index Name or Tag
   (ex: "CUSTNAME") is the index tag to select when right clicking
   the column header.  If browsing an array, this is the element
   number to SORT.
   
   TAGPROMPT | ORDERPROMPT | INDEXPROMPT < cIndexPrompt > is the
   Index Prompt (ex: "Customer Name") that is displayed next to
   the user input area when this column is selected as the
   controlling index for the seek by right-clicking the column
   header.
   
   PREFIX < bcPrefix > is the Prefix for AutoSeek.  This must be a
   character string or a code block.  If it is a code block, the
   code block must return a character string.  The character string
   is inserted before the user input buffer when performing the
   seek.
   
   SEEK < bSeek > is the Seek string code block. User input buffer
   is passed to this code block and the return value of the code
   block is used for the seek. If this argument is not used then
   the contents of the user input buffer are used for the seek.
   
   ex: {|c|Right(Space(7)+Alltrim(cString),7)}
   
   TO < aArray > is the name of the array to add the column information.
   

Description:

   DCFINDADDCOL is used to add a column to an array to be later
   used with DCFINDBROWSE or DC_FindBrowse().
   

Examples:

   // Example 1 - Popup a Browse with multiple columns and AutoSeek
   
   FUNCTION XTest()
   
   LOCAL GetList := {}, oBrowse, aFields, aHeaders, aPres, nRecord
   
   SET DEFA TO ..\XDOC
   USE EXPRESS VIA FOXCDX EXCLUSIVE ALIAS 'XDOC'
   SET INDEX TO EXPRESS.CDX
   OrdSetFocus('COMMAND')
   SET DEFA TO
   
   aFields := {}
   
   DCFINDADDCOL DATA {||XDOC->command} TAG 'COMMAND' PROMPT 'Command' ;
      HEADER 'Command' TO aFields
   
   DCFINDADDCOL DATA {||XDOC->short} HEADER 'Short' TO aFields
   
   DCFINDADDCOL DATA {||XDOC->type} HEADER 'Type' TO aFields  ;
      TAG 'TYPE' PROMPT 'Type'
   
   DCFINDADDCOL DATA {||XDOC->module} HEADER 'Module' TO aFields  ;
      TAG 'TYPE' PROMPT 'Type' TO aFields
   
   DCFINDADDCOL DATA {||XDOC->see_also} HEADER 'See Also' TO aFields
   
   @ DCFINDBROWSE FIELDS aFields DATA 'XDOC' SIZE 50,10 AUTOSEEK
   
   
   RETURN nil
   
   
   // Example 2 - Browsing an array
   
   FUNCTION FindDir()
   
   LOCAL aFields := {}, lStatus, aDir := Directory()
   
   DCFINDADDCOL DATA 1 PROMPT "File Name" ;
      HEADER 'File Name' WIDTH 10 TO aFields ORDER 1
   
   DCFINDADDCOL DATA 2 PROMPT "File Size" ;
      HEADER 'File Size' WIDTH 10 TO aFields ORDER 2
   
   @ 0,0 DCFINDBROWSE                         ;
          FIELDS aFields                      ;
          SIZE 50, 15                         ;
          TITLE 'Select a File'               ;
          AUTOSEEK                            ;
          DATA aDir                           ;
          NOHSCROLL ;
          TO lStatus
   
   RETURN lStatus
   

Source/Library:

  DCDIALOG.CH

See Also:

   DC_FindBrowse()



DCFORM

A command for creating FORM tags in HTML

Syntax:

   @ [ < nRow >,< nCol > ] DCFORM       ;
             [OBJECT < oForm >]       ;
             [PARENT < oParent >]     ;
             [PARENTID < cPID >]      ;
             [ACTION < cAction >]     ;
             [TARGET < cTarget >]     ;
             [ENCTYPE < cEncType >]   ;
             [METHOD < cMethod >]     ;
             [CARGO < xCargo >]       ;
             [HIDE < bHide >]         ;
             [EVAL < bEval >]         ;
             [PRE,PRETEXT < bcPreHtml >] ;
             [POST,POSTTEXT < bcPostHtml >] ;
             [TITLE < cTitle >]       ;
             [ID < cId >]             ;
             [GROUP < cGroup >]       ;
   

Arguments:

   < nRow > and < nCol > are the row number and column number of
   the table if the parent of this object is a DCTABLE. The
   text will be inserted in the cell of the table defined by
   the row/column.
   
   ENCTYPE < cEncType > is the encoding type of the data submitted.
   The default is "application/x-www-form-urlencoded". An
   alternate type is "multipart/form-data".
   
   ACTION < cAction > is the URL of the application that receives
   and processes the form data.
   
   METHOD < cMethod > is the method for sending the data to the
   application server.  The valid options are "GET" and "POST".
   For small forms with few variables use "GET".  For large
   forms with many variables use "POST".
   
   TARGET < cTarget > is the name of the window or frame which will
   receive the posted data.
   
   OBJECT < oForm > is the name of the variable to assign as a
   storage place for this object.
   
   PARENT < oParent > is the name of the variable that was
   assigned to the parent of this object. If this argument
   is not passed then the parent will be the object set with
   the DCSETPARENT command.
   
   PARENTID < cParentID > may be used in lieu of the PARENT < oParent >
   clause.  This identifies the ID of the parent instead of the
   parent's object variable name.
   
   CARGO < xCargo > is any kind of data you wish to to add to the
   :cargo container of object created by this definition.
   
   PRE,PRETEXT < bcPreHTML > is a character string or a code block
   that returns a character string containing any HTML text
   that will precede the opening < table > tag in the source
   that is written.
   
   POST,POSTTEXT < bcPostHTML > is a character string or a code block
   that returns a character string containing any HTML text
   that will follow the closing < /table > tag in the source
   that is written.
   
   HIDE < bHide > is a code block that is evaluated at the
   time the :writeHtml() method is called for the class that
   supports this command.  If the code block returns a .TRUE.,
   then no HTML code will be written.
   
   EVAL < bEval > is a code block that is evaluated after the
   object is created in DC_ReadHtml().  A pointer to the
   object associated with this command is passed as an
   argument to the code block.
   
   ID < cId > is a unique identifier for this object.  This ID is used
   with functions like DC_GETOBJECT() to determine the status
   of a get object.
   
   TITLE < cTitle > is a title to assign to this object.  The title
   is not used in the HTML output but is simply a description of the
   get object which is saved in the GetList.
   
   GROUP < cGroup > is a "group" name (case-sensitive) to assign to
   this GetList object.  Assignment to a group makes it possible to
   perform operations only on GetList items which are members of a
   specified group.
   

Description:

   DCFORM is a command for creating HTML form elements.
   
   The command DCFORM creates an HTML element definition and
   adds the definition to the array named GETLIST which is later
   processed by the DC_READHTML() function or by the DCREAD HTML
   command.  The GETLIST array must be first declared and
   initialized to the value of {}.  The command DCREAD HTML
   creates all the DC_Html*() objects from the GetList array
   and then invokes the :writeHtml() method of the topmost
   parent object to generate the HTML code.
   
   A Getlist object remains stored as long as it is referenced
   in an array or by a variable.  The commands CLEAR and
   CLEAR GETS assign an empty array to the GetList variable.
   This also occurs after the completion of the DCREAD command
   if it is called without the SAVE option, causing all
   objects referenced by the GetList array to be released.
   

Notes:

   DCFORM creates an object of the DC_HtmlForm() class.
   

Examples:

   #include "dcdialog.ch"
   #include "dchtml.ch"
   
   FUNCTION Xtest()
   
   LOCAL i, GetList[0], oForm, cHtml, oTable, cComment1, cComment2
   
   DCFORM OBJECT oForm METHOD "POST" ;
     ACTION "http://donnay-software.com:8083"
   
   DCTABLE OBJECT oTable PARENT oForm ROWS 2 COLUMNS 1 WIDTH '200'
   
   cComment1 := 'This is memo 1'
   cComment2 := 'This is memo 2'
   
   @ 1,1 DCMULTILINE cComment1 PARENT oTable SIZE 30,10 NAME 'Memo1'
   @ 2,1 DCMULTILINE cComment2 PARENT oTable SIZE 30,10 NAME 'Memo2'
   
   DCREAD HTML TO cHtml
   
   MemoWrit('TEST.HTM',cHtml)
   
   RETURN cHtml
   

Source/Library:

  DCHTML.PRG

See Also:

   DCREAD HTML
   dc_htmlform()
   dc_readhtml()



DCFRAME

A command for creating FRAME tags in HTML

Syntax:

   DCFRAME                                                           ;
         [OBJECT < oObject >]           ;
         [PARENT < oParent >]           ;
         [PARENTID < cPID >]            ;
         [NAME < cName >]               ;
         [MARGINHEIGHT < nMarginHeight >]  ;
         [MARGINWIDTH < nMarginWidth >]    ;
         [NORESIZE]                   ;
         [NOSCROLL]                   ;
         [SRC,SOURCE < src >]           ;
         [FRAMEBORDER < nFrameBorder >] ;
         [BORDERCOLOR < cBorderColor >] ;
         [CARGO < xCargo >]             ;
         [HIDE < bHide >]               ;
         [EVAL < bEval >]               ;
         [PRE,PRETEXT < bcPreText >]    ;
         [POST,POSTTEXT < bcPostText >] ;
         [TITLE < cTitle >]             ;
         [ID < cId >]                   ;
         [GROUP < cGroup >]             ;
   

Arguments:

   NAME < cName > labels the frame for later reference by the
   "target" attribute of other HTML elements.
   
   SRC < src > is the URL of the document that is to be
   displayed in the frame.  There is no other way to provide
   content for a frame.
   
   MARGINHEIGHT < nMarginHeight > and MARGINWIDTH < nMarginWidth >
   are used to put space (in pixels) between the edge of the
   frame and its contents.
   
   NORESIZE freezes the relative proportions of the frame
   so it may not be resized.
   
   NOSCROLL suppresses vertical and horizontal scrollbars
   with frames whose contents exceed the allotted window
   space.
   
   FRAMEBORDER < nFrameBorder > is used to determine whether
   or not there is a frame border.  A value of 1 turns on
   the border.  A value of 0 turns off the border.
   
   BORDERCOLOR < cBorderColor > is the color of the frame border.
   Color may be an RGB color value (#XXXXXX) , a standard color
   name, an RGB 3-element array or a numeric value defined in
   GRA.CH.
   
   OBJECT < oLink > is the name of the variable to assign as a
   storage place for this object.
   
   PARENT < oParent > is the name of the variable that was
   assigned to the parent of this object. If this argument
   is not passed then the parent will be the object set with
   the DCSETPARENT command.
   
   PARENTID < cParentID > may be used in lieu of the PARENT < oParent >
   clause.  This identifies the ID of the parent instead of the
   parent's object variable name.
   
   CARGO < xCargo > is any kind of data you wish to to add to the
   :cargo container of object created by this definition.
   
   PRE,PRETEXT < bcPreHTML > is a character string or a code block
   that returns a character string containing any HTML text
   that will precede the opening < table > tag in the source
   that is written.
   
   POST,POSTTEXT < bcPostHTML > is a character string or a code block
   that returns a character string containing any HTML text
   that will follow the closing < /table > tag in the source
   that is written.
   
   HIDE < bHide > is a code block that is evaluated at the
   time the :writeHtml() method is called for the class that
   supports this command.  If the code block returns a .TRUE.,
   then no HTML code will be written.
   
   EVAL < bEval > is a code block that is evaluated after the
   object is created in DC_ReadHtml().  A pointer to the
   object associated with this command is passed as an
   argument to the code block.
   
   ID < cId > is a unique identifier for this object.  This ID is used
   with functions like DC_GETOBJECT() to determine the status
   of a get object.
   
   TITLE < cTitle > is a title to assign to this object.  The title
   is not used in the HTML output but is simply a description of the
   get object which is saved in the GetList.
   
   GROUP < cGroup > is a "group" name (case-sensitive) to assign to
   this GetList object.  Assignment to a group makes it possible to
   perform operations only on GetList items which are members of a
   specified group.
   

Description:

    The command DCFRAME creates an HTML FRAME definition and
    adds the definition to the array named GETLIST which is later
    processed by the DC_READHTML() function or by the DCREAD HTML
    command.  The GETLIST array must be first declared and
    initialized to the value of {}.  The command DCREAD HTML
    creates all the DC_Html*() objects from the GetList array
    and then invokes the :writeHtml() method of the topmost
    parent object to generate the HTML code.
   
    A Getlist object remains stored as long as it is referenced
    in an array or by a variable.  The commands CLEAR and
    CLEAR GETS assign an empty array to the GetList variable.
    This also occurs after the completion of the DCREAD command
    if it is called without the SAVE option, causing all
    objects referenced by the GetList array to be released.
   

Notes:

   DCFRAME creates an object of the DC_HtmlFrame() class.
   

Examples:

   #include "dcdialog.ch"
   #include "dchtml.ch"
   
   FUNCTION Xtest()
   
   LOCAL i, GetList[0], cHtml, oFrameSet
   
   DCFRAMESET OBJECT oFrameSet ;
         ROWS '60%,*'
   
   DCFRAME ;
        PARENT  oFrameSet ;
        NAME 'donnay' ;
        SRC 'http://donnay-software.com'
   
   DCFRAME ;
        PARENT oFrameSet ;
        FRAMEBORDER 0 ;
        NAME 'google' ;
        SRC 'http://www.google.com'
   
   DCREAD HTML TO cHtml
   
   MemoWrit('TEST.HTM',cHtml)
   
   RETURN cHtml
   

Source/Library:

  DCHTML.CH

See Also:

   DCREAD HTML
   dc_html()
   dc_readhtml()
   dc_htmlframe()



DCFRAMESET

A command for creating FRAMESET tags in HTML

Syntax:

   DCFRAMESET                    ;
         [OBJECT < oObject >]      ;
         [ROWS < nRows >]          ;
         [COLS,COLUMNS < nCols >]  ;
         [NAME < cName >]          ;
         [FRAMEBORDER < nFrameBorder >] ;
         [BORDER < nBorder >]      ;
         [BORDERCOLOR < cBorderColor >] ;
         [PARENT < oParent >]      ;
         [PARENTID < cPID >]       ;
         [CARGO < xCargo >]        ;
         [HIDE < bHide >]          ;
         [EVAL < bEval >]          ;
         [PRE,PRETEXT]           ;
         [POST,POSTTEXT >]        ;
         [TITLE < cTitle >]        ;
         [ID < cId >]              ;
         [GROUP < cGroup >]        ;
   

Arguments:

   COLS,COLUMNS < columns > and ROWS < rows > defines the number of
   columns and rows of either frames or nested framesets.
   Both attributes accept a quote-enclosed, comman-separated
   list of values that specify either the absolute or relative
   width (for columns) or height (for rows) for the frames.
   The number of attribute valuess determines how many rows or
   columns of frames will display in the document window.
   
   Express each value in the < rows > or < columns > attribute
   in one of three ways:
   
   1. As absolute number of pixels.
   2. As a percentage of the total width or height of the
   frameset.
   3. As a portion of the space remaining after setting aside
   room for adacent elements.
   
   Examples:< rows > = "150,300,150"
   < rows > = "25%,50%,25%"
   < columns > = "100,*"
   < columns > = "10,*,10"
   < rows > = "*,100,*"
   
   NAME < cName > is the name to assign to the frameset.
   
   FRAMEBORDER < nFrameBorder > is used to determine whether
   or not there is a frame border.  A value of 1 turns on the
   border.  A value of 0 turns off the border.
   
   BORDER < nBorder > is the width of the frame border in pixels.
   
   BORDERCOLOR < cBorderColor > is the color of the frame border.
   Color may be an RGB color value (#XXXXXX) , a standard color
   name, an RGB 3-element array or a numeric value defined in
   GRA.CH.
   
   OBJECT < oLink > is the name of the variable to assign as a
   storage place for this object.
   
   PARENT < oParent > is the name of the variable that was
   assigned to the parent of this object. If this argument
   is not passed then the parent will be the object set with
   the DCSETPARENT command.
   
   PARENTID < cParentID > may be used in lieu of the PARENT < oParent >
   clause.  This identifies the ID of the parent instead of the
   parent's object variable name.
   
   CARGO < xCargo > is any kind of data you wish to to add to the
   :cargo container of object created by this definition.
   
   PRE,PRETEXT < bcPreHTML > is a character string or a code block
   that returns a character string containing any HTML text
   that will precede the opening < table > tag in the source
   that is written.
   
   POST,POSTTEXT < bcPostHTML > is a character string or a code block
   that returns a character string containing any HTML text
   that will follow the closing < /table > tag in the source
   that is written.
   
   HIDE < bHide > is a code block that is evaluated at the
   time the :writeHtml() method is called for the class that
   supports this command.  If the code block returns a .TRUE.,
   then no HTML code will be written.
   
   EVAL < bEval > is a code block that is evaluated after the
   object is created in DC_ReadHtml().  A pointer to the
   object associated with this command is passed as an
   argument to the code block.
   
   ID < cId > is a unique identifier for this object.  This ID is used
   with functions like DC_GETOBJECT() to determine the status
   of a get object.
   
   TITLE < cTitle > is a title to assign to this object.  The title
   is not used in the HTML output but is simply a description of the
   get object which is saved in the GetList.
   
   GROUP < cGroup > is a "group" name (case-sensitive) to assign to
   this GetList object.  Assignment to a group makes it possible to
   perform operations only on GetList items which are members of a
   specified group.
   

Description:

    The command DCFRAMESET creates an HTML FRAMESET definition and
    adds the definition to the array named GETLIST which is later
    processed by the DC_READHTML() function or by the DCREAD HTML
    command.  The GETLIST array must be first declared and
    initialized to the value of {}.  The command DCREAD HTML
    creates all the DC_Html*() objects from the GetList array
    and then invokes the :writeHtml() method of the topmost
    parent object to generate the HTML code.
   
    A Getlist object remains stored as long as it is referenced
    in an array or by a variable.  The commands CLEAR and
    CLEAR GETS assign an empty array to the GetList variable.
    This also occurs after the completion of the DCREAD command
    if it is called without the SAVE option, causing all
    objects referenced by the GetList array to be released.
   

Notes:

   DCFRAMESET creates an object of the DC_HtmlFrameSet()
   class.
   

Examples:

   #include "dcdialog.ch"
   #include "dchtml.ch"
   
   FUNCTION Xtest()
   
   LOCAL i, GetList[0], cHtml, oFrameSet
   
   DCFRAMESET OBJECT oFrameSet ;
         ROWS '60%,*'
   
   DCFRAME ;
        PARENT  oFrameSet ;
        NAME 'donnay' ;
        SRC 'http://donnay-software.com'
   
   DCFRAME ;
        PARENT oFrameSet ;
        FRAMEBORDER 0 ;
        NAME 'google' ;
        SRC 'http://www.google.com'
   
   DCREAD HTML TO cHtml
   
   MemoWrit('TEST.HTM',cHtml)
   
   RETURN cHtml
   

Source/Library:

  DCHTML.CH

See Also:

   DCREAD HTML
   dc_readhtml()
   dc_htmlframeset()
   dc_htmlframe()



DCGETOPTIONS

Set the options for the Dialog Reader

Syntax:

   DCGETOPTIONS ;
       [NAME < cName >] ;
       [TITLE < cTitle >] ;
       [WINDOWHEIGHT < nWndHeight >] ;
       [WINDOWWIDTH < nWndWidth >] ;
       [ROWSPACE < nRowSpace >] ;
       [FONT < cFont >] ;
       [SAYFONT < cSayFont >] ;
       [SAYWIDTH < nSayWidth >] ;
       [SAYHEIGHT < nSayHeight >] ;
       [GETHEIGHT < nGetHeight >] ;
       [GETFONT < cGetFont >] ;
       [WINDOWROW < nWindowRow >] ;
       [WINDOWCOL < nWindowCol >] ;
       [ROWOFFSET < nRowOffset >] ;
       [COLOFFSET < nColOffset >] ;
       [MENU < acMenu > [MSGBOX < oMsgBox >]] ;
       [PIXEL] ;
       [BUTTONS < aButtons >] ;
       [ICON < nIcon >] ;
       [CHECKGET] ;
       [HELPFILE,HELPBLOCK < bcHelp >] ;
       [HELPCODE < cHelpCode >] ;
       [VISIBLE] ;
       [NOTRANSLATE] ;
       [SAYRIGHT] ;
       [BITMAP < nBitMap >] ;
       [PRESENTATION < aPres >] ;
       [SAYOPTIONS < nSayOpt >] ;
       [COLOR < anBGColor >] ;
       [NOMINBUTTON] ;
       [NOMAXBUTTON] ;
       [TABSTOP] ;
       [ABORTQUERY [MSG < bAbortQuery >]] ;
       [CLOSEQUERY [MSG < bCloseQuery >]] ;
       [EXITQUERY [MSG < bExitQuery >]] ;
       [QUITQUERY [MSG < bQuitQuery >]] ;
       [ROWPIXELS < nRowPixels >] ;
       [COLPIXELS < nColPixels >] ;
       [NOESCAPEKEY] ;
       [DESIGN [HOTKEY < nDesignHotKey >]];
       [SOURCECODE < cSource >] ;
       [TOOLTIPCOLOR < nTTFg >, < nTTBg >] ;
       [BORDER < nBorder >] ;
       [EXITVALIDATE] ;
       [NOTASKLIST] ;
       [MINSIZE < nMinWidth >, < nMinHeight >] ;
       [MAXSIZE < nMaxWidth >, < nMaxHeight >] ;
       [NORESIZE] ;
       [NOTITLEBAR] ;
       [NOMOVEWITHOWNER] ;
       [ORIGIN < nOrigin >] ;
       [HILITEGETS < nColor >] ;
       [COLORGETS < aColors >] ;
       [NOSUPERVISE] ;
       [HIDE] ;
       [NOBUSYPOINTER] ;
       [BUSY < cBusyMsg > ] ;
       [CASCADE] ;
       [AUTORESIZE] ;
       [CONFIRM] ;
       [NOCONFIRM] ;
       [FITPAD < nFitPad >] ;
       [BUTTONALIGN < nButtonAlign >] ;
       [DISABLEDCOLOR < anDisabledColor >] ;
       [PREEVAL < bPreEval > ] ;
       [EVAL < bEval >] ;
       [EDITPROTECT < bProtect >] ;
       [MESSAGEINTO < obMsgBox >] ;
       [AUTOWINDOWMENU] ;
       [NOWINDOWMENU] ;
       [KEYBOARD < cKeyString >] ;
       [NOEDITNAVKEYS < bNoEditNavKeys >]
   

Arguments:

   The Dialog Options List is simply a single-dimensionsal array
   of 60+ elements.  eXPress++ Dialog options are included in
   DCDIALOG.CH.  Before using the DCGETOPTIONS command you should
   declare the GetOptions array variable like so:
   
   LOCAL GetOptions
   
   The elements of the options array are defined as follows:
   
   NAME < cName > is the name of the Dialog screen or application.
   It must be all Upper Case characters no longer than characters
   in length.  It is a unique name assigned to the dialog for saving
   to the dCLIP++ DIALOG dictionary database.
   
   TITLE < cTitle > is the title or description of the dialog.
   
   WINDOWHEIGHT < nWndHeight > is the dialog window height in
   pixels.
   
   WINDOWWIDTH < nWndWidth > is the dialog window width in pixels.
   
   ROWSPACE < nRowSpace > is the number of pixels between rows when
   using text-based coordinates in the Getlist.  The default is 20.
   This parameter does NOT affect font height.
   
   SAYWIDTH < nSayWidth > is the default width for DCSAY objects if
   the SAYSIZE parameter is not used with the DCSAY command.
   SAYWIDTH 0 will cause all DCSAY objects (XbpStatic) to be
   automatically sized to the size of the text taking into
   consideration the selected font.
   
   SAYHEIGHT < nSayHeight > is the default HEIGHT (in pixels) of the
   SAY in DCGET and @..DCSAY..GET commands.  If this parameter is not
   specified then the default height is 20.
   
   FONT < cFont > is the default FONT for all child objects of the
   dialog window.
   
   SAYFONT < cSayFont > is the default FONT for DCSAY objects if the
   FONT parameter is not used with the DCSAY command.  If this
   parameter is not specified then the DCSAY object uses the font of
   the parent.
   
   GETFONT < cGetFont > is the default FONT for DCGET and
   @..DCSAY..GET objects if the FONT parameter is not used with the
   DCGET or @..DCSAY..GET commands.  If this parameter is not
   specified, then the object uses the font of the parent.
   
   GETHEIGHT < nGetHeight > is the default HEIGHT (in pixels) of the
   GET in DCGET and @..DCSAY..GET commands.  If this parameter is not
   specified then the default height is 20.
   
   BUTTONS < aButtons > is an optional multi-dimensional array of
   buttons to add to the bottom of the dialog box.  Each button will
   be added in sequence from left to right.  Each sub-array is an
   array of 5 elements defining the buttons.
   
    Element      Type       Description
    -------      ----       ------------------------------------
       1          C         Button Caption
       2          N         Button Width (in pixels) Default is 60
       3          N         Button Height (in pixels) Default is 22
       4          B         Action Code Block
       5          X         Button Cargo
   
    NOTE: The BUTTONS array can be used to add custom buttons in
          addition to the buttons provided by DCREAD GUI BUTTONS
          @..DCPUSHBUTTON.
   
   WINDOWROW < nWndRow > is the starting row of the dialog window
   (in pixels).  If this argument is nt specified, then the dialog
   will be centered vertically in the parent.
   
   WINDOWCOL < nWndCol > is the starting column of the dialog window
   (in pixels).  If this argument is not specified, then the dialog
   will be centered horizontally in the parent.
   
   ROWOFFSET < nRowOffset > is the row offset (in pixels) to add to
   each dialog object.  The default is 0.
   
   COLOFFSET < nColOffset > is the column offset (in pixels) to add
   to each dialog object.  The default is 0.
   
   MENU < acMenu > is a multi-dimensional array containing an optional
   menu to attach to the top of the dialog window.  The menu must
   conform to the specifications of menus returned by the menu
   dictionary system.  This may also be a character string of up to
   8 characters containing the NAME of the menu.  See DC_MenuLoad().
   MSGBOX < oMsgBox > is the message box object which will receive
   PROMPT messages from the menu when the user navigates throug the
   menu.
   
   The PIXEL argument forces all coordinates in the Getlist to be
   based on pixels, otherwise they are text-based coordinates.
   
   BITMAP < nBitmap > is the resource ID of a Bitmap that is linked
   into the .EXE.  This bitmap will be sized to fill the main dialog
   window.
   
   COLOR < anBGColor > is the color to use as the background for the
   dialog window.  If < anBGColor > is a numeric value, then it must
   be a GRA_CLR_* (defined in GRA.CH).  If < anBGColor > is an array,
   it must contain three numeric values (R,G and B respectively).
   
   PRESENTATION < aPres > is a two-dimensional array. If specified,
   this contains presentation parameters for the Dialog window.
   The first column of the array must contain #define constants
   from the XBP.CH file starting with the prefix XBP_PP_. These
   constants define the presentation parameters that can be set
   for the object and include colors and fonts. The second column
   of the array in < aPres > contains the value for each setting.
   These are also generally set using #define constants from the
   GRA.CH file.
   
   SAYOPTIONS < nSayOpt > is a set of text alignment options.
   Objects created by the @..DCSAY command can be given a set of
   options which are used to align the text within the rectangular
   area of the say (XbpStatic) object. Constants defined in the
   XBP.CH file are used for these options. These constants are
   listed in the table below. If combinations of alignment options
   are required, the sum of the appropriate constants must are
   assigned to the instance variable :options .
   
    #define constants for aligning text
   
    Constant                  Description
   
    XBPSTATIC_TEXT_LEFT       Text is left aligned
    XBPSTATIC_TEXT_CENTER     Text is horizontally centered
    XBPSTATIC_TEXT_RIGHT      Text is right aligned
    XBPSTATIC_TEXT_TOP        Text is displayed at top
    XBPSTATIC_TEXT_VCENTER    Text is vertically centered
    XBPSTATIC_TEXT_BOTTOM     Text is displayed at bottom
   
    An alternate method of aligning text is by using the following
    defines in place of SAYOPTIONS < nSayOpt >:
   
     SAYRIGHT
     SAYLEFT
     SAYRIGHTBOTTOM
     SAYLEFTBOTTOM
     SAYRIGHTCENTER
     SAYLEFTCENTER
     SAYRIGHTTOP
     SAYLEFTTOP
     SAYCENTER
     SAYBOTTOM
     SAYTOP
   
   PREEVAL < bPreEval > is a code block that is evaluated before the
   main dialog window (XbpDialog) is created.
   
   EVAL < bEval > is a code block that is evaluated after the main
   dialog window (XbpDialog) is created.  This code block is
   evaluated before any items from the GetList are created and
   added to the Dialog.  The Dialog object is passed to the code
   block.
   
   ICON < nIcon > is the resource ID of the ICON to place in the upper
   left corner of the dialog window.
   
   The CHECKGET argument causes all DCGET or @..DCSAY..GET objects
   which GET a logical value to be displayed as a CheckBox rather
   than a normal GET.
   
   HELPFILE, HELPBLOCK < bcHelp > is the name of a *.HLP help file
   or a code block to activate when the user clicks on the HELP
   button on the bottom of the dialog window.  If < bcHelp > is a
   file name then the HELPCODE associated with the object in focus
   when the F1 key is pressed will be passed to the Windows Help
   reader.  If < bcHelp > is a code block, the HELPCODE associated
   with the object in focus with the F1 key is pressed will be
   passed to the function referenced in the code block.
   
   HELPCODE < cHelpCode > is the "default" help link to invoke in the
   help file established by HELPFILE < bcHelp > when the F1 key is
   pressed.  Any specific HELPCODE assigned to DC* commands will
   override this help link if the F1 key is pressed when the
   specific object has focus.
   
   The VISIBLE argument will cause dialog objects in the GetList to
   be displayed when they are created, otherwise the entire dialog
   will not be displayed until all objects are created.
   
   The default translation mode assumes that all coordinates in the
   GetList are based on 0,0 being the upper left home position of the
   display or parent object.  It is also assumed that coordinates are
   text-based unless individually specified as pixel-based by the
   PIXEL argument.   This will also insure that RELATIVE coordinates
   are based on the coordinates of the relative objects specified in
   the Getlist.  If the NOTRANLATE argument is specified, then
   NO TRANLATIONS will occur when the objects are displayed by the
   GUI reader and all coordinates are assumed to be based on 0,0
   being the lower left home position of the display or parent object
   and are all pixel-based.  After the GUI reader translates the
   coordinates, it writes the translated coordinates back to the
   Getlist and automatically sets this flag to .FALSE. so that
   successive calls to the GUI reader with the translated Getlist
   will not cause anomolies when displaying the objects.
   
   The SAYRIGHT argument causes all GETLIST_SAY type objects in the
   Getlist to be displayed with text right-justified, unless that
   object specificies LEFT or CENTER justification via the
   aGETLIST_OPTIONS element of the Getlist item.
   
   NOMINBUTTON will suppress the painting of a minimize button on
   the dialog window.
   
   NOMAXBUTTON will suppress the painting of a maximize button on
   the dialog window.
   
   TABSTOP will cause all objects (Xbase Parts) to be set when using
   the Tab key. The default for TabStop is .False. or OFF.  The
   TabStop setting for individual objects can be force to ON or OFF
   by using the TABSTOP or NOTABSTOP commands respectively in each
   command to override the default setting.
   
   ROWPIXELS is the amount of pixels that equate to a row when using
   text-based coordinates.  The default is 20.
   
   COLPIXELS is the amount of pixels that equate to a column when
   using text-based coordinates.  The default is 7.0.
   
   When using text-based coordinates (default), the coordinates must
   be converted to pixels because this is all that the Xbase parts
   classes understand.  For example, the command @ 10,30 DCSAY 'Test'
   will place the word 'Test' at row 200, column 210 (in pixels).
   Using text-based coordinates can give an advantage over pixel-
   based because the COLPIXELS and ROWPIXELS clauses can be used in
   conjunction with the SAYFONT and GETFONT clauses to automatically
   adjust the screen to fix the desktop at runtime.  See XDEMO.PRG
   for a complete example.
   
   ABORTQUERY will cause a Message Box to appear Confirming the
   cancelling of operation when the Cancel button is clicked or the
   ESCape key is pressed.  The optional clause MSG < bAbortQuery > is
   a code block to evaluate.  If this code block is used, it must
   return a logical value of .TRUE. to abort the dialog and must
   contain it's own message window (if required)
   
   CLOSEQUERY will cause a Message Box to appear Confirming the
   cancelling of operation when the dialog window is close by
   clicking on the X in the upper right corner or double clicking
   the icon in the upper left corner.  The optional clause
   MSG < bCloseQuery > is a code block to evaluate. If this code block
   is used, it must return a logical value of .TRUE. to close the
   dialog window and must contain it's own message window (if
   required)
   
   EXITQUERY will cause a Message Box to appear Confirming the
   dialog exit when the OK or Exit button is clicked or an attempt
   is made to exit with the ENTER key when using the ENTEREXIT
   clause.  The optional clause MSG < bExitQuery > is a code block
   to evaluate.  If this code block is used, it must return a
   logical value of .TRUE. to exit the dialog and must contain it's
   own message window (if required)
   
   QUITQUERY will cause a Message Box to appear Confirming the
   dialog exit when the user attempts to shut down the operating
   system.  The optional clause MSG < bQuitQuery > is a code block
   to evaluate.  If this code block is used, it must return a
   numeric value of XBP_ALLOW (defined in XBP.CH) to exit the dialog
   and must contain it's own message window (if required).  To
   prevent the computer from shutting down if must return a numeric
   value of XBP_REJECT.
   
   NOESCAPEKEY will disable the ESCape key.  Normally, the ESCape
   key will close the dialog window and cancel operation.
   
   DESIGN HOTKEY < nDesignHotKey > is the hot key that will invoke the
   "design" mode.  In this mode, objects may be moved or resized and
   the new coordinates saved to the original source code.  Keys are
   defined in APPEVENT.CH. Ex: DESIGN HOTKEY xbeK_ALT_D.
   
   SOURCECODE < cSource > is the name of the source code (*.PRG) file
   that contains the DC* commands which created the dialog GetList.
   This is needed when using the pop-up Dialog Editor in DESIGN mode.
   Changes made to a dialog are re-written to the source code file
   only if the command is identified by an ID, GETID or SAYID clause.
   NOTE: To insure that the source code is found by the application,
         include the full path.
   
   TOOLTIPCOLOR < nTTFg >, < nTTBg > is the foreground color and
   background color, respectively, of tooltips when using the
   TOOLTIP clause on eXPress++ commands.  The default colors are
   GRA_CLR_BLACK and GRA_CLR_WHITE.
   
   BORDER < nBorder > defines the border type of the dialog window.
   Constants defined in the XBP.CH file can be assigned to < nBorder >.
   The following table shows the valid #define constants.
   
    Constant                            Description
   
    XBPDLG_NO_BORDER                    No border
    XBPDLG_SIZEBORDER                   Window is sizeable
    XBPDLG_THINBORDER               *)  Thin border, window size
                                        cannot be changed
    XBPDLG_DLGBORDER                    Thick border, window size
                                        cannot be changed
    XBPDLG_RAISEDBORDERTHICK       **)  Thick, raised border
   
    XBPDLG_RAISEDBORDERTHIN         *)  Thin, raised border
    XBPDLG_RECESSEDBORDERTHICK          Thick, recessed border
    XBPDLG_RECESSEDBORDERTHIN       *)  Thin, recessed border
    XBPDLG_RAISEDBORDERTHICK_FIXED      Thick, raised border,
                                        size cannot be changed
    XBPDLG_RAISEDBORDERTHIN_FIXED   *)  Thin, raised border,
                                        size cannot be changed
   
    XBPDLG_RECESSEDBORDERTHICK_FIXED    Thick, recessed border,
                                        size cannot be changed
    XBPDLG_RECESSEDBORDERTHIN_FIXED *)  Thin, recessed border,
                                        size cannot be changed
   
   *) not supported by Windows    **) Default border
   
   If a dialog is embedded as MDI client within another dialog,
   Windows ignores all border styles except XBPDLG_RAISEDBORDERTHICK
   and XBPDLG_RECESSDBORDERTHICK. In all other cases, a border is
   displayed for MDI clients that corresponds to
   XBPDLG_RAISEDBORDERTHICK.
   
   EXITVALIDATE will traverse the GetList when the user clicks on
   the OK button and test all validations.  If any validation fails,
   the failed object will receive input focus and the dialog will
   remain active.
   
   NOTASKLIST will insure that the dialog window is not placed on
   the Windows task bar.
   
   MINSIZE < nMinWidth >, < nMinHeight >  is used to establish the
   minimum size of the dialog window, in pixels,  if the operator
   attempts to resize the window.  A value of -1 will set the height
   or width to the height or width that was automatically set by the
   FIT clause of DCREAD GUI.
   
   MAXSIZE < nMaxWidth >, < nMaxHeight > is used to establish the
   maximum size of tyhe dialog window, in pixels,  if the operator
   attempts to resize the window. A value of -1 will set the height
   or width to the height or width that was automatically set by the
   FIT clause of DCREAD GUI.
   
   NORESIZE will prevent the operator from resizing the dialog
   window.
   
   NOTITLEBAR will prevent a titlebar from displaying on the
   dialog window.  This will also prevent the minimize, maximize,
   and close buttons from appearing.
   
   NOMOVEWITHOWNER will prevent the dialog window from automatically
   moving when it's owner is moved.
   
   ORIGIN < nOrigin > defines the reference point for the position of
   the dialog window. The value of < nOrigin > must be a #define
   constant from the file XBP.CH. The available constants are listed
   in the following table:
   
    Constants for the origin of a dialog window
   
    Constant                 Description
   
    XBPDLG_ORIGIN_OWNER  *)  Origin is point {0,0} of the owner window
    XBPDLG_ORIGIN_SCREEN     Origin is point {0,0} of the desktop window
    XBPDLG_ORIGIN_MOUSE      Origin is the current mouse position
   
     *) Default value
   
   
   HILITEGETS < nColor > will draw a box around the currently selected
   GET.  The color of the box is defined by < nColor > and must be
   a GRA_CLR_* color defined in GRA.CH.  This clause highlights only
   the GET portion of @.DCSAY..GET commands and DCGET commands.
   NOTE: An anomoly in the XbpTabPage class causes this feature to
   mess up the look of Tab Pages.  To prevent this problem it is
   recommended that the Gets be first placed on a DCSTATIC object
   which is in turn placed on the DCTABPAGE object.
   
   COLORGETS < aColor > is used to establish an array of foreground
   and background colors for determining the color of the GET portion
   of @..DCSAY..GET and DCGET commands when the get is placed into
   focus.  < aColor > is a two-dimensional array consisting of two
   sub-array of 2 elements.  The first array contains the foreground
   and background colors of the GET when it is selected.  The second
   array contains the foreground and background color of the GET
   when it is unselected.  If the second array is not used, then the
   unselected color is GRA_CLR_BLACK on GRA_CLR_WHITE.  The color
   definitions must conform to GRA_CLR_* definitions in GRA.CH.
   
    Example 1: COLORGETS { { GRA_CLR_WHITE, GRA_CLR_RED } }
    This will paint selected Gets White on Red, unselected Gets
    Black on White (default).
   
    Example 2: COLORGETS { { GRA_CLR_WHITE, GRA_CLR_RED }, '
                           { GRA_CLR_WHITE, GRA_CLR_BLUE } }
    This will paint selected Gets White on Red, unselected Gets
    White on Blue.
   
   
   NOSUPERVISE will cause the ENTER key to move from the last get
   of a group of gets to the first get of the next group of gets.
   Normal behavior is for the movement from the last get to the
   first get of a group of gets that all have the same parent.
   For example, if there are gets on 3 different tab pages, and
   the user is in the last get of TabPage 1, and ENTER will cause
   the first get on TabPage  2 to acquire focus.
   
   HIDE will hide the dialog window from view for later viewing
   with the oDlg:show() method.
   
   NOBUSYPOINTER will disable the busy hourglass mouse pointer
   that displays by default when DC_ReadGui() is creating the
   dialog objects.
   
   BUSY < cBusyMsg > is a message to display in a progress window
   when DC_ReadGui() is creating the dialog objects.
   
   CASCADE will set the coordinates of the dialog window to an
   offset from a sibling window that has the lowest coordinates.
   This provides for cascading of dialog windows.  If there are
   no siblings (windows belonging to the same parent), this
   argument will be ignored.
   
   AUTORESIZE is used to automatically resize and reposition all
   child objects so they use the real estate of the parent dialog
   in the same proportions as the child objects before the parent
   was resized.  The complete childlist tree is resized.  If it
   is desired to NOT resize ToolBars and Pushbuttons, then the
   :resize callback of the dialog object must be overwritten
   rather than using the AUTORESIZE clause as shown:
   
    bReSize :=  {|a,b,o,x|x := SetAppFocus(), ;
                               o:drawingArea:hide(), ;
                               DC_AutoReSize(a,b,o,GetList,.f.), ;
                               o:drawingArea:show(), ;
                               SetAppFocus(x) }
   
    DCREAD GUI .. EVAL {|o| o:resize := bReSize }
   
   CAUTION: Do not use DCGRA* commands with the AUTORESIZE clause
            of clause of DCGETOPTIONS, unless the DCGRA* object is
            drawn on an object that does not get resized or
            repositioned at a later time. Auto-Sizing and Auto-
            Fitting is accomplished by traversing child list of
            the Parent object and reading the size and/or
            coordinates of all objects.  DCGRA*  commands are not
            objects, therefore they cannot be repositioned
            correctly.
   
   CONFIRM causes all @..DCSAY..GETs and @..DCGETs to require that
   the ENTER key be pressed to move to the next GET.
   
   NOCONFIRM causes all @..DCSAY..GETs and @..DCGETs to move to the
   next GET when the edit buffer is filled and a key is pressed in
   the last position.
   
   FITPAD < nFitPad > is the amount of pixels to use pad with dead
   space around all objects when using the FIT clause of DCREAD GUI.
   The default is 10.
   
   BUTTONALIGN < nButtonAlign > is a numeric constant used to select
   the method in which buttons should be aligned at the bottom of
   the dialog window when using the ADDBUTTONS clause or the
   BUTTONS < nButtons > clause of DCREAD GUI.  The constants are
   defined in DCDIALOG.CH.  See the below table.
   
     Align Constant               Description
     ------------------------     -------------------------------
     DCGUI_BUTTONALIGN_LEFT  (*)  Align buttons to the left
     DCGUI_BUTTONALIGN_CENTER     Align buttons in the center
     DCGUI_BUTTONALIGN_RIGHT      Align buttons to the right
   
   DISABLEDCOLOR < anDisabledColor > is a numeric constant or a
   3-element array that is used to establish the background color
   of objects that are disabled by the WHEN clause of DC* commands.
   If < anDisabledColor > is a numeric value it must conform to the
   GRA_CLR_* constants defined in GRA.CH.  If < anDisabledColor > is
   an array, it must be 3 elements of numeric values in the range
   of 0 - 255 to create an RGB color value.
   
   NOTRANSLATE will assume that coordinates are based on the
   standard Xbase Parts coordinate system where the home position
   is the lower left corner, otherwise all coordinates will be
   translated for compatability with text-based applications and
   other Windows applications with the home position as the upper
   left corner.
   
   EDITPROTECT < bProtect > is a code block to use as the "default"
   code block to use for Edit controls such as DCGET, DCMULTILINE,
   DCCOMBOBOX, DCCHECKBOX, and DCRADIOBUTTON.  This eliminates the
   need to add an EDITPROTECT block to all edit controls in
   applications that switch between a "view" and "edit" mode.
   
   MESSAGEINTO < obMsgBox > defines the "default" message box object
   to use for DC* commands that support the MESSAGE clause.  This
   eliminates the need to add an INTO < oMsgBox > block to all
   MESSAGE clauses.  < obMsgBox > may be a code block or a "prexisting
   object".  For example, the message receptacle may be an XbpMle()
   object for displaying multiple-line messages.  The string defined \
   in the MESSAGE clause of the associated DC* command is passed to
   the code block.
   
     Example:
       @ .. DCGET .. MESSAGE 'Message Line 1;Message Line 2'
       @ .. DCMULTILINE .. OBJECT oMsgBox
       DCGETOPTIONS ;
         MESSAGEINTO {|c|c:=Strtran(c,';',CRLF,oMsgBox:setData(c)}
   
   If < obMsgBox > is an object, it must already exist and it must
   support the :setCaption() method.
   
   AUTOWINMENU (eXPress++ version 1.7 or later) is used in MDI-based
   applications where there is a main window with a pull-down menu and
   many child windows that were created with DCREAD GUI .. APPWINDOW
   < oMainWindow:drawingArea >.  This causes a "Window" menu item to be
   automatically added to the main window menu bar when a child window
   is opened with several window options.  Run the XDEMO.EXE program
   for an example.
   
   NOWINDOWMENU is used in MDI-based applications that also use the
   AUTOWINDOWMENU clause.  It is used to prevent a dialog from being
   added to the "window" menu when it is created.
   
   KEYBOARD < cKeyString > is a string of keys to pass into the
   keyboard queue.  The keys will be received by the first object
   to get focus.  If < cKeyString > is a null string, then any keys
   in the keyboard buffer placed by the Xbase++ KEYBOARD command
   will pass into the keyboard queue.
   
   NOEDITNAVKEYS < bNoEditNavKeys > is a code block that is evaluated
   to disable the key navigation that moves between edit controls
   when using the ENTER,  UP or DOWN keys.
   
   Example: DCGETOPTIONS .. NOEDITNAVKEYS {||nTabPage==3}
   

Description:

    DCGETOPTIONS is used to add options to a single-dimensional
    array named GETOPTIONS.
   
    Before using the DCGETOPTIONS command you must first declare
    the GetOptions array variable so:
   
    LOCAL GetOptions
   
    The GETOPTIONS array is passed to the Dialog Reader via
    DC_ReadGui(), DC_ReadGets(), or DCREAD.
   

Exported Instance Variables:

   

Methods:

   

Notes:

    Many of the GET OPTIONS are not supported with the DCAPPEDIT,
    DCAPPFIELD, and DCAPPBROWSE commands as these commands are
    simple adaptations of the respective Xbase++ APPEDIT, APPFIELD,
    and APPBROWSE commands.
   

Examples:

     #include "dcdialog.ch"
   
     * ---- Example 1 ---- *
   
     PROCEDURE Xtest()
   
     LOCAL GetList := {}, GetOptions, cOption, oMyGroup
   
     cOption := 'P'
   
     @ 4,10 DCGROUP oMyGroup CAPTION "Select an Operation" ;
       SIZE 40,8
   
     @ 1,2 DCRADIO cOption PROMPT 'Save to Dictionary' VALUE 'D' ;
           PARENT oMyGroup
   
     @ 2,2 DCRADIO cOption PROMPT 'Save to Source Code' VALUE 'S' ;
           PARENT oMyGroup
   
     @ 3,2 DCRADIO cOption PROMPT 'Make a Backup file' VALUE 'B' ;
           PARENT oMyGroup
   
     @ 4,2 DCRADIO cOption PROMPT 'Pack the File' VALUE 'P' ;
           PARENT oMyGroup
   
     DCGETOPTIONS ;
       NOMAXBUTTON ;
       NOMINBUTTON ;
       WINDOWHEIGHT 400 ;
       WINDOWWIDTH 400 ;
       DESIGN ;
       VISIBLE ;
       ROWSPACE 30
   
     DCREAD GUI ;
       TITLE 'My Dialogue' ;
       OPTIONS GetOptions ;
       ADDBUTTONS
   
     RETURN
   
   
     * ---- Example 2 ---- *
   
     // Using the EXITQUERY clause to validate input
   
   * -------------------
   
   FUNCTION ExitQuery()
   
   LOCAL GetList := {}, dStartDate := Date(), dEndDate := Date(), ;
         GetOptions, lOk
   
   @ 1,1 DCSAY 'Start Date' GET dStartDate GETOBJECT oStartDate
   @ 2,1 DCSAY '  End Date' GET dEndDate  GETOBJECT oEndDate
   
   DCGETOPTIONS ;
      EXITQUERY MSG {||_Validate(dStartDate,dEndDate,oStartDate, ;
                                 oEndDate)}
   
   DCREAD GUI FIT ADDBUTTONS TO lOk OPTIONS GetOptions ENTEREXIT
   
   RETURN lOk
   
   * --------------
   
   STATIC FUNCTION _Validate( dStartDate, dEndDate, oStartDate, ;
                              oEndDate )
   
   IF dStartDate >= dEndDate
     DC_WinAlert('End Date must be greater than Start Date')
     SetAppFocus(oStartDate)
     RETURN .f.
   ELSEIF Empty(dStartDate)
     DC_WinAlert('Start Date cannot be empty')
     RETURN .f.
     SetAppFocus(oStartDate)
   ELSEIF Empty(dEndDate)
     DC_WinAlert('End Date cannot be empty')
     SetAppFocus(oEndDate)
     RETURN .f.
   ENDIF
   
   RETURN .t.
   

Source/Library:

  DCDIALOG.CH

See Also:

   dc_getoptdefault()
   DIALOG GETLIST
   DCREAD GUI



DCGRUMPBROW

An emulation of Greg Lief's GRUMPBROW

Syntax:

   DCGRUMPBROW                             ;
            [ TO < var > ]                               ;
            [ SECURITY < cSec > ]                        ;
            [ TOP < nTop > ]                             ;
            [ LEFT < nLeft > ]                           ;
            [ BOTTOM < nBottom > ]                       ;
            [ RIGHT < nRight > ]                         ;
            [ TITLE < cTitle > ]                         ;
            [ FIELDS < aFields > ]                       ;
            [ HEADINGS < aHeadings > ]                   ;
            [ PICTURES < aPictures > ]                   ;
            [ ALTERNATES < aAlternates > ]               ;
            [ LOW < xLow > ]                             ;
            [ HIGH < xHigh > ]                           ;
            [ EXTRA  < aExtraOptions > ]                 ;
            [ EXTRAKEY < nExtraOptionsKey > ]            ;
            [ EXTRATITLE < cExtraOptionsTitle > ]        ;
            [ EXITKEY < nExitKey > ]                     ;
            [ INDEX_DESCRIPTION < aIndexDescriptions > ] ;
            [ VALIDS < aValids > ]                       ;
            [ WHENS < aWhens > ]                         ;
            [ AUTOREFRESH < nSeconds > ]                 ;
            [ LOCK < nlock > ]                           ;
            [ CARRY ]                                  ;
            [ MEMOWIDTH < nMemoWidth > ]                 ;
            [ MEMOHEIGHT < nMemoHeight > ]               ;
            [ COLORBLOCKS < aBlocks >   ]                ;
            [ INITIAL < bIinitial >  ]                   ;
            [ GOTOP ]                                  ;
            [ ALTERNATE_KEYS < aKeys > ]                 ;
            [ PRESENTATION < aPres > ]                   ;
            [ WIDTHS < aWidths > ]                       ;
            [ EDITCOORDS < aEditCoords > ]               ;
            [ MENU < acMenu > ]                          ;
            [ FONT < cFont > ]                           ;
            [ GETLIST @< aGrumpGetList > ]               ;
            [ MODAL ]                                  ;
            [ PARENT @< oDlg > ]                         ;
            [ APPWINDOW < oAppWindow > ]
   

Arguments:

   SECURITY < cSec > is a string defining the security level you want to
   give your users.  Case is not significant. You pass the first
   letter of each feature that you wish to activate:
   
     A    Add
     E    Edit
     D    Delete
     P    Screen Painter // not supported
     Q    Query by example
     S    Search*
     V    View
     N    do Not allow individual field edit (see below)
     C    allow cell (individual field edit) only (no full-screen)
     K    allow user to pack the database
     I    allow user to swap index with ALT-I
     L    allow user to lock column with "L"
     F    allow user to "filter" (show data subset) with ALT-S
     O    output (print) all or some records (can be overridden
            as item #8 in < aAlternates >... see below)
   
   
    If you do not pass this parameter, all the user will be able to do is
    browse vertically and Esc when they are finished.
   
    *If no index file is open, or if the index key is not of character
    type, you will not be able to Search, regardless of whether or not
    you pass an "S" in < cSecurity >.
   
   TOP < nTop >, LEFT < nLeft >, BOTTOM < nBottom >, RIGHT < nRight >
   delineate the screen region to be used for the browse.  The default
   values are 0, 0, 24, and 79, respectively.
   
   FIELDS < aFields > contains character strings holding the names of the
   fieldnames to show in the browse. Skip this parameter entirely if
   you want to show all fields in the currently active database.
   
    SPECIAL NOTE: you can alternatively put code blocks in < aFields >
    to show any valid Xbase++ expression.  Note that any such columns
    will not be editable unless they are Get/Set code blocks.  These
    code blocks can be used for just about anything, including fields
    in databases other than the currently active work area.  You may
    also wish to make these code blocks "get-set", which means that
    they can assign values.  For example, the following code block
    displays the CUST- >LASTNAME field and allows the user to edit it
    as well:
   
       { | x | if(x == NIL, cust- >lastname, cust- >lastname := x) }
   
   HEADINGS < aHeadings > contains an array of column headings to be used
   for the browse.  If you do not use this clause, the fieldnames will
   be used as column headings.NOTE: No default heading will be provided
   for columns that are based on code blocks (see < aFields > description
   above).
   
   PICTURES < aPictures > contains PICTURE clauses corresponding to each
   field.  You may use this if, for example, you wish to truncate certain
   fields or use "Y" for logicals.  If you do not pass this parameter,
   DC_GuiGrumpBrow() will establish default PICTURE values for each
   field that conform to the general norm.  Use a null string if you
   do not wish to use this parameter.
   
   ALTERNATES < aAlternates > is an eight element array which is used to
   override the default add/edit/etc. routines.  This array should be
   eight elements long, and each element should contain either a code
   block or a NIL.  The elements correspond to the actions as follows:
   
    aAlternate[1] = ADD function
    aAlternate[2] = DELETE function
    aAlternate[3] = EDIT function
    aAlternate[4] = QUERY function
    aAlternate[5] = SEARCH function
    aAlternate[6] = VIEW function
    aAlternate[7] = CELL EDIT codeblocks (see below)
    aAlternate[8] = OUTPUT function
   
    You only need to fill the elements that you wish to use. For
    example, if you want to use your own Add and Edit routines, you
    could do the following:
   
    LOCAL aAlternate[8]
    aAlternate[1] = { || SpecAdd() }
    aAlternate[3] = { |b| SpecEdit(b)}
   
    When the user presses "A" to Add or "E" to Edit, DC_GuiGrumpBrow()
    would evaluate these blocks and call SpecAdd() or SpecEdit(),
    respectively.  Note that the second code block accepts a parameter
    and passes it directly to SpecEdit().  This takes advantage of the
    fact that DC_GuiGrumpBrow() will automatically pass the Browse
    object and GetList to your alternate functions.  You can therefore
    manipulate the object as desired (e.g., resizing the window,
    forcing a manual refresh, etc).
   
    The seventh element of ALTERNATES array can contain an array
    containing code blocks for the columns where alternate cell editing
    is necessary.
   
   LOW < xLow > and HIGH < xHigh > allow you to restrict browsing operations
   to a subset of records, ie a SCOPE.  These parameters may be of any
   data type -- conversion will be handled internally by DCGRUMPBROW.
   Note that the subset feature works only if you have an index file
   open.  Further note that if you have two indexes open, and wish to
   switch between them using ALT-I,  DCGRUMPBROW will maintain a
   different data subset for each index.
   
   EXTRA < aExtraOptions > contains additional options which can be
   accessed as a pop-up menu from within DCGRUMPBROW.  The default key
   to pop up this menu is ALT-F10, although this can be changed.
   
   Create an array that contains nested arrays, each of which contains
   the menu option as the first element and the code block to be
   executed as the second element.  For example:
   
    { ;
       { "First option",  { || firstfunc() }     }, ;
       { "Second option", { || secondfunc() }    }, ;
       { "Third option",  { | a,b | thirdfunc(a,b) } }  ;
    }
   
   Note that the third code block accepts a parameter and sends it
   through to the function.  This is because DCGRUMPBROW will
   pass the Browse object and GetList as parameters to your code
   blocks when it evaluates them.  Therefore you can write your code
   blocks in this fashion to access the Browse object and manipulate
   it as you see fit.
   
   EXTRAKEY < nExtraOptionsKey > can be used to override the default
   (ALT-F10) key to pop up the additional options menu.
   
   EXTRATITLE < cExtraOptionsTitle > will be used as the title for the
   pop-up menu window.  By default, no title will be used.
   
   EXITKEY < nExitKey > allows you to use a different key for exiting the
   browse. Pass the INKEY value of the desired key as this parameter.
   The default is K_ESC.  If you wish to allow multiple exit keys, you
   may pass an array containing the desired INKEY values as this
   parameter (or in conjunction with the EXITKEY clause of the
   DCGRUMPBROW user-defined command).
   
   INDEX_DESCRIPTION < aIndexDescriptions > contains descriptive character
   strings for each active index.  If you pass this parameter, these
   descriptions will be displayed on the top row when users switch
   between indexes with ALT-I.  Otherwise, the regular indexkey will be
   displayed.
   
   VALID < aValids > and WHEN < aWhens > allow you to attach VALID and
   WHEN clauses to any or all columns in the browse.  If you use these,
   you must use code blocks, and I would recommend generic coding to take
   advantage of the GET object being passed as a parameter (e.g.,
   { |o| !empty(o:editBuffer()) }).  Note that these will apply to
   both single-field and full-screen editing, as well as adding new
   records.
   
   AUTOREFRESH < nAutoRefresh > is ideal for multi-user programs.  If you
   pass a numeric expression as this parameter, DCGRUMPBROW will
   automatically refresh the screen as often as you specify. Your
   parameter represents the number of seconds.
   
   LOCK < nLockedColumns > is a numeric indicating how many columns should
   be locked from the outset.  By default this will be zero.
   
   CARRY enables the values from the current record to be carried
   forward as the defaults for new records.  Pass a logical True if you
   want this behavior.
   
   MEMOWIDTH < nMemoWidth > is a numeric indicating the width to use for
   memo windows.  By default, this will be either 40 or the width of the
   browse window, whichever is smaller.
   
   TITLE < cTitle > is a character string to be centered on the top row of
   the DC_GuiGrumpbrow() window.  By default, no title will be used.
   < nMemoHeight > is a numeric indicating the height to use for memo
   windows.  By default, this will be eight rows.
   
   COLORBLOCK < aColorBlocks > allows you to initialize the colorBlock
   instance variable for one or more columns within the browse. This
   array should contain either code blocks or NILs.
   
   INITIAL < bInitial > will be evaluated just prior to the browse being
   displayed.  This allows you to manipulate the browse object (e.g.,
   changing the separators, changing the defColor instance variable for
   one or more columns, moving the cursor to some column other than the
   first, etcetera). Your codeblock should be structured to accept one
   parameter, which will be the browse object.
   
   GOTOP enables you to force DCGRUMPBROW to move to the top
   of the database each time that the user presses ALT-I to cycle
   through the active indexes.  Pass .T. if you desire this behavior.
   By default, the record pointer will remain unchanged, unless a data
   subset has been established for the index you are switching to, in
   which case the record pointer will be moved to the first record in
   said subset.
   
   ALTERNATE_KEYS < aAlternateKeys > can be used to override the default
   keys listed below for each DCGRUMPBROW behavior. This array would
   contain nested arrays which correspond to the following actions:
   
       Element   Action     Default Key    Default Message
       aKeys[1]  ADD             A         [A]dd
       aKeys[2]  DELETE          D         [D]elete
       aKeys[3]  EDIT            E         [E]dit
       aKeys[4]  QUERY           Q         [Q]uery
       aKeys[5]  SEARCH          S         [S]earch
       aKeys[6]  VIEW            V         [V]iew
       aKeys[7]  (n/a)
       aKeys[8]  OUTPUT          O         [O]utput
       aKeys[9]  LOCKCOLUMN      L         [L]ock
       aKeys[10] SUBSET          Alt-S     [Alt-S]ubset
       aKeys[11] SWAPINDEX       Alt-I     [Alt-I]ndex
       aKeys[12] PACK            K         pac[K]
   
   The structure of each nested array is { < nInkeyValue >,
   < cPrompt > }. If you do not need to change a particular key,
   simply leave that array element NIL.
   
   If you do not want to have any key tooltips displayed, simply pass
   NIL as the second element of each nested array.
   
   PRESENTATION < aPresParam > is an array of presentation parameters for
   the browse object.  See the Xbase++ documentation for the XbpBrowse()
   class for a specification of this array.
   
   WIDTHS < aColWidths > is an array of numeric values for each browse
   column, one for each element of < aFields >.  For automatic sizing
   insert a NIL in the array.
   
   EDITCOORDS < aEditCoords > is an array of coordinates that defines the
   location of the SAY (Header) prompt and GET (data) of each item in
   < aFields > when using the full-screen editor.  Each element of
   < aEditCoords > is a sub-array of 7 elements:
   
    < aEditCoords > element  Type     Description
    ---------------------  -------  --------------------------------
             1             Numeric  SAY (Header) Start Row
             2             Numeric  SAY (Header) Start Column
             3             Numeric  SAY Size (columns) default is 25
             4             Numeric  SAY Options - XBPSTATIC_TEXT_*
             5             Numeric  GET (Data) Start Row
             6             Numeric  GET (Data) Start Column
             7             Numeric  GET Size (columns) default is
                                    field width
   
   MENU < acMenu > is a Menu array or menu name that conforms to the
   specifications for DC_MenuEdit().
   
   FONT < cBrowFont > is the font style for the browse.  This is a
   character string that must conform to a standard Xbase++ font
   declaration, ex: "8.Arial".  The default is "8.Courier".
   
   GETLIST @< aGrumpGetList > is a variable (passed by reference) to
   store a pointer to the GetList that will be created by
   DC_GuiGrumpBrow().
   
   MODAL will cause the dialog window to be Application Modal,
   otherwise it will be modeless.
   
   PARENT @< oDialog > is a reference to a parent dialog or to a
   memory variable to store a reference to the dialog that will be
   created.  If < oDialog > has already been created as an Xbase Parts
   class object, it will become the parent for all the objects in
   the GetList.  If < oDialog > is passed by reference as a NIL, the
   dialog object created by the reader will be stored in this
   memory variable.  NOTE: Xbase++ does not allow < oDialog > to be
   a PRIVATE or a PUBLIC variable if it is passed by reference.
   
   The parent of the dialog that will be created is referenced by
   APPWINDOW < oAppWindow >.  If no < oAppWindow > argument is used
   then the parent of the created dialog will be AppDeskTop().
   

Description:

   DCGRUMPBROW is an emulation of the GrumpFish command GRUMPBROW
   originally written for Clipper 5.x.  It is full GUI and is based on the
   eXPress++ DC* command set rather than Tbrowse().
   

Notes:

   MEMO SUPPORT
   
   Memofields are shown in the browse window as "<þmemoþ>".  To view a
   memo, highlight it and press Enter.
   
   When adding, editing, or doing a query by example, you will notice
   that memo support is handled quite neatly.  As you go through the GET
   list, when you hit a memo, a small window will open for you to edit
   the memo.
   
   SECURITY LEVELS
   
   You may define different security levels at different parts of the
   program.  For example, you might want to give your users the ability
   to add and edit records at one part of the program, but only view
   records elsewhere.
   
   SEARCH
   
   If you press "S" to search, and if the current controlling index is
   of character type, you may jump quickly to records by typing in the
   first few letters of the desired value.  For example, searching for
   the name 'MCALLISTER' could prove quite tedious in a 750-record
   database, but with quick-search you need only type in the letters
   "M", "C", and "A" to narrow the scope down considerably.  As letters
   are added to the search string, it is redisplayed centered along the
   bottom row of the browse box (unless the new letter results in a
   value that is not FOUND() in the database).  You may press backspace
   to erase the rightmost character of the search string.
   
   SWAPPING INDEXES (Alt-I)
   
   If you have two index files open, you may switch between them by
   pressing Alt-I.  This means that you could have one index on company
   name and another on last name, and jump back and forth between them
   for searches.
   
   QUERY BY EXAMPLE
   
   By pressing "Q" you can do a query-by-example to find the next
   record matching their specific criteria.  All you need do is fill in
   the blanks.  Fill in as many fields as you want to narrow the search
   criteria. Note that all query-by-example searches are
   case-insensitive.
   
   If you want to search for a field that contains a certain value, they
   may enter that value surrounded by two periods ("..") on either side.
   For example, if you wanted to find the next record that contains the
   word "STREET" in the address field, you could enter "..STREET.." for
   that field.
   
   After you perform a query-by-example, the next time you press "Q" you
   will be given the option to repeat the search using the same criteria
   (which will save you the bother of re-entering it).
   
   SCREEN PAINTER
   
   The screen painter will be supported in a future version
   
   EDITING ONE FIELD
   
   When the user highlights a field and press Enter, they can edit it
   directly without going to a vertical view.  (This assumes, of
   course, that you have given them Edit privileges.)  If they wish to
   edit the same field in a series of records, they can terminate the
   READ by pressing the down arrow, which will move them down one
   record and pop them immediately into edit mode.
   
   However, there may be situations when you do not want the user to be
   able to edit an individual field.  In such situations, you should
   include "N" as part of the security parameter.
   
   By the same token, there may be situations where you only want
   the user to be able to edit individual fields (as opposed to a
   full-screen edit). This would apply if you had a number of code
   block (and thus non-editable) columns. In such situations, you
   should include "C" (and not "N") as part of the security parameter.
   

Source/Library:

  DCGRUMP.CH

See Also:

   dc_guigrumpbrow()



DCHOTKEY

Set a Hot-Key for action by the GUI Reader

Syntax:

    DCHOTKEY < anAccel > ;                                                ;
             [ACTION < bAction >] ;
             [PARENT < oParent >] ;
             [PARENTID < cParentId >] ;                                       ;
             [WHEN < bWhen >] ;
             [ID < cId >] ;
             [TITLE < cTitle >] ;
             [GROUP < cGroup >]
   

Arguments:

   < anAccel > is a numeric "hot-key" assignment that will activate
   the < bAction > codeblock the hot-key is pressed.  The key must be
   a valid key with the prefix xbeK_*.  These keys are defined in
   APPEVENT.CH.  < anAccel > may also be an array of numeric values
   to assign more than one key to an action.
   
   ACTION < bAction > is the code block to evaluate when the key
   is pressed in the DC_ReadGUI() event loop.  The code block
   should look like so:
   
    { | uNIL1, uNIL2, oXbp | ... }
   
   PARENT < oParent > is an optional parent object that is tied to
   this key.  If this option is used, then the < bAction > code block
   will be evaluated only if the < nAccel > key is pressed when the
   parent object is in focus.
   
   PARENTID < cParentID > may be used in lieu of the PARENT < oParent >
   clause.  This identifies the ID of the parent instead of the
   parent's object variable name.
   
   WHEN < bWhen > is a code block that is evaluated in the event loop.
   This code block must return a logical value.  If the value
   returned is .FALSE. then the hot-key will be disabled.  If the
   value returned is .TRUE. then the hot-key will be enabled.
   The object is passed as a parameter to the code block.
   
   ID < cID > is a unique ID code to assign to this object.
   
   TITLE < cTitle > is a title to assign to this object.  The title
   is not displayed on the screen but is simply a description of the
   get object which is saved in the GetList.
   
   GROUP < cGroup > is a "group" name (case-sensitive) to assign to
   this GetList object.  Assignment to a group makes it possible to
   perform operations only on GetList items which are members of a
   specified group, using functions such as DC_GetRefresh() or
   DC_ReadGui().
   

Description:

    The command DCHOTKEY creates a new Hot-Key object and
    adds the object to the array named GETLIST which is later
    processed by the DC_READGUI() function or by the DCREAD GUI
    command.  The GETLIST array must be first declared and
    initialized to the value of {}.  The command DCREAD GUI activates
    the edit mode for all objects found in the GetList array.
    A Getlist object remains stored as long as it is referenced
    in an array or by a variable.  The commands CLEAR and
    CLEAR GETS assign an empty array to the GetList variable.
    This also occurs after the completion of the DCREAD GUI command
    if it is called without the SAVE option, causing all Get
    objects referenced by the GetList array to be released.
   
    DCHOTKEY objects are used to set establish hot-keys which will
    execute pre-defined code-blocks from within the event loop of
    the GUI reader.
   

Examples:

     #include "dcdialog.ch"
     #include "appevent.ch"
   
     PROCEDURE Xtest()
   
     LOCAL GetList := {}, GetOptions, cOption, oRadio1, oRadio2, ;
           oRadio3, oRadio4
   
     cOption := 'P'
   
     @ 1,2 DCRADIO cOption PROMPT 'Save to &Dictionary' VALUE 'D' ;
       OBJECT oRadio1
   
     @ 2,2 DCRADIO cOption PROMPT '&Save to Source Code' VALUE 'S' ;
       OBJECT oRadio2
   
     @ 3,2 DCRADIO cOption PROMPT 'Make a &Backup file' VALUE 'B' ;
       OBJECT oRadio3
   
     @ 4,2 DCRADIO cOption PROMPT '&Pack the File' VALUE 'P' ;
       OBJECT oRadio4
   
     DCHOTKEY xbeK_ALT_D ACTION {||SetAppFocus(oRadio1), ;
                                      oRadio2:SetData(.f.), ;
                                      oRadio3:SetData(.f.), ;
                                      oRadio4:SetData(.f.), ;
                                      oRadio1:SetData(.t.), ;
                                      cOption := 'D' }
   
     DCHOTKEY xbeK_ALT_S ACTION {||SetAppFocus(oRadio2), ;
                                      oRadio1:SetData(.f.), ;
                                      oRadio3:SetData(.f.), ;
                                      oRadio4:SetData(.f.), ;
                                      oRadio2:SetData(.t.), ;
                                      cOption := 'S' }
   
     DCHOTKEY xbeK_ALT_B ACTION {||SetAppFocus(oRadio3), ;
                                      oRadio1:SetData(.f.), ;
                                      oRadio2:SetData(.f.), ;
                                      oRadio4:SetData(.f.), ;
                                      oRadio3:SetData(.t.), ;
                                      cOption := 'B' }
   
   
     DCHOTKEY xbeK_ALT_P ACTION {||SetAppFocus(oRadio4), ;
                                      oRadio1:SetData(.f.), ;
                                      oRadio2:SetData(.f.), ;
                                      oRadio3:SetData(.f.), ;
                                      oRadio4:SetData(.t.), ;
                                      cOption := 'P' }
   
     DCREAD GUI ;
       TITLE 'Hot-Key Demo';
       FIT ;
       ADDBUTTONS
   
     DC_MsgBox({cOption})
   
     RETURN
   

Source/Library:

  DCDIALOG.CH

DCHTML

A command for creating any HTML output

Syntax:

   @ [ < nRow > ,< nCol > ] DCHTML           ;
            [TEXT < bcText >]              ;
            [PRE,PRETEXT < bcPreHTML >]    ;
            [POST,POSTTEXT < bcPostHTML >] ;
            [OBJECT < oObject >]           ;
            [PARENT < oParent >]           ;
            [PARENTID < cPID >]            ;
            [STYLE,FONT < cStyle >]        ;
            [CARGO < xCargo >]             ;
            [TOOLTIP < bcToolTip >]        ;
            [HIDE < bHide >]               ;
            [EVAL < bEval >]               ;
            [TITLE < cTitle >]             ;
            [ID < cId >]                   ;
            [GROUP < cGroup >]             ;
            [MESSAGE < cMessage >]
   

Arguments:

   < nRow > and < nCol > are the row number and column number of
   the table if the parent of this object is a DCTABLE. The
   text will be inserted in the cell of the table defined by
   the row/column.
   
   TEXT < bcText > is a character string or a codeblock that
   returns a character string containing the HTML text or
   plain text.
   
   OBJECT < oTable > is the name of the variable to assign as a
   storage place for this object.
   
   PARENT < oParent > is the name of the variable that was
   assigned to the parent of this table. If this argument
   is not passed then the parent will be the object set with
   the DCSETPARENT command.
   
   PARENTID < cParentID > may be used in lieu of the PARENT < oParent >
   clause.  This identifies the ID of the parent instead of the
   parent's object variable name.
   
   TOOLTIP < bcToolTip > is a tooltip to display over the text.
   
   PRE,PRETEXT < bcPreHTML > is a character string or a code block
   that returns a character string containing any HTML text
   that will precede the opening < table > tag in the source
   that is written.
   
   POST,POSTTEXT < bcPostHTML > is a character string or a code block
   that returns a character string containing any HTML text
   that will follow the closing < /table > tag in the source
   that is written.
   
   HIDE < bHide > is a code block that is evaluated at the
   time the :writeHtml() method is called for the class that
   supports this command.  If the code block returns a .TRUE.,
   then no HTML code will be written.
   
   STYLE < cStyle > is the style tag to wrap around the text.  For
   example STYLE "H3" will create the following source:
   < H3 >< bcText >< /H3 >.
   
   MESSAGE < bcMessage > is a character string or a codeblock
   that returns a character string containing a message to
   assign to the MESSAGEINTO < cMessageInto > clause of DCREAD
   HTML when the mouse is clicked on the element in the browser.
   This creates an < a href > around the element and sends a URL
   equivalent to /?< cMessageInto >=< bcMessage >.
   
   EVAL < bEval > is a code block that is evaluated after the
   object is created in DC_ReadHtml().  A pointer to the
   object associated with this command is passed as an
   argument to the code block.
   
   ID < cId > is a unique identifier for this object.  This ID is used
   with functions like DC_GETOBJECT() to determine the status
   of a get object.
   
   TITLE < cTitle > is a title to assign to this object.  The title
   is not used in the HTML output but is simply a description of the
   get object which is saved in the GetList.
   
   GROUP < cGroup > is a "group" name (case-sensitive) to assign to
   this GetList object.  Assignment to a group makes it possible to
   perform operations only on GetList items which are members of a
   specified group.
   
   CARGO < xCargo > is any kind of data you wish to to add to the
   :cargo container of object created by this definition.
   

Description:

    The command DCHTML creates an HTML element definition and
    adds the definition to the array named GETLIST which is later
    processed by the DC_READHTML() function or by the DCREAD HTML
    command.  The GETLIST array must be first declared and
    initialized to the value of {}.  The command DCREAD HTML
    creates all the DC_Html*() objects from the GetList array
    and then invokes the :writeHtml() method of the topmost
    parent object to generate the HTML code.
   
    A Getlist object remains stored as long as it is referenced
    in an array or by a variable.  The commands CLEAR and
    CLEAR GETS assign an empty array to the GetList variable.
    This also occurs after the completion of the DCREAD command
    if it is called without the SAVE option, causing all
    objects referenced by the GetList array to be released.
   

Notes:

   DCHTML creates an object of the DC_Html() class.
   

Examples:

   /*
   This example will create a table containing four sub tables
   and write into each sub table.
   */
   
   FUNCTION HtmlCommand()
   
   LOCAL i, j, GetList[0], cHtml, oTable, nTable, aSubTables[2,2]
   
   DCTABLE OBJECT oTable1 ;
        ROWS 2 ;
        COLUMNS 2 ;
        BORDER 5 ;
        BORDERCOLOR '#336677' ;
        TRIMROWS ;
        TRIMCOLS ;
        BGCOLOR '#339977'
   
   nTable := 1
   FOR i := 1 TO 2
     FOR j := 1 TO 2
       @ i,j DCTABLE ;
         OBJECT aSubTables[i,j] ;
         BGCOLOR '#33AA77' ;
         ROWS 1 ;
         COLUMNS 1 ;
         PARENT oTable1
         @ 1,1 DCHTML TEXT '

This is table

' + ; (Str(nTable++))+'

' ; PARENT aSubTables[i,j] NEXT NEXT DCREAD HTML TO cHtml MemoWrit('TEST.HTM',cHtml) RETURN nil

Source/Library:

  DCHTML.CH

See Also:

   DCREAD HTML
   dc_html()



DCHTMLBODY

A ccommand for creating the body tag of an HTML document

Syntax:

   DCHTMLBODY                           ;
          [OBJECT < oBody >]              ;
          [STYLE < style >]               ;
          [LINK < link >]                 ;
          [ONLOAD < onload >]             ;
          [VLINK < vlink >]               ;
          [ALINK < alink >]               ;
          [TEXT < textColor >]            ;
          [BGCOLOR < bgcolor >]           ;
          [BGPROPERTIES < bgproperties >] ;
          [LEFTMARGIN < leftmargin >]     ;
          [TOPMARGIN < topmargin >]       ;
          [BACKGROUND < background >]     ;
          [PARENT < oParent >]            ;
          [PARENTID < cPID >]             ;
          [CARGO < xCargo >]              ;
          [HIDE < bHide >]                ;
          [EVAL < bEval >]                ;
          [TITLE < cTitle >]              ;
          [PRE,PRETEXT < bcPreText >]     ;
          [POST,POSTTEXT < bcPostText >]  ;
          [ID < cId >]                    ;
          [GROUP < cGroup >]
   

Arguments:

   STYLE < style > is the name of a *.CSS (cascading style sheet)
   file to use as the style of the document.
   
   OBJECT < oBody > is the name of the variable to assign as a
   storage place for this object.
   
   PARENT < oParent > is the name of the variable that was
   assigned to the parent of this object. If this argument
   is not passed then the parent will be the object set with
   the DCSETPARENT command.
   
   PARENTID < cParentID > may be used in lieu of the PARENT < oParent >
   clause.  This identifies the ID of the parent instead of the
   parent's object variable name.
   
   LINK < link > is the color of hyperlinks which have never been
   visited.  Value may be an RGB color value (#XXXXXX),
   a standard color name, an RGB 3-element array or a numeric
   value defined in GRA.CH.
   
   ALINK < alink > is the color of hyperlinks which has been
   clicked. Value may be an RGB color value (#XXXXXX), a standard
   color name, an RGB 3-element array or a numeric value
   defined in GRA.CH.
   
   VLINK < vlink > is the color of hyperlinks which have been
   previously visited.  Value may be an RGB color value (#XXXXXX),
   a standard color name, an RGB 3-element array or a numeric
   value defined in GRA.CH.
   
   TEXT < textColor > is the color of the text in the body of the
   document.  Value may be an RGB color value (#XXXXXX), a
   standard color name, an RGB 3-element array or a numeric value
   defined in GRA.CH.
   
   BGCOLOR < bgcolor > is the color of the background in the body
   of the document.  Value may be an RGB color value (#XXXXXX), a
   standard color name, an RGB 3-element array or a numeric value
   defined in GRA.CH.
   
   TOPMARGIN < topmargin > and LEFTMARGIN < leftmargin > are the
   margins in pixels of the body of the document.
   
   BACKGROUND < background > is a URL pointing to a .JPG or .GIF
   image to be used as the background for the body of text.
   
   BGPROPERTIES < bgproperties > if empty allows the background to
   scroll.  A value of "fixed" will prevent the background from
   scrolling.
   
   ONLOAD < onload > is a Script command that will execute after
   the document is loaded.
   
   CARGO < xCargo > is any kind of data you wish to to add to the
   :cargo container of object created by this definition.
   
   PRE,PRETEXT < bcPreHTML > is a character string or a code block
   that returns a character string containing any HTML text
   that will precede the opening < table > tag in the source
   that is written.
   
   POST,POSTTEXT < bcPostHTML > is a character string or a code block
   that returns a character string containing any HTML text
   that will follow the closing < /table > tag in the source
   that is written.
   
   HIDE < bHide > is a code block that is evaluated at the
   time the :writeHtml() method is called for the class that
   supports this command.  If the code block returns a .TRUE.,
   then no HTML code will be written.
   
   EVAL < bEval > is a code block that is evaluated after the
   object is created in DC_ReadHtml().  A pointer to the
   object associated with this command is passed as an
   argument to the code block.
   
   ID < cId > is a unique identifier for this object.  This ID is used
   with functions like DC_GETOBJECT() to determine the status
   of a get object.
   
   TITLE < cTitle > is a title to assign to this object.  The title
   is not used in the HTML output but is simply a description of the
   get object which is saved in the GetList.
   
   GROUP < cGroup > is a "group" name (case-sensitive) to assign to
   this GetList object.  Assignment to a group makes it possible to
   perform operations only on GetList items which are members of a
   specified group.
   

Description:

    DCHTMLBODY creates the HTML needed in the BODY tag of an
    HTML document.
   
    The command DCHTMLBODY creates an HTML element definition and
    adds the definition to the array named GETLIST which is later
    processed by the DC_READHTML() function or by the DCREAD HTML
    command.  The GETLIST array must be first declared and
    initialized to the value of {}.  The command DCREAD HTML
    creates all the DC_Html*() objects from the GetList array
    and then invokes the :writeHtml() method of the topmost
    parent object to generate the HTML code.
   
    A Getlist object remains stored as long as it is referenced
    in an array or by a variable.  The commands CLEAR and
    CLEAR GETS assign an empty array to the GetList variable.
    This also occurs after the completion of the DCREAD command
    if it is called without the SAVE option, causing all
    objects referenced by the GetList array to be released.
   

Notes:

   DCHTMLBODY creates an object of the DC_HtmlBody() class.
   

Examples:

   #include "dcdialog.ch"
   #include "dchtml.ch"
   
   FUNCTION Xtest()
   
   LOCAL i, GetList[0], oMain, cHtml, oBody
   
   DCHTMLMAIN OBJECT oMain
   
   DCHTMLBODY OBJECT oBody ;
        BACKGROUND "http://donnay-software.com/graphics/expback1.gif" ;
        STYLE "\exp18\html\default.css" ;
        PARENT oMain
   
   DCHTML TEXT MemoRead('\exp18\readme.txt') ;
        STYLE 'PRE' ;
        PARENT oBody
   
   DCREAD HTML TO cHtml
   
   MemoWrit('TEST.HTM',cHtml)
   
   RETURN cHtml
   

Source/Library:

  DCHTML.CH

See Also:

   DCREAD HTML
   dc_htmlbody()



DCHTMLMAIN

A ccommand for creating the main HTML document

Syntax:

   DCHTMLMAIN                           ;
          [OBJECT < oMain >]              ;
          [STYLE < cStyle >]              ;
          [PARENT < oParent >]            ;
          [PARENTID < cPID >]             ;
          [CARGO < xCargo >]              ;
          [HIDE < bHide >]                ;
          [EVAL < bEval >]                ;
          [TITLE < cTitle >]              ;
          [PRE,PRETEXT < bcPreText >]     ;
          [POST,POSTTEXT < bcPostText >]  ;
          [ID < cId >]                    ;
          [GROUP < cGroup >]              ;
   

Arguments:

   STYLE < cStyle > is the name of a *.CSS (cascading style sheet)
   file to use as the style of the document.
   
   OBJECT < oMain > is the name of the variable to assign as a
   storage place for this object.
   
   PARENT < oParent > is the name of the variable that was
   assigned to the parent of this object. If this argument
   is not passed then the parent will be the object set with
   the DCSETPARENT command.
   
   PARENTID < cParentID > may be used in lieu of the PARENT < oParent >
   clause.  This identifies the ID of the parent instead of the
   parent's object variable name.
   
   CARGO < xCargo > is any kind of data you wish to to add to the
   :cargo container of object created by this definition.
   
   PRE,PRETEXT < bcPreHTML > is a character string or a code block
   that returns a character string containing any HTML text
   that will precede the opening < table > tag in the source
   that is written.
   
   POST,POSTTEXT < bcPostHTML > is a character string or a code block
   that returns a character string containing any HTML text
   that will follow the closing < /table > tag in the source
   that is written.
   
   HIDE < bHide > is a code block that is evaluated at the
   time the :writeHtml() method is called for the class that
   supports this command.  If the code block returns a .TRUE.,
   then no HTML code will be written.
   
   EVAL < bEval > is a code block that is evaluated after the
   object is created in DC_ReadHtml().  A pointer to the
   object associated with this command is passed as an
   argument to the code block.
   
   ID < cId > is a unique identifier for this object.  This ID is used
   with functions like DC_GETOBJECT() to determine the status
   of a get object.
   
   TITLE < cTitle > is a title to assign to this object.  The title
   is not used in the HTML output but is simply a description of the
   get object which is saved in the GetList.
   
   GROUP < cGroup > is a "group" name (case-sensitive) to assign to
   this GetList object.  Assignment to a group makes it possible to
   perform operations only on GetList items which are members of a
   specified group.
   

Description:

    DCHTMLMAIN creates the HTML needed at the start of an
    HTML document.
   
    The command DCHTMLMAIN creates an HTML element definition and
    adds the definition to the array named GETLIST which is later
    processed by the DC_READHTML() function or by the DCREAD HTML
    command.  The GETLIST array must be first declared and
    initialized to the value of {}.  The command DCREAD HTML
    creates all the DC_Html*() objects from the GetList array
    and then invokes the :writeHtml() method of the topmost
    parent object to generate the HTML code.
   
    A Getlist object remains stored as long as it is referenced
    in an array or by a variable.  The commands CLEAR and
    CLEAR GETS assign an empty array to the GetList variable.
    This also occurs after the completion of the DCREAD command
    if it is called without the SAVE option, causing all
    objects referenced by the GetList array to be released.
   

Notes:

   DCHTMLMAIN creates an object of the DC_HtmlMain() class.
   

Examples:

   #include "dcdialog.ch"
   #include "dchtml.ch"
   
   FUNCTION Xtest()
   
   LOCAL i, GetList[0], oMain, cHtml, oBody
   
   DCHTMLMAIN OBJECT oMain
   
   DCHTMLBODY OBJECT oBody ;
        BACKGROUND "http://donnay-software.com/graphics/expback1.gif" ;
        STYLE "\exp18\html\default.css" ;
        PARENT oMain
   
   DCHTML TEXT MemoRead('\exp18\readme.txt') ;
        STYLE 'PRE' ;
        PARENT oBody
   
   DCREAD HTML TO cHtml
   
   MemoWrit('TEST.HTM',cHtml)
   
   RETURN cHtml
   

Source/Library:

  DCHTML.CH

See Also:

   DCREAD HTML
   DCHTMLMAIN
   dc_htmlmain()



DCHYPERLINK

A command for creating HYPERLINK tags in HTML

Syntax:

   @ [ < nRow >, < nCol > ] DCHYPERLINK       ;
          [CAPTION,TEXT]                  ;
          [HREF < href >]                   ;
          [METHOD < method >]               ;
          [NAME < name >]                   ;
          [REL < rel >]                     ;
          [REV < rev >]                     ;
          [TARGET < target >]               ;
          [URN < urn >]                     ;
          [PARENT < oParent >]              ;
          [PARENTID < cPID >]               ;
          [OBJECT < oLink >]                ;
          [CARGO < xCargo >]                ;
          [EVAL < bEval >]                  ;
          [PRE,PRETEXT < bcPreText >]       ;
          [POST,POSTTEXT < bcPostText >]    ;
          [HIDE < bHide >]                  ;
          [TITLE < cTitle >]                ;
          [ID < cId >]                      ;
          [GROUP < cGroup >]                ;
   

Arguments:

   < nRow > and < nCol > are the row number and column number of
   the table if the parent of this object is a DCTABLE. The
   text will be inserted in the cell of the table defined by
   the row/column.
   
   CAPTION, TEXT < text > is any html text or element to include
   within the < A > tag.  If this argument is not used, then
   a child object should be added to the < oLink > parent.
   
   OBJECT < oLink > is the name of the variable to assign as a
   storage place for this object.
   
   PARENT < oParent > is the name of the variable that was
   assigned to the parent of this object. If this argument
   is not passed then the parent will be the object set with
   the DCSETPARENT command.
   
   PARENTID < cParentID > may be used in lieu of the PARENT < oParent >
   clause.  This identifies the ID of the parent instead of the
   parent's object variable name.
   
   CARGO < xCargo > is any kind of data you wish to to add to the
   :cargo container of object created by this definition.
   
   PRE,PRETEXT < bcPreHTML > is a character string or a code block
   that returns a character string containing any HTML text
   that will precede the opening < table > tag in the source
   that is written.
   
   POST,POSTTEXT < bcPostHTML > is a character string or a code block
   that returns a character string containing any HTML text
   that will follow the closing < /table > tag in the source
   that is written.
   
   HIDE < bHide > is a code block that is evaluated at the
   time the :writeHtml() method is called for the class that
   supports this command.  If the code block returns a .TRUE.,
   then no HTML code will be written.
   
   EVAL < bEval > is a code block that is evaluated after the
   object is created in DC_ReadHtml().  A pointer to the
   object associated with this command is passed as an
   argument to the code block.
   
   ID < cId > is a unique identifier for this object.  This ID is used
   with functions like DC_GETOBJECT() to determine the status
   of a get object.
   
   TITLE < cTitle > is a title to assign to this object.  The title
   is not used in the HTML output but is simply a description of the
   get object which is saved in the GetList.
   
   GROUP < cGroup > is a "group" name (case-sensitive) to assign to
   this GetList object.  Assignment to a group makes it possible to
   perform operations only on GetList items which are members of a
   specified group.
   
   HREF < href > is the URL to navigate to when the user clicks on
   the text or image underlined.
   
   METHOD < method > is the method of the href.
   
   NAME < name > is the name of the label within the target document.
   
   REL < rel > is the relationship of the source to the target.
   
   REV < rev > is the relationship of the target to the source.
   
   TITLE < title > is a tooltip to display when the mouse is moved
   over the hyperlink.
   
   TARGET < target > is the name of the window or frame which is the
   target for the returned response.
   
   URN < urn > is the Uniform Resource Name for a referenced document.
   

Description:

   DCHYPERLINK is a command for creating HTML href elements
   for hyperlinks.
   
   The command DCHYPERLINK creates an HTML element definition and
   adds the definition to the array named GETLIST which is later
   processed by the DC_READHTML() function or by the DCREAD HTML
   command.  The GETLIST array must be first declared and
   initialized to the value of {}.  The command DCREAD HTML
   creates all the DC_Html*() objects from the GetList array
   and then invokes the :writeHtml() method of the topmost
   parent object to generate the HTML code.
   
   A Getlist object remains stored as long as it is referenced
   in an array or by a variable.  The commands CLEAR and
   CLEAR GETS assign an empty array to the GetList variable.
   This also occurs after the completion of the DCREAD command
   if it is called without the SAVE option, causing all
   objects referenced by the GetList array to be released.
   

Notes:

   DCHYPERLINK creates an object of the DC_HtmlHyperLink()
   class.
   

Examples:

   #include "dcdialog.ch"
   #include "dchtml.ch"
   
   FUNCTION Xtest()
   
   LOCAL i, GetList[0], cHtml, oLink
   
   DCHYPERLINK HREF "http://donnay-software.com" ;
         OBJECT oLink
   
   DCIMAGE SRC "http://donnay-software.com/graphics/donnay-logo.jpg" ;
         ALT 'Donnay Logo' PARENT oTable ;
         HEIGHT 100 ;
         PARENT oLink
   
   DCREAD HTML TO cHtml
   
   MemoWrit('TEST.HTM',cHtml)
   
   RETURN cHtml
   

Source/Library:

  DCHTML.CH

See Also:

   DCREAD HTML
   dc_html()
   dc_readhtml()
   dc_htmlhyperlink()



DCIMAGE

A command for creating IMAGE tags in HTML

Syntax:

   @ [ < nRow >, < nCol > ] DCIMAGE            ;
         [BORDER < border >]                 ;
         [SRC < src >]                       ;
         [DYNSRC < dynsrc >]                 ;
         [LOWSRC < lowsrc >]                 ;
         [START < start >]                   ;
         [USEMAP < usemap >]                 ;
         [WIDTH < width >]                   ;
         [HEIGHT < height >]                 ;
         [LOOP < loop >]                     ;
         [ISMAP]                           ;
         [ALT < alt >]                       ;
         [CONTROLS < controls >]             ;
         [ALIGN < align >]                   ;
         [OBJECT < oImage >]                 ;
         [PARENT < oParent >]                ;
         [PARENTID < cPID >]                 ;
         [HSPACE < vspace >]                 ;
         [VSPACE < hspace >]                 ;
         [CARGO < xCargo >]                  ;
         [HIDE < bHide >]                    ;
         [WHEN < bWhen >]                    ;
         [EVAL < bEval >]                    ;
         [TITLE < cTitle >]                  ;
         [PRE,PRETEXT < bcPreText >]         ;
         [POST,POSTTEXT < bcPostText >]      ;
         [ID < cId >]                        ;
         [GROUP < cGroup >]                  ;
   

Arguments:

   < nRow > and < nCol > are the row number and column number of
   the table if the parent of this object is a DCTABLE. The
   text will be inserted in the cell of the table defined by
   the row/column.
   
   OBJECT < oImage > is the name of the variable to assign as a
   storage place for this object.
   
   PARENT < oParent > is the name of the variable that was
   assigned to the parent of this object. If this argument
   is not passed then the parent will be the object set with
   the DCSETPARENT command.
   
   PARENTID < cParentID > may be used in lieu of the PARENT < oParent >
   clause.  This identifies the ID of the parent instead of the
   parent's object variable name.
   
   SRC < src > is the URL source of the image to display. This may
   may be a character string or an array of 2-character
   strings.  If it is an array, the URL in the first element
   of the array will be used if the WHEN < bWhen > clause
   evaluates to .TRUE. otherwise the second element of the
   array will be used.
   
   DYNSRC < dynsrc > (Internet Explorer) is the URL source of an AVI
   clip to play.
   
   LOWSRC < lowsrc > is the URL source of the low resolution image
   to display while the browser is loading the high resolution
   image (for speed in loading).
   
   ALT < alt > is the text to display in the event that the URL for
   the image is broken.
   
   USEMAP < usemap > is the name of a map that is created with the
   < MAP > tag of HTML.
   
   LOOP (Internet Explorer) will force continuous playing of the
   AVI clip.
   
   ALIGN < align > is used to align the image within the body content.
   Acceptable values are "top", "middle", "bottom", "texttop",
   "absmiddle","baseline" and "absbottom".
   
   START < start > (Internet Explorer) contains options for how to
   start the AVI clip.
   
   CONTROLS < controls > (Internet Explorer) is a URL pointing to an
   image used as the controls for the AVI player.
   
   BORDER < border > should be set to 0 to eliminate the hyperlink
   attribute around the image.
   
   ISMAP will send the coordinates of the mouse when clicked on
   the image.
   
   WIDTH < nWidth > is the width in pixels to display the image.
   If this argument is not used, then the width will default
   to the native width of the image.
   
   HEIGHT < nHeight > is the height in pixels to dislay the
   image. If this argument is not used, then the height will
   default to the native height of the image.
   
   HSPACE < nHSpace > is the number of pixels of space on the
   outside of the image on both the left and right side.
   
   VSPACE < nVSpace > is the number of pixels of space on the
   outside of the image on both the top and bottom.
   
   CARGO < xCargo > is any kind of data you wish to to add to the
   :cargo container of object created by this definition.
   
   PRE,PRETEXT < bcPreHTML > is a character string or a code block
   that returns a character string containing any HTML text
   that will precede the opening < table > tag in the source
   that is written.
   
   POST,POSTTEXT < bcPostHTML > is a character string or a code block
   that returns a character string containing any HTML text
   that will follow the closing < /table > tag in the source
   that is written.
   
   HIDE < bHide > is a code block that is evaluated at the
   time the :writeHtml() method is called for the class that
   supports this command.  If the code block returns a .TRUE.,
   then no HTML code will be written.
   
   EVAL < bEval > is a code block that is evaluated after the
   object is created in DC_ReadHtml().  A pointer to the
   object associated with this command is passed as an
   argument to the code block.
   
   ID < cId > is a unique identifier for this object.  This ID is used
   with functions like DC_GETOBJECT() to determine the status
   of a get object.
   
   TITLE < cTitle > is a title to assign to this object.  The title
   is not used in the HTML output but is simply a description of the
   get object which is saved in the GetList.
   
   GROUP < cGroup > is a "group" name (case-sensitive) to assign to
   this GetList object.  Assignment to a group makes it possible to
   perform operations only on GetList items which are members of a
   specified group.
   

Description:

   DCIMAGE is a command for creating HTML image elements.
   
   The command DCIMAGE creates an HTML element definition and
   adds the definition to the array named GETLIST which is later
   processed by the DC_READHTML() function or by the DCREAD HTML
   command.  The GETLIST array must be first declared and
   initialized to the value of {}.  The command DCREAD HTML
   creates all the DC_Html*() objects from the GetList array
   and then invokes the :writeHtml() method of the topmost
   parent object to generate the HTML code.
   
   A Getlist object remains stored as long as it is referenced
   in an array or by a variable.  The commands CLEAR and
   CLEAR GETS assign an empty array to the GetList variable.
   This also occurs after the completion of the DCREAD command
   if it is called without the SAVE option, causing all
   objects referenced by the GetList array to be released.
   

Notes:

   DCIMAGE creates an object of the DC_HtmlImage() class.
   

Examples:

   #include "dcdialog.ch"
   #include "dchtml.ch"
   
   FUNCTION Xtest()
   
   LOCAL i, GetList[0], cHtml, oTable
   
   DCTABLE OBJECT oTable ;
          ROWS 1 COLUMNS 2 BORDER 1
   
   @ 1,1 DCIMAGE SRC "http://donnay-software.com\graphics\donnay-logo.jpg" ;
           ALT 'Donnay Logo' PARENT oTable ;
           HEIGHT 100
   
   @ 1,2 DCIMAGE SRC "http://donnay-software.com\graphics\xb2net.gif" ;
           ALT 'XB2.NET Logo' PARENT oTable ;
         VSPACE 20 ;
         HSPACE 20
   
   DCREAD HTML TO cHtml
   
   MemoWrit('TEST.HTM',cHtml)
   
   RETURN cHtml
   

Source/Library:

  DCHTML.CH

See Also:

   DCREAD HTML
   dc_html()
   dc_readhtml()
   dc_htmlimage()



DCINPUT

A command for creating input elements for HTML forms

Syntax:

   @ [ < nRow >, < nCol > ] DCINPUT     ;
             [TYPE < ncType >]        ;
             [OBJECT < oInput >]      ;
             [PARENT < oParent >]     ;
             [PARENTID < cPID >]      ;
             [SRC,SOURCE < cSource >] ;
             [HEIGHT < nHeight >]     ;
             [WIDTH < nWidth >]       ;
             [MAXLENGTH < nMaxLength >] ;
             [CHECKED,SELECTED]     ;
             [VALUE < xValue >]       ;
             [LIST < aList >]         ;
             [TABINDEX < nTabIndex >] ;
             [ONFOCUS < cOnFocus >]   ;
             [ONBLUR < cOnBlur >]     ;
             [ONSELECT < cOnSelect >] ;
             [ONCHANGE < cOnChange >] ;
             [ONCLICK < cOnClick >]   ;
             [ACCEPT < cAccept >]     ;
             [ACCESSKEY < cAccessKey >] ;
             [CARGO < xCargo >]       ;
             [HIDE < bHide >]         ;
             [EVAL < bEval >]         ;
             [PRE,PRETEXT]          ;
             [POST,POSTTEXT]        ;
             [TITLE < cTitle >]       ;
             [ID < cId >]             ;
             [GROUP < cGroup >]       ;
   

Arguments:

   < nRow > and < nCol > are the row number and column number of
   the table if the parent of this object is a DCTABLE. The
   text will be inserted in the cell of the table defined by
   the row/column.
   
   OBJECT < oForm > is the name of the variable to assign as a
   storage place for this object.
   
   TYPE < ncType > is the type of input element to create:
   
   Type                           Description
   ------------------------------ ------------------------------
   DCHTML_INPUT_TEXT              Text similar to standard GET
     or "text"
   
   DCHTML_INPUT_PASSWORD          Text similar to standard GET
     or "password"                except asterisks mask input
   
   DCHTML_INPUT_CHECKBOX          Logical checkbox
     or 'checkbox'
   
   DCHTML_INPUT_RADIOBUTTON       Radio button
     or 'radio'
   
   DCHTML_INPUT_SUBMITBUTTON      Pushbutton to submit form
     or 'submit'
   
   DCHTML_INPUT_RESETBUTTON       Pushbutton to reset form
     or 'reset'
   
   DCHTML_INPUT_IMAGE             Clickable image (returns coords)
     or 'image'
   
   DCHTML_INPUT_HIDDEN            Hidden variable
     or 'hidden'
   
   DCHTML_INPUT_TEXTAREA          Memo text similar to MLE
     or 'textarea'
   
   DCHTML_INPUT_SELECT            Combo box
     or 'select'
   
   DCHTML_INPUT_BUTTON            Push button
     or 'button'
   
   DCHTML_INPUT_FILE              File Choose Dialog
     or 'file'
   
   CHECKED or SELECTED will be check or select the item.
   This applies only to "radio", "checkbox" or "select" items.
   
   MAXLENGTH < nMaxLength > is the maximum amount of text allowed
   to be input.  Applies to type "text", "password" and
   "textarea".
   
   SIZE < nSize > is the length (in characters) of type "text" or
   "password" items.
   
   WIDTH < nWidth > is the width (in characters) of type "textarea"
   
   HEIGHT < nHeight > is the height (in characters) of type
   "textarea"
   
   VALUE < xValue > is the current value of the item.  If the
   item is a "button", "reset" or "submit" then this will be
   the caption of the button.
   
   SRC < cSource > is the URL of the image if the type of input is
   an "image".
   
   LIST < aList > is an array of list items for inputs of type
   "select".
   
   ONFOCUS < cOnFocus > is a script to run when the item receives
   focus.
   
   ONBLUR < cOnBlur > is a script to run when the item loses focus.
   
   ONSELECT < cOnSelect > is a script to run when an item has been
   selected.
   
   ONCHANGE < cOnChange > is a script to run when an item has
   changed.
   
   ONCLICK < cOnClick > is a script to run when an item has
   been clicked with the mouse.
   
   TABINDEX < nTabIndex > is the order in the tab list for this
   item.
   
   ACCESSKEY < cAccessKey > assigns an access key to the item.
   An access key is a single character from the document
   character set.
   
   ACCEPT < cAccept > is the Content Type. (not normally used).
   
   PARENT < oParent > is the name of the variable that was
   assigned to the parent of this object. If this argument
   is not passed then the parent will be the object set with
   the DCSETPARENT command.
   
   PARENTID < cParentID > may be used in lieu of the PARENT < oParent >
   clause.  This identifies the ID of the parent instead of the
   parent's object variable name.
   
   CARGO < xCargo > is any kind of data you wish to to add to the
   :cargo container of object created by this definition.
   
   PRE,PRETEXT < bcPreHTML > is a character string or a code block
   that returns a character string containing any HTML text
   that will precede the opening < table > tag in the source
   that is written.
   
   POST,POSTTEXT < bcPostHTML > is a character string or a code block
   that returns a character string containing any HTML text
   that will follow the closing < /table > tag in the source
   that is written.
   
   HIDE < bHide > is a code block that is evaluated at the
   time the :writeHtml() method is called for the class that
   supports this command.  If the code block returns a .TRUE.,
   then no HTML code will be written.
   
   EVAL < bEval > is a code block that is evaluated after the
   object is created in DC_ReadHtml().  A pointer to the
   object associated with this command is passed as an
   argument to the code block.
   
   ID < cId > is a unique identifier for this object.  This ID is used
   with functions like DC_GETOBJECT() to determine the status
   of a get object.
   
   TITLE < cTitle > is a title to assign to this object.  The title
   is not used in the HTML output but is simply a description of the
   get object which is saved in the GetList.
   
   GROUP < cGroup > is a "group" name (case-sensitive) to assign to
   this GetList object.  Assignment to a group makes it possible to
   perform operations only on GetList items which are members of a
   specified group.
   

Description:

   DCINPUT is a command for creating input tags to be used
   in HTML forms.
   
   The command DCINPUT creates an HTML element definition and
   adds the definition to the array named GETLIST which is later
   processed by the DC_READHTML() function or by the DCREAD HTML
   command.  The GETLIST array must be first declared and
   initialized to the value of {}.  The command DCREAD HTML
   creates all the DC_Html*() objects from the GetList array
   and then invokes the :writeHtml() method of the topmost
   parent object to generate the HTML code.
   
   A Getlist object remains stored as long as it is referenced
   in an array or by a variable.  The commands CLEAR and
   CLEAR GETS assign an empty array to the GetList variable.
   This also occurs after the completion of the DCREAD command
   if it is called without the SAVE option, causing all
   objects referenced by the GetList array to be released.
   

Notes:

   DCINPUT creates an object of the DC_HtmlInput() class.
   

Examples:

   #include "dcdialog.ch"
   #include "dchtml.ch"
   
   FUNCTION Xtest()
   
   LOCAL i, GetList[0], oHtml, oTable, cHtml, aListItems, cUserId,
         cPassword, lCheck, oForm
   
   cUserId := Space(10)
   cPassword := ''
   lCheck := .t.
   aListItems := { 'Men','Women','Dogs','Cats','Mice','Turkeys' }
   
   DCFORM OBJECT oForm
   
   DCTABLE OBJECT oTable ROWS 10 COLUMNS 2 BORDER 1 PARENT oForm
   
   @ 1,1 DCSAY 'User ID' PARENT oTable
   @ 1,2 DCINPUT VALUE cUserId NAME 'Input.Type.Text' ;
         PARENT oTable MAXLENGTH 10
   
   @ 2,1 DCSAY 'Password' PARENT oTable
   @ 2,2 DCINPUT TYPE "password" VALUE cPassword ;
         NAME 'Input.Type.PassWord' PARENT oTable MAXLENGTH 10
   
   @ 3,1 DCSAY 'CheckBox' PARENT oTable
   @ 3,2 DCINPUT TYPE "checkbox" NAME 'Input.Type.CheckBox' ;
         VALUE lCheck CHECKED PARENT oTable
   
   @ 4,1 DCSAY 'Radio Buttons' PARENT oTable
   @ 4,2 DCINPUT TYPE "radio" VALUE 'M' NAME 'Input.Type.RadioButton' ;
         PARENT oTable POST 'Mint
' @ 4,2 DCINPUT TYPE "radio" VALUE 'E' NAME 'Input.Type.RadioButton' ; PARENT oTable POST 'Excellent
' @ 4,2 DCINPUT TYPE "radio" VALUE 'G' NAME 'Input.Type.RadioButton' ; CHECKED PARENT oTable POST 'Good
' @ 4,2 DCINPUT TYPE "radio" VALUE 'F' NAME 'Input.Type.RadioButton' ; PARENT oTable POST 'Fair
' @ 4,2 DCINPUT TYPE "radio" VALUE 'P' NAME 'Input.Type.RadioButton' ; PARENT oTable POST 'Poor
' @ 5,1 DCSAY 'Submit Button' PARENT oTable @ 5,2 DCINPUT TYPE "submit" VALUE 'Hit Me!' ; NAME 'Input.Type.Submit' PARENT oTable @ 6,1 DCSAY 'Reset Button' PARENT oTable @ 6,2 DCINPUT TYPE "reset" VALUE 'Reset Form!' ; NAME 'Input.Type.Reset' PARENT oTable @ 7,1 DCSAY 'Image' PARENT oTable @ 7,2 DCINPUT TYPE "image" SRC '\exp18\images\express2.gif' ; NAME 'Input.Type.Image' PARENT oTable @ 8,1 DCSAY 'ComboBox' PARENT oTable @ 8,2 DCINPUT TYPE "select" ; LIST aListItems ; NAME 'Input.Type.Select' PARENT oTable @ 9,1 DCSAY 'File' PARENT oTable @ 9,2 DCINPUT TYPE "file" ; SIZE 40 ; MAXLENGTH 100 ; NAME 'Input.Type.File' PARENT oTable @10,1 DCSAY 'Read Me' PARENT oTable @10,2 DCINPUT ; TYPE DCHTML_INPUT_TEXTAREA ; WIDTH 60 HEIGHT 20 ; NAME 'Input.Type.TextArea' ; VALUE {||MemoRead('\exp18\samples\html\readme.txt')} ; PARENT oTable DCREAD HTML TO cHtml MemoWrit('TEST.HTM',cHtml) RETURN cHtml

Source/Library:

  DCHTML.PRG

See Also:

   DCREAD HTML
   dc_htmlinput()
   dc_readhtml()



DCLDEBUG

Send debug information to a debugging Log File

Syntax:

    DCLDEBUG < xExpr1 > [ ; < xExprN > ]
   

Arguments:

   < xExpr1 > through < xExprN > is any expression.
   

Description:

    DCLDEBUG is used to send data to a log file when
    debugging GUI applications.
   
    A list of expressions may be included and the output of each
    expression will be displayed on a new line in the window.
   

Notes:

   DC_DebugQoutAppendBlock() is a get-set function used to setup
   additional information to append to each debug line.
   

Examples:

    #include "dcdialog.ch"
   
    USE COLLECT NEW SHARED
   
    DCLDEBUG Alias(), RecCount()
   

Source/Library:

  DCDIALOG.CH

See Also:

   DCQDEBUG
   DCLDEBUGOFF



DCLDEBUGOFF

Send debug information to a debugging Log File

Syntax:

    DCLDEBUGOFF < xExpr1 > [ ; < xExprN > ]
   

Arguments:

   < xExpr1 > through < xExprN > is any expression.
   

Description:

    DCLDEBUGOFF is used to send data to a log file when
    debugging GUI applications.
   
    A list of expressions may be included and the output of each
    expression will be displayed on a new line in the window.
   
    DCLDEBUGOFF is similar to DCLDEBUG except it will not
    echo the expression.
   

Notes:

   DC_DebugQoutAppendBlock() is a get-set function used to setup
   additional information to append to each debug line.
   

Examples:

    #include "dcdialog.ch"
   
    USE COLLECT NEW SHARED
   
    DCLDEBUGOFF Alias(), RecCount()
   

Source/Library:

  DCDIALOG.CH

See Also:

   DCQDEBUG
   DCLDEBUG



DCLDEBUGOFFQUIET

Send debug information to a debugging Log File

Syntax:

    DCLDEBUGOFFQUIET < xExpr1 > [ ; < xExprN > ]
   

Arguments:

   < xExpr1 > through < xExprN > is any expression.
   

Description:

    DCLDEBUGOFFQUIET is used to send data to a log file when
    debugging GUI applications.
   
    A list of expressions may be included and the output of each
    expression will be displayed on a new line in the window.
   
    DCLDEBUGOFFQUIET is similar to DCLDEBUG except it will not
    echo the expression or the callstack information.
   

Notes:

   DC_DebugQoutAppendBlock() is a get-set function used to setup
   additional information to append to each debug line.
   

Examples:

    #include "dcdialog.ch"
   
    USE COLLECT NEW SHARED
   
    DCLDEBUGOFFQUIET Alias(), RecCount()
   

Source/Library:

  DCDIALOG.CH

See Also:

   DCQDEBUG
   DCLDEBUG



DCLDEBUGQUIET

Send debug information to a debugging Log File

Syntax:

    DCLDEBUGQUIET < xExpr1 > [ ; < xExprN > ]
   

Arguments:

   < xExpr1 > through < xExprN > is any expression.
   

Description:

    DCLDEBUGQUIET is used to send data to a Log File when
    debugging GUI applications.
   
    A list of expressions may be included and the output of each
    expression will be displayed on a new line in the window.
   
    DCLDEBUGQUIET is similar to DCLDEBUG except it will not
    echo the callstack information.
   

Notes:

   DC_DebugQoutAppendBlock() is a get-set function used to setup
   additional information to append to each debug line.
   

Examples:

    #include "dcdialog.ch"
   
    USE COLLECT NEW SHARED
   
    DCLDEBUGQUIET Alias(), RecCount()
   

Source/Library:

  DCDIALOG.CH

See Also:

   DCQDEBUG
   DCLDEBUG



DCLIST

A command for creating lists in HTML

Syntax:

   @ [ < nRow >,< nCol > ] DCLIST       ;
             [TYPE < nType >]         ;
             [ITEMLIST < aList >]     ;
             [ITEMTYPE < nListType >] ;
             [STYLE,FONT < cStyle >]  ;
             [COMPACT]              ;
             [OBJECT < oList >]       ;
             [PARENT < oParent >]     ;
             [PARENTID < cPID >]      ;
             [CARGO < xCargo >]       ;
             [HIDE < bHide >]         ;
             [EVAL < bEval >]         ;
             [PRE,PRETEXT]          ;
             [POST,POSTTEXT]        ;
             [TITLE < cTitle >]       ;
             [ID < cId >]             ;
             [GROUP < cGroup >]       ;
   

Arguments:

   < nRow > and < nCol > are the row number and column number of
   the table if the parent of this object is a DCTABLE. The
   text will be inserted in the cell of the table defined by
   the row/column.
   
   TYPE < type > is the type of the list:
   
   "ul" or DCHTML_LIST_UNORDERED creates an unordered list.
   "ol" or DCHTML_LIST_ORDERED creates an ordered list.
   "dir" or DCHTML_LIST_DIRECTORY creates a directory list.
   "menu" or DCHTML_LIST_MENU creates a menu list.
   "dl" or DCHTML_LIST_DEFINITION creates a definition list.
   
   ITEMLIST < aList > is an array of items to be displayed in
   the list.  Each item must be a character string.  If no
   array of items is used then the list of items consists of
   child objects of the type DC_HtmlListItem() or DCLISTITEM.
   
   ITEMTYPE < nListType > is the type of each list item.  This
   has a different meaning for different types of lists.
   
   Ordered lists:
   
   "A" will order each item in capital letters.
   "a" will order each item in lower case letters.
   "I" wlll order each item in capital Roman numerals.
   "i" wlll order each item in lower case Roman numerals.
   "1" will order each item in Arabic numerals.
   
   Unordered, Directory, and Menu lists:
   
   "disc" will display a disc image in front of the item
   "circle" will display a circle image in front of the item
   "square" will display a square image in front of the item
   
   COMPACT will tell the browser to reduce the indentation
   and number of spaces between the sequence numbers and the
   list items, or both.
   
   STYLE < cStyle > is the style tag to wrap around the text.  For
   example STYLE "H3" will create the following source:
   < H3 >< bcText >< /H3 >.
   
   OBJECT < oList > is the name of the variable to assign as a
   storage place for this object.
   
   PARENT < oParent > is the name of the variable that was
   assigned to the parent of this object. If this argument
   is not passed then the parent will be the object set with
   the DCSETPARENT command.
   
   PARENTID < cParentID > may be used in lieu of the PARENT < oParent >
   clause.  This identifies the ID of the parent instead of the
   parent's object variable name.
   
   CARGO < xCargo > is any kind of data you wish to to add to the
   :cargo container of object created by this definition.
   
   PRE,PRETEXT < bcPreHTML > is a character string or a code block
   that returns a character string containing any HTML text
   that will precede the opening < table > tag in the source
   that is written.
   
   POST,POSTTEXT < bcPostHTML > is a character string or a code block
   that returns a character string containing any HTML text
   that will follow the closing < /table > tag in the source
   that is written.
   
   HIDE < bHide > is a code block that is evaluated at the
   time the :writeHtml() method is called for the class that
   supports this command.  If the code block returns a .TRUE.,
   then no HTML code will be written.
   
   EVAL < bEval > is a code block that is evaluated after the
   object is created in DC_ReadHtml().  A pointer to the
   object associated with this command is passed as an
   argument to the code block.
   
   ID < cId > is a unique identifier for this object.  This ID is used
   with functions like DC_GETOBJECT() to determine the status
   of a get object.
   
   TITLE < cTitle > is a title to assign to this object.  The title
   is not used in the HTML output but is simply a description of the
   get object which is saved in the GetList.
   
   GROUP < cGroup > is a "group" name (case-sensitive) to assign to
   this GetList object.  Assignment to a group makes it possible to
   perform operations only on GetList items which are members of a
   specified group.
   

Description:

   DCLIST is a command for creating HTML lists elements. The
   list type may be ordered, unordered, directory, menu or
   definition.
   
   The command DCLIST creates an HTML element definition and
   adds the definition to the array named GETLIST which is later
   processed by the DC_READHTML() function or by the DCREAD HTML
   command.  The GETLIST array must be first declared and
   initialized to the value of {}.  The command DCREAD HTML
   creates all the DC_Html*() objects from the GetList array
   and then invokes the :writeHtml() method of the topmost
   parent object to generate the HTML code.
   
   A Getlist object remains stored as long as it is referenced
   in an array or by a variable.  The commands CLEAR and
   CLEAR GETS assign an empty array to the GetList variable.
   This also occurs after the completion of the DCREAD command
   if it is called without the SAVE option, causing all
   objects referenced by the GetList array to be released.
   

Notes:

   DCLIST creates an object of the DC_HtmlList() class.
   

Examples:

   #include "dcdialog.ch"
   #include "dchtml.ch"
   
   FUNCTION Xtest()
   
   LOCAL i, GetList[0], oTable, cHtml, oList1, oList2, aListItems
   
   aListItems := { 'Men','Women','Dogs','Cats','Mice','Turkeys' }
   
   DCTABLE OBJECT oTable ROWS 1 COLUMNS 2
   
   @ 1, 1 DCLIST OBJECT oList1 ;
        TYPE 'ol' ;
        ITEMLIST aListItems ;
        ITEMTYPE 'i' ;
        PARENT oTable
   
   @ 1, 2 DCLIST OBJECT oList2 ;
        TYPE 'ul' ;
        PARENT oTable
   
   FOR i := 1 TO Len(aListItems)
     DCLISTITEM aListItems[i] ;
     PARENT oList2 ;
     TYPE 'circle'
   NEXT
   
   DCREAD HTML to cHtml
   
   MemoWrit('TEST.HTM',cHtml)
   
   RETURN cHtml
   

Source/Library:

  DCHTML.PRG

See Also:

   DCREAD HTML
   dc_htmllist
   dc_htmllistitem()
   dc_readhtml()



DCLISTITEM

A command for creating list items in HTML

Syntax:

   DCLISTITEM                       ;
             [TYPE < nType >]         ;
             [STYLE,FONT < cStyle >]  ;
             [OBJECT < oItem >]       ;
             [VALUE < value >]        ;
             [PARENT < oParent >]     ;
             [PARENTID < cPID >]      ;
             [CARGO < xCargo >]       ;
             [HIDE < bHide >]         ;
             [EVAL < bEval >]         ;
             [PRE,PRETEXT]          ;
             [POST,POSTTEXT]        ;
             [TITLE < cTitle >]       ;
             [ID < cId >]             ;
             [GROUP < cGroup >]       ;
   

Arguments:

   TYPE < nListType > is the type of each list item.  This
   has a different meaning for different types of lists.
   The type of list is defined by the DCLIST parent.
   
   Ordered lists:
   
   "A" will order each item in capital letters.
   "a" will order each item in lower case letters.
   "I" wlll order each item in capital Roman numerals.
   "i" wlll order each item in lower case Roman numerals.
   "1" will order each item in Arabic numerals.
   
   Unordered, Directory, and Menu lists:
   
   "disc" will display a disc image in front of the item
   "circle" will display a circle image in front of the item
   "square" will display a square image in front of the item
   
   STYLE < cStyle > is the style tag to wrap around the text.  For
   example STYLE "H3" will create the following source:
   < H3 >< bcText >< /H3 >.
   
   OBJECT < oItem > is the name of the variable to assign as a
   storage place for this object.
   
   PARENT < oParent > is the name of the variable that was
   assigned to the parent of this object. If this argument
   is not passed then the parent will be the object set with
   the DCSETPARENT command.
   
   PARENTID < cParentID > may be used in lieu of the PARENT < oParent >
   clause.  This identifies the ID of the parent instead of the
   parent's object variable name.
   
   CARGO < xCargo > is any kind of data you wish to to add to the
   :cargo container of object created by this definition.
   
   PRE,PRETEXT < bcPreHTML > is a character string or a code block
   that returns a character string containing any HTML text
   that will precede the opening < table > tag in the source
   that is written.
   
   POST,POSTTEXT < bcPostHTML > is a character string or a code block
   that returns a character string containing any HTML text
   that will follow the closing < /table > tag in the source
   that is written.
   
   HIDE < bHide > is a code block that is evaluated at the
   time the :writeHtml() method is called for the class that
   supports this command.  If the code block returns a .TRUE.,
   then no HTML code will be written.
   
   EVAL < bEval > is a code block that is evaluated after the
   object is created in DC_ReadHtml().  A pointer to the
   object associated with this command is passed as an
   argument to the code block.
   
   ID < cId > is a unique identifier for this object.  This ID is used
   with functions like DC_GETOBJECT() to determine the status
   of a get object.
   
   TITLE < cTitle > is a title to assign to this object.  The title
   is not used in the HTML output but is simply a description of the
   get object which is saved in the GetList.
   
   GROUP < cGroup > is a "group" name (case-sensitive) to assign to
   this GetList object.  Assignment to a group makes it possible to
   perform operations only on GetList items which are members of a
   specified group.
   
   VALUE < value > lets you change the number of a specific list
   item and those that follow it.  This is valid only for
   ordered lists.  Example < value > = 9 will change the order
   numbering to start at 9.
   

Description:

   DCLISTITEM is a command for creating HTML lists items to
   be added to a DCLIST parent.
   
   The command DCLISTITEM creates an HTML element definition and
   adds the definition to the array named GETLIST which is later
   processed by the DC_READHTML() function or by the DCREAD HTML
   command.  The GETLIST array must be first declared and
   initialized to the value of {}.  The command DCREAD HTML
   creates all the DC_Html*() objects from the GetList array
   and then invokes the :writeHtml() method of the topmost
   parent object to generate the HTML code.
   
   A Getlist object remains stored as long as it is referenced
   in an array or by a variable.  The commands CLEAR and
   CLEAR GETS assign an empty array to the GetList variable.
   This also occurs after the completion of the DCREAD command
   if it is called without the SAVE option, causing all
   objects referenced by the GetList array to be released.
   

Notes:

   DCLISTITEM creates an object of the DC_HtmlListItem() class.
   

Examples:

   #include "dcdialog.ch"
   #include "dchtml.ch"
   
   FUNCTION Xtest()
   
   LOCAL i, GetList[0], oTable, cHtml, oList1, oList2, aListItems
   
   aListItems := { 'Men','Women','Dogs','Cats','Mice','Turkeys' }
   
   DCTABLE OBJECT oTable ROWS 1 COLUMNS 2
   
   @ 1, 1 DCLIST OBJECT oList1 ;
        TYPE 'ol' ;
        ITEMLIST aListItems ;
        ITEMTYPE 'i' ;
        PARENT oTable
   
   @ 1, 2 DCLIST OBJECT oList2 ;
        TYPE 'ul' ;
        PARENT oTable
   
   FOR i := 1 TO Len(aListItems)
     DCLISTITEM aListItems[i] ;
     PARENT oList2 ;
     TYPE 'circle'
   NEXT
   
   DCREAD HTML to cHtml
   
   MemoWrit('TEST.HTM',cHtml)
   
   RETURN cHtml
   

Source/Library:

  DCHTML.PRG

See Also:

   DCREAD HTML
   dc_htmllist
   dc_htmllistitem()
   dc_readhtml()



DCMENUBAR

Create a MENUBAR object for displaying with Text/GUI reader

Syntax:

   DCMENUBAR < oMenuBar > ;
       [PARENT < oParent >] ;
       [PARENTID < cParentId >] ;
       [PREEVAL < bPreEval >] ;
       [EVAL < bEval >] ;
       [TITLE < cTitle >] ;
       [CARGO < xCargo >] ;
       [ID < cId >] ;
       [TITLE < cTitle >] ;
       [GROUP < cGroup >]
   

Arguments:

   < oMenuBar > is the name of the variable to assign as a storage
   place for the menu bar.
   
   PARENT < oParent > is the name of the variable that was
   assigned to the parent DIALOG for this MenuBar.
   
   PARENTID < cParentID > may be used in lieu of the PARENT < oParent >
   clause.  This identifies the ID of the parent instead of the
   parent's object variable name.
   
   PREEVAL < bPreEval > is a code block to be evaluated by the GUI
   reader before the Xbase Parts object is created.  The object is
   passed to the code block.
   
   EVAL < bEval > is a code block to be evaluated by the GUI reader
   after the Xbase Parts object is created.  The object is passed
   to the code block.
   
   CARGO < xCargo > is any kind of data you wish to to add to the
   :cargo container for this object.  The cargo may be accessed
   at any time via the :cargo exported variable, however it will not
   be stored in the same manner it is entered.  The :cargo container
   of DCDIALOG objects is an array of at least three elements:
   
    [1] - A numeric value that is a pointer to the Getlist array
          for this object.
   
    [2] - A pointer to the GetList array.
   
    [3] - The value of < xCargo >.
   
    [4] and up - optional values added by the GUI reader.
   
   ID < cId > is a unique identifier for this object.  This ID is used
   with functions like DC_GETORIGUPDATED() to determine the status
   of a get object.
   
   TITLE < cTitle > is a title to assign to this object.  The title
   is not displayed on the screen but is simply a description of the
   get object which is saved in the GetList.
   
   GROUP < cGroup > is a "group" name (case-sensitive) to assign to
   this GetList object.  Assignment to a group makes it possible to
   perform operations only on GetList items which are members of a
   specified group, using functions such as DC_GetRefresh() or
   DC_ReadGui().
   

Description:

    The command DCMENUBAR creates a new MenuBar object and
    adds the object to the array named GETLIST which is later
    processed by the DC_READGUI() function or by the DCREAD GUI
    command.  The GETLIST array must be first declared and
    initialized to the value of {}.  The command DCREAD GUI activates
    the edit mode for all objects found in the GetList array.
    A Getlist object remains stored as long as it is referenced
    in an array or by a variable.  The commands CLEAR and
    CLEAR GETS assign an empty array to the GetList variable.
    This also occurs after the completion of the DCREAD command
    if it is called without the SAVE option, causing all Get
    objects referenced by the GetList array to be released.
   
    DCMENUBAR is used with the DCSUBMENU command to add pull-down
    menus to MenuBar.
   
    DCMENUBAR objects can be combined with any objects that
    that use the DCDIALOG system, such as @..DCSAY..GET,
    @..DCRADIO, @..DCPUSHBUTTON, @..DCMULTILINE, DCTOOBAR, etc.
   

Notes:

    The object created by DCMENUBAR is an object of the
    XbpMenuBar() class, therefore it can be manipulated with
    any iVar or method supported by XbpMenuBar().
   

Examples:

   /*
   This example displays a dialogue box with two tab pages
   and a menu with 3 submenus:  File, Edit, Util.
   */
   
   #include "dcdialog.ch"
   #include "appevent.ch"
   
   PROCEDURE Xtest()
   
   LOCAL GetList := {}, oFileMenu, oMenuBar, oEditMenu, oMemo, oUtilMenu, ;
         cMemo
   
   USE COLLECT
   
   cMemo := COLLECT->memo
   
   @ 0,0 DCMULTILINE cMemo SIZE 70,7 FONT "10.Courier.Bold"
   
   
   /* ---- Menu ---- */
   
   DCMENUBAR oMenuBar
   
   DCSUBMENU oFileMenu PROMPT "&File" PARENT oMenuBar
   
   DCMENUITEM "&Open a File" PARENT oFileMenu ;
               ACTION {||Msgbox('OpenFile')} ;
   
   DCMENUITEM "&Close File" PARENT oFileMenu ;
               ACTION {||Msgbox('CloseFile')}
   
   DCMENUITEM "&Pack File" PARENT oFileMenu ;
               ACTION {||Msgbox('Packfile')}
   
   DCSUBMENU oEditMenu PROMPT "&Edit" PARENT oMenuBar
   
   DCMENUITEM "&Next Record" PARENT oEditMenu ;
               ACTION {||dbSkip(), ;
                         cMemo := COLLECT->memo,;
                         DC_GetRefresh(GetList)} ;
               ACCELKEY xbeK_ALT_N ;
               WHEN {||!Eof()}
   
   DCMENUITEM "&Previous Record" PARENT oEditMenu ;
               ACTION {||dbSkip(-1), ;
                         cMemo := COLLECT->memo,;
                         DC_GetRefresh(GetList)} ;
               ACCELKEY xbeK_ALT_P ;
               WHEN {||!Bof()}
   
   DCMENUITEM "&Top of File" PARENT oEditMenu ;
               ACTION {||dbGoTop(), ;
                         cMemo := COLLECT->memo,;
                         DC_GetRefresh(GetList)} ;
               ACCELKEY xbeK_ALT_T
   
   DCMENUITEM "&Bottom of File" PARENT oEditMenu ;
               ACTION {||dbGoBottom(), ;
                         cMemo := COLLECT->memo, ;
                         DC_GetRefresh(GetList)} ;
               ACCELKEY xbeK_ALT_B
   
   DCSUBMENU oUtilMenu PROMPT "&Util" PARENT oMenuBar
   
   DCMENUITEM "Copy File" PARENT oUtilMenu ;
               ACTION {||Msgbox('CopyFile')}
   
   DCMENUITEM "Move File" PARENT oUtilMenu ;
               ACTION {||Msgbox('MoveFile')}
   
   DCREAD GUI ;
      TITLE 'Menu Demo' ;
      FIT ;
      ADDBUTTONS
   
   RETURN
   

Source/Library:

  DCDIALOG.CH

DCMENUITEM

Add Item to SUBMENU object for displaying with Text/GUI reader

Syntax:

   DCMENUITEM < cPrompt > ;
       [PARENT < oParent >] ;
       [PARENTID < cParentId >] ;
       [CHECKED] ;
       [CHECKWHEN < bCheckWhen >] ;
       [SEPARATOR] ;
       [STYLE < nStyle >] ;
       [ATTRIBUTE < nAttr >] ;
       [WHEN < bWhen >] ;
       [ACCELKEY < nAccelKey >] ;
       [ACTION < bAction >] ;
       [HELPCODE < cHelpCode >] ;
       [CARGO < xCargo >] ;
       [ID < cId >] ;
       [PRESENTATION < aPres >] ;
       [PREEVAL < bPreEval >] ;
       [EVAL < bEval >] ;
       [ID < cId >] ;
       [TITLE < cTitle >] ;
       [GROUP < cGroup >] ;
       [MESSAGE < cbMsg > [INTO < oMsgBox >]] ;
       [LOCK < cLock >] ;
       [PROTECT < bProtect >] ;
       [BITMAP < nBmUnChecked > [, < nBmChecked >] ]                   ;
   

Arguments:

   PROMPT < cPrompt > is the caption to assign to this menu item.
   The caption may be a character string, a resource number for
   a bitmap, another XbpMenu() object, an XbpBitMap() object or a
   NIL (for separator bars).  If the caption is a character string,
   it may include a Tilde (~) character to define the hot-key for
   the item like so: "Save ~Changes".
   
   ACTION < bAction > is a code block that gets evaluated when
   the menu item is selected.
   
   PARENT < oParent > is the name of the variable that was
   assigned to the parent SubMenu for this Menu Item.
   
   PARENTID < cParentID > may be used in lieu of the PARENT < oParent >
   clause.  This identifies the ID of the parent instead of the
   parent's object variable name.
   
   INDEX < nIndex > is a variable name to store the index number
   that is assigned to this item when it is created.
   
   CHECKED will cause a check mark to appear next to the menu
   item.  This option is ignored if a < nAttr > parameter is used.
   
   CHECKWHEN < bWhen > is a code block that is evaluated in the event
   loop. This code block must return a logical value.  If the value
   returned is .FALSE. then the item will be unchecked. If the
   value returned is .TRUE. then the item will be checked. The
   parent DCSUBMENU object is passed as a parameter to the code
   block.
   
   SEPARATOR is used only if this is a menu separator bar rather
   than a selectable item.  Do not include a PROMPT.  All other
   parameters are ignored.  This option is ignored if a < nStyle >
   parameter is used.
   
   STYLE < nStyle > is a list of XBPMENUBAR_MIS_* numbers defined
   in XBP.CH.  These options are summed together.
   
   ATTRIBUTE < nAttr > is a list of XBPMENUBAR_MIA_* numbers defined
   in XBP.CH.  These options are summed together.
   
     XBPMENUBAR_MIA_NODISMISS  Menu is not closed after selection
     XBPMENUBAR_MIA_FRAMED     Menu item is framed
     XBPMENUBAR_MIA_CHECKED    Menu item has a check mark
     XBPMENUBAR_MIA_DISABLED   Menu item is not available
     XBPMENUBAR_MIA_HILITED    Menu item is displayed highlighted
   
   HELPCODE < cHelp > is a character string that is passed to the
   DC_HelpF1() function if F1 is pressed when the mouse is placed
   over the menu item.  The help code is used by the Help system to
   for specific context-help.
   
   PRESENTATION < aPres > is a two-dimensional array. If specified,
   this contains presentation parameters for the Button object.
   The first column of the array must contain #define constants
   from the XBP.CH file starting with the prefix XBP_PP_. These
   constants define the presentation parameters that can be set
   for the object and include colors and fonts. The second column
   of the array in < aPres > contains the value for each setting.
   These are also generally set using #define constants from the
   GRA.CH file.
   
   WHEN < bWhen > is a code block that is evaluated in the event loop.
   This code block must return a logical value.  If the value
   returned is .FALSE. then the item will be disabled and grayed.
   If the value returned is .TRUE. then the item will be enabled.
   The parent DCSUBMENU object is passed as a parameter to the
   code block.
   
   LOCK < cLock > is a 5-character string identifying a LOCK that
   is applied to this Menu Item.  Logged on users are given keys
   to locks.  See DC_UserMaint().
   
   ID < cID > is a unique 8-character ID to assign to this menu
   item.  This is used to allow users to assign a menu item as
   "default" by pressing a special key.
   
   PREEVAL < bPreEval > is a code block to be evaluated by the GUI
   reader before the Xbase Parts object is created.  The object is
   passed to the code block.
   
   EVAL < bEval > is a code block to be evaluated by the GUI reader
   after the Xbase Parts object is created.  The object is passed
   to the code block.
   
   CARGO < xCargo > is any kind of data you wish to to add to the
   :cargo container for this object.  The cargo may be accessed
   at any time via the :cargo exported variable, however it will not
   be stored in the same manner it is entered.  The :cargo container
   of DCDIALOG objects is an array of at least three elements:
   
    [1] - A numeric value that is a pointer to the Getlist array
          for this object.
   
    [2] - A pointer to the GetList array.
   
    [3] - The value of < xCargo >.
   
    [4] and up - optional values added by the GUI reader..
   
   ID < cId > is a unique identifier for this object.  This ID is used
   with functions like DC_GETORIGUPDATED() to determine the status
   of a get object.
   
   TITLE < cTitle > is a title to assign to this object.  The title
   is not displayed on the screen but is simply a description of the
   get object which is saved in the GetList.
   
   ACCELKEY < nAccelKey > is a numeric "hot-key" assignment that will
   activate the menu item when the hot-key is pressed.  The key
   must be a valid key with the prefix xbeK_*.  These keys are
   defined in APPEVENT.CH.
   
   GROUP < cGroup > is a "group" name (case-sensitive) to assign to
   this GetList object.  Assignment to a group makes it possible to
   perform operations only on GetList items which are members of a
   specified group, using functions such as DC_GetRefresh() or
   DC_ReadGui().
   
   MESSAGE < bcMsg > is the message you want to display in the
   message area of the dialogue screen defined by the DCMESSAGEBOX
   command when the mouse is passed over the menu item.  Optionally,
   INTO < oMsgBox > will designate which message box to display the
   message into. If the INTO clause is not used, then the last
   message box in the GetList is the default.  < oMsgBox > may also
   be any object that supports the :setCaption() method.  < bcMsg >
   may be a code block that returns a character value.
   
   LOCK < cLock > is a lock code to assign to this menu item. Lock
   codes are any character string up to 5 characters in length.
   To gain access to a menu item, a logged on user must own a key
   of the same name as the lock or a master key to the lock.  The
   function DC_ReadGuiMenuAccess() must be called prior to calling
   DC_ReadGui() or using any DCREAD GUI command in which the Getlist
   contains menu items with locks.  DC_ReadGuiMenuAccess() is passed
   a comma-delimited character string containing the set of keys
   owned by the logged on user.  In a typical application, this
   function should be called immediately after the logon of a new
   user and the users predefined keylist passed to the function.
   
    Example: DC_ReadGuiMenuAccess('ABC,K*,XY*')
    This key list will allow access to any menu items that have
    no locks or to menu items locked with 'ABC', 'K*' or 'XY*'
    To give access to all menu locks assign the key "*****'.
   
   If a menu item is locked and the user does not own a key, the
   menu item will not be displayed in the menu.
   
   PROTECT < bProtect > is a code block to evaluate which protects
   this menu item.  The code block must return a logical value.  If
   the value returned is .TRUE. then the menu item will not be
   included in the menu.
   
   BITMAP is used to define a bitmap that will be displayed to the
   left of the menu item prompt.  < nBmUnChecked > and < nBmChecked >
   are the numerical resource numbers of bitmaps that have been
   linked into the .EXE and define the bitmaps to be used when the
   menu items is checked and unchecked respectively.  If only one
   argument is passed then that bitmap will be used for both
   checked and unchecked items.
   
     NOTE: This clause will not function if the menuitem is at
           any level lower than a child of a main submenu.  For
           example, menuitems that are children of sub-sub-menus
           cannot have a bitmap.
   

Description:

    The command DCMENUITEM creates a new Menu Item object and
    adds the object to the array named GETLIST which is later
    processed by the DC_READGUI() function or by the DCREAD GUI
    command.  The GETLIST array must be first declared and
    initialized to the value of {}.  The command DCREAD GUI activates
    the edit mode for all objects found in the GetList array.
    A Getlist object remains stored as long as it is referenced
    in an array or by a variable.  The commands CLEAR and
    CLEAR GETS assign an empty array to the GetList variable.
    This also occurs after the completion of the DCREAD command
    if it is called without the SAVE option, causing all Get
    objects referenced by the GetList array to be released.
   
    DCMENUITEM is used with the DCSUBMENU command to add menu
    items to a pull-down menu.
   

Notes:

    The object created by DCMENUITEM is an object of the
    XbpMenu() class, therefore it can be manipulated with
    any iVar or method supported by XbpMenu().
   

Examples:

   /*
   This example displays a dialogue box with two tab pages
   and a menu with 3 submenus:  File, Edit, Util.
   */
   
   #include "dcdialog.ch"
   #include "appevent.ch"
   
   PROCEDURE Xtest()
   
   LOCAL GetList := {}, oFileMenu, oMenuBar, oEditMenu, oMemo, oUtilMenu, ;
         cMemo
   
   USE COLLECT
   
   cMemo := COLLECT->memo
   
   @ 0,0 DCMULTILINE cMemo SIZE 70,7 FONT "10.Courier.Bold"
   
   
   /* ---- Menu ---- */
   
   DCMENUBAR oMenuBar
   
   DCSUBMENU oFileMenu PROMPT "&File" PARENT oMenuBar
   
   DCMENUITEM "&Open a File" PARENT oFileMenu ;
               ACTION {||Msgbox('OpenFile')} ;
   
   DCMENUITEM "&Close File" PARENT oFileMenu ;
               ACTION {||Msgbox('CloseFile')}
   
   DCMENUITEM "&Pack File" PARENT oFileMenu ;
               ACTION {||Msgbox('Packfile')}
   
   DCSUBMENU oEditMenu PROMPT "&Edit" PARENT oMenuBar
   
   DCMENUITEM "&Next Record" PARENT oEditMenu ;
               ACTION {||dbSkip(), ;
                         cMemo := COLLECT->memo,;
                         DC_GetRefresh(GetList)} ;
               ACCELKEY xbeK_ALT_N ;
               WHEN {||!Eof()}
   
   DCMENUITEM "&Previous Record" PARENT oEditMenu ;
               ACTION {||dbSkip(-1), ;
                         cMemo := COLLECT->memo,;
                         DC_GetRefresh(GetList)} ;
               ACCELKEY xbeK_ALT_P ;
               WHEN {||!Bof()}
   
   DCMENUITEM "&Top of File" PARENT oEditMenu ;
               ACTION {||dbGoTop(), ;
                         cMemo := COLLECT->memo,;
                         DC_GetRefresh(GetList)} ;
               ACCELKEY xbeK_ALT_T
   
   DCMENUITEM "&Bottom of File" PARENT oEditMenu ;
               ACTION {||dbGoBottom(), ;
                         cMemo := COLLECT->memo, ;
                         DC_GetRefresh(GetList)} ;
               ACCELKEY xbeK_ALT_B
   
   DCSUBMENU oUtilMenu PROMPT "&Util" PARENT oMenuBar
   
   DCMENUITEM "Copy File" PARENT oUtilMenu ;
               ACTION {||Msgbox('CopyFile')}
   
   DCMENUITEM "Move File" PARENT oUtilMenu ;
               ACTION {||Msgbox('MoveFile')}
   
   DCREAD GUI ;
      TITLE 'Menu Demo' ;
      FIT ;
      ADDBUTTONS
   
   RETURN
   

Source/Library:

  DCDIALOG.CH

See Also:

   DCSUBMENU
   dc_readguimenuaccess()



DCMSGBOX

Display an array of messages in a window

Syntax:

   DCMSGBOX < list,... >              ;
            [TITLE < cTitle >]        ;
            [TIMEOUT < nSeconds >]    ;
            [YESNO]                 ;
            [TO < lOutput >]          ;
            [FONT < cFont >]          ;
            [BUTTONS < aButtons >]    ;
            [CHOICE @< nChoice >]     ;
            [EVAL < bEval >]
   

Arguments:

   < list,... > is a comma-delimited list of message lines.
   
   TITLE < cTitle > is the title to place at the top of the message
   box.
   
   TIMEOUT < nSeconds > will display the box for a specified number
   of seconds or until a key is hit.
   
   YESNO will display YES / NO menu items below the message text.
   
   CHOICE @< nChoice > : 1 will default to YES (default),  2 will
   default to NO.  If passed by reference and an array of < aButtons >
   is also passed, then the value returned will be equivalent to
   the menu item selected.
   
   BUTTONS < aButtons > - An array of menu items to choose from.  The
   number of the selected item will be returned in the < @nChoice >
   variable.
   
   TO < lOutput > is a logical variable to store the result of the
   message box when using the YESNO clause.  If the operator selects
   YES then < lOutput > will be .TRUE., otherwise it will be .FALSE.
   
   HOTKEY @< cHotKey > - An optional parameter to return the value of
   the high-lighted letter in the selected menu item when using
   DCMSGBOX with an array of menu buttons.  This must be a variable,
   passed by reference, in which to store a character value.
   
   FONT < cFont > is the font to use for the message text.  This must
   conform to standard font declarations used with the
   :setFontCompoundName() method of XbpStatic().
   
   EVAL < bEval > is a code block to evaluate after the Message box
   is created.  The Messsage box dialog object is passed to the
   code block.
   

Description:

    DCMSGBOX is used to display a set of message lines in a
    window.  This command is an easy-to-use front end to the
    function DC_MsgBox().
   

Examples:

   // Example 1
   
    PROCEDURE Xtest( )
   
    DCMSGBOX ;
     'This selection will permanently remove all', ;
     'deleted records.  Continue?' ;
     YESNO ;
     FONT '12.Arial Bold' ;
     TO lOk
   
    IF lOk
      PACK
    ENDIF
   
    RETURN
   
   
   // Example 2
   
   FUNCTION Xtest2()
   
   LOCAL nChoice := 2
   
   DCMSGBOX 'There was an error when trying to',    ;
            'save the file to disk',                ;
            'Please choose a corrective action.'    ;
            TITLE "Save Error!"                     ;
            FONT "10.Arial Bold"                    ;
            BUTTONS {'~Quit the Program',           ;
                     '~Format the Hard Drive',      ;
                     '~Get a beer'}                 ;
            CHOICE @nChoice
   
   IF nChoice = 1
     QUIT
   ELSEIF nChoice = 2
     // pray
   ELSEIF nChoice = 3
     DCMSGBOX "I will meet you a O'Learys"
   ENDIF
   
   RETURN nil
   

Source/Library:

  DCDIALOG.CH

See Also:

   dc_alert()
   dc_menupull()
   dc_msgbox()



DCPRINT ?/??

Send text to printer using ?/?? style printing

Syntax:

   DCPRINT ? | ?? < uText > ;
      [PRINTER < oPrinter >] ;
      [WHEN < bWhen >]
   

Arguments:

   < uText > is any variable.
   
   PRINTER < oPrinter > is the printer object returned by the
   DCPRINT ON command or the DC_Printer() class.  If this clause
   is not used then the printer object referenced by
   DC_PrinterObject() is the default.
   
   WHEN < bWhen > is a condition codeblock that is evaluated before
   the command is executed during previewing and printing from
   preview.  The DC_Printer() object is passed to the code block.
   The code block must return a logical .TRUE. to enable the command.
   

Description:

    DCPRINT ? prints text at the start column of the next row
    after the current print row.
   
    DCPRINT ?? prints text at the current row/column.
   

Notes:

    The DCPRINT ?/?? command uses the :Qout()/:QQout() methods
    of the printer object.  This method looks at the current
    ::nPage instance variable and compares it to the ::nFrom
    value and the ::nTo value.  If the current page is outside
    the range selected by the user, then no output will be sent
    to the printer.
   

Examples:

   #include 'dcprint.ch'
   
   PROCEDURE XTest( lPreview )
   
   LOCAL nRow, cScrn, aFor_Sale, cFontName, oPrinter, i
   
   lPreview := IIF( Valtype(lPreview)='L',lPreview,.t.)
   
   USE collect NEW
   GO TOP
   
   aFor_Sale := { 'No','Yes','Not Sure' }
   
   BEGIN SEQUENCE
   
   IF lPreview
     DCPRINT ON SIZE 50,90 FONT '9.Terminal' TO oPrinter PREVIEW
   ELSE
     DCPRINT ON SIZE 50,90 FONT '9.Terminal' TO oPrinter
   ENDIF
   
   IF Valtype(oPrinter) # 'O' .OR. !oPrinter:lActive
     BREAK
   ENDIF
   
   cFontName := oPrinter:GetFontCompoundName()
   
   IF !lPreview
     cScrn := DC_WaitOn('Printing..')
   ENDIF
   
   FOR i := 1 TO oPrinter:nCopies
   
     GO TOP
     nRow := 1
     oPrinter:nPage := 1
     DO WHILE !Eof()
   
       IF nRow = 1
   
         DCPRINT FONT '14.Arial.Bold'
   
         DCPRINT ? 'My Personal Collection Inventory       '
         DCPRINT ?? 'Page ' + Alltrim(Str(oPrinter:nPage))
         DCPRINT ?? '    '
         DCPRINT ?? Date()
         DCPRINT ?
   
         nRow += 2
   
         DCPRINT FONT '12.Arial.Bold'
   
         DCPRINT ? Pad('Description',35)
         DCPRINT ?? Pad('Type',15)
         DCPRINT ?? Pad('Sub-Type',15)
         DCPRINT ?? Pad('Cond',6)
         DCPRINT ?? Pad('For Sale?',11)
         DCPRINT ?? 'Value'
         DCPRINT ?
   
         nRow += 2
   
         DCPRINT FONT cFontName
   
       ELSE
   
         DCPRINT ? Pad(COLLECT->descrip,35)
         DCPRINT ?? Pad(COLLECT->type,15)
         DCPRINT ?? Pad(COLLECT->sub_type,15)
         DCPRINT ?? Pad(COLLECT->condition,6)
         DCPRINT ?? Pad(aFor_Sale[COLLECT->for_sale+1],11)
         DCPRINT ?? Str(COLLECT->appr_value,7,2)
         nRow++
   
         SKIP
   
         IF nRow > ( oPrinter:nRows - 5 )
           DCPRINT EJECT
           nRow := 1
         ENDIF
   
       ENDIF
   
     ENDDO
   
   NEXT
   
   END SEQUENCE
   
   DCPRINT OFF
   
   IF !lPreview
     DC_Impl(cScrn)
   ENDIF
   
   CLOSE
   RETURN
   

Source/Library:

  DCPRINT.CH

See Also:

   dc_printer()



DCPRINT ABORT

Abort the print job

Syntax:

   DCPRINT ABORT ;
     [PRINTER < oPrinter >]
   

Arguments:

   PRINTER < oPrinter > is the printer object returned by the
   DCPRINT ON command or the DC_Printer() class.  If this clause
   is not used then the printer object referenced by
   DC_PrinterObject() is the default. .
   

Description:

    DCPRINT ABORT is used to abort a print job before it gets sent
    to the printer.  This command must be called before the
    DCPRINT OFF command to insure that the print is properly
    aborted.
   

Notes:

    The :Eject() method looks at the current ::nPage instance
    variable and compares it to ::nFrom and ::nTo.  If the
    current page is outside the range selected by the user
    then the page will not be ejected and only the ::nPage
    instance variable will be incremented.
   

Examples:

   #include "dcprint.ch"
   #include "inkey.ch"
   
   PROCEDURE XTest( lPreview )
   
   LOCAL aFor_Sale, oPrinter, i, nLineCount, cMemo, cMemoLine, cScrn
   
   lPreview := IIF( Valtype(lPreview)='L',lPreview,.t.)
   
   USE collect NEW
   
   aFor_Sale := { 'No','Yes','Not Sure' }
   
   BEGIN SEQUENCE
   
   IF lPreview
     DCPRINT ON SIZE 60,100 TO oPrinter FONT '12.Courier' PREVIEW
   ELSE
     DCPRINT ON SIZE 60,100 TO oPrinter FONT '12.Courier'
   ENDIF
   
   IF Valtype(oPrinter) # 'O' .OR. !oPrinter:lActive
     BREAK
   ENDIF
   
   DC_Gui(.t.)
   
   IF !lPreview
     cScrn := DC_WaitOn()
   ENDIF
   
   DO WHILE !Eof() .AND. DC_PrinterOk() .AND. Inkey(.1) # K_ESC
   
     @ 2,0,20,45 DCPRINT BITMAP COLLECT->bitmap1
     @ 2,50,20,95 DCPRINT BITMAP COLLECT->bitmap2
   
     DCPRINT FONT '12.Courier'
   
     @ 23, 5, 37, 90 DCPRINT BOX
   
     @ 24,10 DCPRINT SAY '    Description:'
     @ 25,10 DCPRINT SAY '           Type:'
     @ 26,10 DCPRINT SAY '       Sub-Type:'
     @ 27,10 DCPRINT SAY '      Condition:'
     @ 28,10 DCPRINT SAY '       Location:'
     @ 29,10 DCPRINT SAY '      For Sale?:'
     @ 30,10 DCPRINT SAY '  Original Date:'
     @ 31,10 DCPRINT SAY '  Acquired Date:'
     @ 32,10 DCPRINT SAY ' Original Price:'
     @ 33,10 DCPRINT SAY 'Appraised Value:'
     @ 34,10 DCPRINT SAY '       Comments:'
     @ 35,10 DCPRINT SAY '      Bit Map 1:'
     @ 36,10 DCPRINT SAY '      Bit Map 2:'
   
     DCPRINT FONT '14.Terminal'
   
     @ 24,32 DCPRINT SAY COLLECT->descrip
     @ 25,32 DCPRINT SAY COLLECT->type
     @ 26,32 DCPRINT SAY COLLECT->sub_type
     @ 27,32 DCPRINT SAY COLLECT->condition
     @ 28,32 DCPRINT SAY COLLECT->location
     @ 29,32 DCPRINT SAY aFor_Sale[COLLECT->for_sale+1]
     @ 30,32 DCPRINT SAY COLLECT->date_orig
     @ 31,32 DCPRINT SAY COLLECT->date_acqu
     @ 32,32 DCPRINT SAY COLLECT->orig_price
     @ 33,32 DCPRINT SAY COLLECT->appr_value
     @ 34,32 DCPRINT SAY COLLECT->comments
     @ 35,32 DCPRINT SAY COLLECT->bitmap1
     @ 36,32 DCPRINT SAY COLLECT->bitmap2
   
     DCPRINT FONT '12.Arial'
   
     cMemo := Alltrim(COLLECT->memo)
     nLineCount := MLCount(cMemo)
     FOR i := 1 TO nLineCount - 1
       cMemoLine := MemoLine( cMemo, nil, i )
       IF Empty(cMemoLine)
         EXIT
       ENDIF
       @ 40+i,10 DCPRINT SAY cMemoLine
     NEXT
   
     DCPRINT EJECT
   
     SKIP
   
   ENDDO
   
   IF LastKey() = K_ESC
     DCPRINT ABORT
   ENDIF
   
   IF !lPreview
     DC_Impl(cScrn)
   ENDIF
   
   END SEQUENCE
   
   DCPRINT OFF
   
   RETURN
   

Source/Library:

  DCPRINT.CH

See Also:

   dc_printer()



DCPRINT ATTRIBUTE

Set the Attributes for printing with DCPRINT commands

Syntax:

   DCPRINT ATTRIBUTE ;
     [PRINTER < oPrinter >]  ;
     [TEXT | STRING < aString >] ;
     [LINE < aLine > ] ;
     [AREA < aArea > ] ;
     [MARKER < aMarker >] ;
     [WHEN < bWhen >]
   

Arguments:

   < ocFont > is a character string containing the Compound Font
   Name or a Font object.
   
   PRINTER < oPrinter > is the printer object returned by the
   DCPRINT ON command or the DC_Printer() class.  If this clause
   is not used then the printer object referenced by
   DC_PrinterObject() is the default.
   
   TEXT | STRING < aString > is an attribute array that meets the
   specification for string attributes used by @ DCPRINT SAY.  See
   the Alaska documentation for GraSetAttrString() for more
   information about the specification for this array.
   
   LINE < aLine > is an attribute array that meets the
   specification for line attributes used by @ DCPRINT BOX.  See
   the Alaska documentation for GraSetAttrLine() for more
   information about the specification for this array.
   
   AREA < aArea > is an attribute array that meets the
   specification for area attributes used by @ DCPRINT BOX.  See
   the Alaska documentation for GraSetAttrArea() for more
   information about the specification for this array.
   
   MARKER < aMarker > is an attribute array that meets the
   specification for line attributes used by @ DCPRINT MARKER.  See
   the Alaska documentation for GraSetAttrMarker() for more
   information about the specification for this array.
   
   WHEN < bWhen > is a condition codeblock that is evaluated before
   the command is executed during previewing and printing from
   preview.  The DC_Printer() object is passed to the code block.
   The code block must return a logical .TRUE. to enable the command.
   

Description:

    DCPRINT ATTRIBUTE is used to set the attributes for use with
    the @..DCPRINT SAY, DCPRINT ?/??, @ DCPRINT BOX commands.
   

Examples:

   #include "dcprint.ch"
   
   PROCEDURE XTest( lPreview )
   
   LOCAL aFor_Sale, oPrinter, i, nLineCount, cMemo, cMemoLine, cScrn
   
   lPreview := IIF( Valtype(lPreview)='L',lPreview,.t.)
   
   USE collect NEW
   
   aFor_Sale := { 'No','Yes','Not Sure' }
   
   BEGIN SEQUENCE
   
   IF lPreview
     DCPRINT ON SIZE 60,100 TO oPrinter FONT '12.Courier' PREVIEW
   ELSE
     DCPRINT ON SIZE 60,100 TO oPrinter FONT '12.Courier'
   ENDIF
   
   IF Valtype(oPrinter) # 'O' .OR. !oPrinter:lActive
     BREAK
   ENDIF
   
   DC_Gui(.t.)
   
   IF !lPreview
     cScrn := DC_WaitOn()
   ENDIF
   
   DO WHILE !Eof()
   
     @ 2,0,20,45 DCPRINT BITMAP COLLECT->bitmap1
     @ 2,50,20,95 DCPRINT BITMAP COLLECT->bitmap2
   
     DCPRINT FONT '12.Courier'
   
     @ 23, 5, 37, 90 DCPRINT BOX
   
     @ 24,10 DCPRINT SAY '    Description:'
     @ 25,10 DCPRINT SAY '           Type:'
     @ 26,10 DCPRINT SAY '       Sub-Type:'
     @ 27,10 DCPRINT SAY '      Condition:'
     @ 28,10 DCPRINT SAY '       Location:'
     @ 29,10 DCPRINT SAY '      For Sale?:'
     @ 30,10 DCPRINT SAY '  Original Date:'
     @ 31,10 DCPRINT SAY '  Acquired Date:'
     @ 32,10 DCPRINT SAY ' Original Price:'
     @ 33,10 DCPRINT SAY 'Appraised Value:'
     @ 34,10 DCPRINT SAY '       Comments:'
     @ 35,10 DCPRINT SAY '      Bit Map 1:'
     @ 36,10 DCPRINT SAY '      Bit Map 2:'
   
     DCPRINT FONT '14.Terminal'
   
     @ 24,32 DCPRINT SAY COLLECT->descrip
     @ 25,32 DCPRINT SAY COLLECT->type
     @ 26,32 DCPRINT SAY COLLECT->sub_type
     @ 27,32 DCPRINT SAY COLLECT->condition
     @ 28,32 DCPRINT SAY COLLECT->location
     @ 29,32 DCPRINT SAY aFor_Sale[COLLECT->for_sale+1]
     @ 30,32 DCPRINT SAY COLLECT->date_orig
     @ 31,32 DCPRINT SAY COLLECT->date_acqu
     @ 32,32 DCPRINT SAY COLLECT->orig_price
     @ 33,32 DCPRINT SAY COLLECT->appr_value
     @ 34,32 DCPRINT SAY COLLECT->comments
     @ 35,32 DCPRINT SAY COLLECT->bitmap1
     @ 36,32 DCPRINT SAY COLLECT->bitmap2
   
     DCPRINT FONT '12.Arial'
   
     cMemo := Alltrim(COLLECT->memo)
     nLineCount := MLCount(cMemo)
     FOR i := 1 TO nLineCount - 1
       cMemoLine := MemoLine( cMemo, nil, i )
       IF Empty(cMemoLine)
         EXIT
       ENDIF
       @ 40+i,10 DCPRINT SAY cMemoLine
     NEXT
   
     DCPRINT EJECT
   
     SKIP
   
   ENDDO
   
   IF !lPreview
     DC_Impl(cScrn)
   ENDIF
   
   END SEQUENCE
   
   DCPRINT OFF
   
   RETURN
   

Source/Library:

  DCPRINT.CH

See Also:

   dc_printer()



DCPRINT EJECT

Eject the printer page

Syntax:

   DCPRINT EJECT ;
     [PRINTER < oPrinter >]
   

Arguments:

   PRINTER < oPrinter > is the printer object returned by the
   DCPRINT ON command or the DC_Printer() class.  If this clause
   is not used then the printer object referenced by
   DC_PrinterObject() is the default. .
   

Description:

    DCPRINT EJECT has a dual purpose depending on whether the print
    output is going to a print device or to the PREVIEW window.
   
    If the PREVIEW clause was used in the DCPRINT ON command, then
    DCPRINT EJECT will pause display a preview window.  The preview
    window includes "zoom", scrollbars, next and previous buttons.
    Each time DCPRINT EJECT is encountered in the code the next page
    is displayed and stored in a buffer.  The NEXT button on the
    Preview window will exit the preview and return control to the
    print loop.  The PREVIOUS button on the Preview window will
    display the previously buffered page.
   
    If the PREVIEW clause was NOT USED in the DCPRINT ON command,
    the DCPRINT EJECT is used to eject the printer paper, start
    a new page and set the printer row/column to 0,0.
   

Notes:

    The :Eject() method looks at the current ::nPage instance
    variable and compares it to ::nFrom and ::nTo.  If the
    current page is outside the range selected by the user
    then the page will not be ejected and only the ::nPage
    instance variable will be incremented.
   

Examples:

   #include "dcprint.ch"
   
   PROCEDURE XTest( lPreview )
   
   LOCAL aFor_Sale, oPrinter, i, nLineCount, cMemo, cMemoLine, cScrn
   
   lPreview := IIF( Valtype(lPreview)='L',lPreview,.t.)
   
   USE collect NEW
   
   aFor_Sale := { 'No','Yes','Not Sure' }
   
   BEGIN SEQUENCE
   
   IF lPreview
     DCPRINT ON SIZE 60,100 TO oPrinter FONT '12.Courier' PREVIEW
   ELSE
     DCPRINT ON SIZE 60,100 TO oPrinter FONT '12.Courier'
   ENDIF
   
   IF Valtype(oPrinter) # 'O' .OR. !oPrinter:lActive
     BREAK
   ENDIF
   
   DC_Gui(.t.)
   
   IF !lPreview
     cScrn := DC_WaitOn()
   ENDIF
   
   DO WHILE !Eof()
   
     @ 2,0,20,45 DCPRINT BITMAP COLLECT->bitmap1
     @ 2,50,20,95 DCPRINT BITMAP COLLECT->bitmap2
   
     DCPRINT FONT '12.Courier'
   
     @ 23, 5, 37, 90 DCPRINT BOX
   
     @ 24,10 DCPRINT SAY '    Description:'
     @ 25,10 DCPRINT SAY '           Type:'
     @ 26,10 DCPRINT SAY '       Sub-Type:'
     @ 27,10 DCPRINT SAY '      Condition:'
     @ 28,10 DCPRINT SAY '       Location:'
     @ 29,10 DCPRINT SAY '      For Sale?:'
     @ 30,10 DCPRINT SAY '  Original Date:'
     @ 31,10 DCPRINT SAY '  Acquired Date:'
     @ 32,10 DCPRINT SAY ' Original Price:'
     @ 33,10 DCPRINT SAY 'Appraised Value:'
     @ 34,10 DCPRINT SAY '       Comments:'
     @ 35,10 DCPRINT SAY '      Bit Map 1:'
     @ 36,10 DCPRINT SAY '      Bit Map 2:'
   
     DCPRINT FONT '14.Terminal'
   
     @ 24,32 DCPRINT SAY COLLECT->descrip
     @ 25,32 DCPRINT SAY COLLECT->type
     @ 26,32 DCPRINT SAY COLLECT->sub_type
     @ 27,32 DCPRINT SAY COLLECT->condition
     @ 28,32 DCPRINT SAY COLLECT->location
     @ 29,32 DCPRINT SAY aFor_Sale[COLLECT->for_sale+1]
     @ 30,32 DCPRINT SAY COLLECT->date_orig
     @ 31,32 DCPRINT SAY COLLECT->date_acqu
     @ 32,32 DCPRINT SAY COLLECT->orig_price
     @ 33,32 DCPRINT SAY COLLECT->appr_value
     @ 34,32 DCPRINT SAY COLLECT->comments
     @ 35,32 DCPRINT SAY COLLECT->bitmap1
     @ 36,32 DCPRINT SAY COLLECT->bitmap2
   
     DCPRINT FONT '12.Arial'
   
     cMemo := Alltrim(COLLECT->memo)
     nLineCount := MLCount(cMemo)
     FOR i := 1 TO nLineCount - 1
       cMemoLine := MemoLine( cMemo, nil, i )
       IF Empty(cMemoLine)
         EXIT
       ENDIF
       @ 40+i,10 DCPRINT SAY cMemoLine
     NEXT
   
     DCPRINT EJECT
   
     SKIP
   
   ENDDO
   
   IF !lPreview
     DC_Impl(cScrn)
   ENDIF
   
   END SEQUENCE
   
   DCPRINT OFF
   
   RETURN
   

Source/Library:

  DCPRINT.CH

See Also:

   dc_printer()



DCPRINT EVAL

Evaluate a code block to imbed custom graphs in printed page

Syntax:

   DCPRINT EVAL < bEval > ;
     [PRINTER < oPrinter >] ;
     [WHEN < bWhen >]
   

Arguments:

   < bEval > is the code block to evaluate.  The DC_Printer() object
   is passed as a parameter to the code block.
   
   PRINTER < oPrinter > is the printer object returned by the
   DCPRINT ON command or the DC_Printer() class.  If this clause
   is not used then the printer object referenced by
   DC_PrinterObject() is the default.
   
   WHEN < bWhen > is a condition codeblock that is evaluated before
   the command is executed during previewing and printing from
   preview.  The DC_Printer() object is passed to the code block.
   The code block must return a logical .TRUE. to enable the command.
   

Description:

    DCPRINT EVAL is used to run any special print routine and imbed
    the results within the printed page or preview window.  This
    command is handy for printing routines such as pie-charts and
    graphs.
   

Examples:

   FUNCTION XTest()
   
   LOCAL oPrinter, i
   
   DCPRINT ON TO oPrinter PREVIEW FONT '6.Terminal'
   
   FOR i := 5 TO 20
     @ i,10 DCPRINT SAY 'This is line ' + Alltrim(Str(i))
   NEXT
   
   FOR i := 25 TO 40
     GraStringAt( oPrinter:oPS, oPrinter:PenCoords(i,10),  ;
                  'This is line ' + Alltrim(Str(i)) )
   NEXT
   
   DCPRINT EJECT
   
   @ 5,10 DCPRINT SAY 'Look at the below Pie Chart' ;
          FONT '14.Arial Bold'
   
   DCPRINT EVAL {|o|DrawPieChart(o)}
   
   DCPRINT OFF
   
   RETURN nil
   
   * -------------
   
   FUNCTION DrawPieChart( oPrinter )
   
   LOCAL nX, nY, nRadius,  nStartAngle, aAngle, ;
         aPattern, i, aPenCoords
   
   aPenCoords := oPrinter:PenCoords(20,40)
   
   nX       := aPenCoords[1]        // mid-point of the
   nY       := aPenCoords[2]        // pie chart
   nRadius  := 350                  // radius
   aAngle   := { 30, 100, 15, 75, 80, 60 }
   aPattern := { ;                  // various fill attributes
            GRA_SYM_DENSE2, ;
            GRA_SYM_DIAG1 , ;
            GRA_SYM_DENSE4, ;
            GRA_SYM_DIAG2 , ;
            GRA_SYM_DENSE6, ;
            GRA_SYM_DIAG3   }
   
   nStartAngle := 45                // starting angle
   
   FOR i := 1 TO LEN( aAngle )      // draw filled arcs
     DrawFilledPartialArc( {nX, nY}, nRadius, ;
                                  nStartAngle, aAngle[i], ;
                                  aPattern[i], .T., oPrinter:oPS )
     nStartAngle += aAngle[i]      // increment starting angle
   NEXT
   
   RETURN nil
   
   
   *****************************************
   * Draws filled arcs                     *
   
   *****************************************
   FUNCTION DrawFilledPartialArc( aCenter, ;
                                  nRadius, ;
                                  nStartAngle, ;
                                  nSweepAngle, ;
                                  nPattern , ;
                                  lOutline, ;
                                  oPS )
   LOCAL aAttr, nSegment
   
   aAttr := Array( GRA_AA_COUNT )   // select fill pattern
   aAttr [ GRA_AA_SYMBOL ] := nPattern
   
   aAttr := GraSetAttrArea( oPS, aAttr )
   
                                   // open segment
   nSegment := GraSegOpen( oPS, GRA_SEG_MODIFIABLE )
   GraPathBegin( oPS )             // define path
   GraPos( oPS, aCenter )          // define arc
   GraArc( oPS, aCenter, nRadius,, nStartAngle, nSweepAngle )
   
   GraPathEnd( oPS, .T. )          // end path definition
   GraSegClose( oPS )              // close segment
   
   GraSegDraw( oPS, nSegment )     // create path for drawing
   
   GraPathFill( oPS )              // fill path
   
   IF lOutline
     GraSegDraw( oPS, nSegment )   // recreate path
     GraPathOutline( oPS )         // outline path
   ENDIF
   
   GraSegDestroy( oPS, nSegment)   // delete segment
   GraSetAttrArea( oPS, aAttr )    // reset old attributes
   
   RETURN NIL
   

Source/Library:

  DCPRINT.CH

See Also:

   dc_printer()



DCPRINT FONT

Set the Font for printing with @..SAY style coordinates

Syntax:

   DCPRINT FONT < ocFont > ;
     [CODEPAGE < nCodePage >] ;
     [PRINTER < oPrinter >] ;
     [WHEN < bWhen >]
   

Arguments:

   < ocFont > is a character string containing the Compound Font
   Name or a Font object.
   
   NOTE: To print with UNDERSCORE, use the word "Underscore" in
         the FONT clause. ex: "12.Arial Bold Underscore".
   
   CODEPAGE < nCodePage > is the desired code page to use with the
   selected font other than the default code page.
   
   PRINTER < oPrinter > is the printer object returned by the
   DCPRINT ON command or the DC_Printer() class.  If this clause
   is not used then the printer object referenced by
   DC_PrinterObject() is the default.
   
   WHEN < bWhen > is a condition codeblock that is evaluated before
   the command is executed during previewing and printing from
   preview.  The DC_Printer() object is passed to the code block.
   The code block must return a logical .TRUE. to enable the command.
   

Description:

    DCPRINT FONT is used to set the font for use with the
    @..DCPRINT SAY or DCPRINT ?/?? commands.
   

Examples:

   #include "dcprint.ch"
   
   PROCEDURE XTest( lPreview )
   
   LOCAL aFor_Sale, oPrinter, i, nLineCount, cMemo, cMemoLine, cScrn
   
   lPreview := IIF( Valtype(lPreview)='L',lPreview,.t.)
   
   USE collect NEW
   
   aFor_Sale := { 'No','Yes','Not Sure' }
   
   BEGIN SEQUENCE
   
   IF lPreview
     DCPRINT ON SIZE 60,100 TO oPrinter FONT '12.Courier' PREVIEW
   ELSE
     DCPRINT ON SIZE 60,100 TO oPrinter FONT '12.Courier'
   ENDIF
   
   IF Valtype(oPrinter) # 'O' .OR. !oPrinter:lActive
     BREAK
   ENDIF
   
   DC_Gui(.t.)
   
   IF !lPreview
     cScrn := DC_WaitOn()
   ENDIF
   
   DO WHILE !Eof()
   
     @ 2,0,20,45 DCPRINT BITMAP COLLECT->bitmap1
     @ 2,50,20,95 DCPRINT BITMAP COLLECT->bitmap2
   
     DCPRINT FONT '12.Courier'
   
     @ 23, 5, 37, 90 DCPRINT BOX
   
     @ 24,10 DCPRINT SAY '    Description:'
     @ 25,10 DCPRINT SAY '           Type:'
     @ 26,10 DCPRINT SAY '       Sub-Type:'
     @ 27,10 DCPRINT SAY '      Condition:'
     @ 28,10 DCPRINT SAY '       Location:'
     @ 29,10 DCPRINT SAY '      For Sale?:'
     @ 30,10 DCPRINT SAY '  Original Date:'
     @ 31,10 DCPRINT SAY '  Acquired Date:'
     @ 32,10 DCPRINT SAY ' Original Price:'
     @ 33,10 DCPRINT SAY 'Appraised Value:'
     @ 34,10 DCPRINT SAY '       Comments:'
     @ 35,10 DCPRINT SAY '      Bit Map 1:'
     @ 36,10 DCPRINT SAY '      Bit Map 2:'
   
     DCPRINT FONT '14.Terminal'
   
     @ 24,32 DCPRINT SAY COLLECT->descrip
     @ 25,32 DCPRINT SAY COLLECT->type
     @ 26,32 DCPRINT SAY COLLECT->sub_type
     @ 27,32 DCPRINT SAY COLLECT->condition
     @ 28,32 DCPRINT SAY COLLECT->location
     @ 29,32 DCPRINT SAY aFor_Sale[COLLECT->for_sale+1]
     @ 30,32 DCPRINT SAY COLLECT->date_orig
     @ 31,32 DCPRINT SAY COLLECT->date_acqu
     @ 32,32 DCPRINT SAY COLLECT->orig_price
     @ 33,32 DCPRINT SAY COLLECT->appr_value
     @ 34,32 DCPRINT SAY COLLECT->comments
     @ 35,32 DCPRINT SAY COLLECT->bitmap1
     @ 36,32 DCPRINT SAY COLLECT->bitmap2
   
     DCPRINT FONT '12.Arial'
   
     cMemo := Alltrim(COLLECT->memo)
     nLineCount := MLCount(cMemo)
     FOR i := 1 TO nLineCount - 1
       cMemoLine := MemoLine( cMemo, nil, i )
       IF Empty(cMemoLine)
         EXIT
       ENDIF
       @ 40+i,10 DCPRINT SAY cMemoLine
     NEXT
   
     DCPRINT EJECT
   
     SKIP
   
   ENDDO
   
   IF !lPreview
     DC_Impl(cScrn)
   ENDIF
   
   END SEQUENCE
   
   DCPRINT OFF
   
   RETURN
   

Source/Library:

  DCPRINT.CH

See Also:

   dc_printer()



DCPRINT OFF

Destroy a printer object

Syntax:

   DCPRINT OFF ;
     [PRINTER < oPrinter >]
   

Arguments:

   PRINTER < oPrinter > is the printer object returned by the
   DCPRINT ON command or the DC_Printer() class.  If this clause
   is not used then the printer object referenced by
   DC_PrinterObject() is the default.
   

Description:

    DCPRINT OFF destroys a printer object that was previously
    created with DCPRINT ON or DC_PrinterOn().
   

Examples:

   #include "dcprint.ch"
   
   PROCEDURE XTest( lPreview )
   
   LOCAL aFor_Sale, oPrinter, i, nLineCount, cMemo, cMemoLine, cScrn
   
   lPreview := IIF( Valtype(lPreview)='L',lPreview,.t.)
   
   USE collect NEW
   
   aFor_Sale := { 'No','Yes','Not Sure' }
   
   BEGIN SEQUENCE
   
   IF lPreview
     DCPRINT ON SIZE 60,100 TO oPrinter FONT '12.Courier' PREVIEW
   ELSE
     DCPRINT ON SIZE 60,100 TO oPrinter FONT '12.Courier'
   ENDIF
   
   IF Valtype(oPrinter) # 'O' .OR. !oPrinter:lActive
     BREAK
   ENDIF
   
   DC_Gui(.t.)
   
   IF !lPreview
     cScrn := DC_WaitOn()
   ENDIF
   
   DO WHILE !Eof()
   
     @ 2,0,20,45 DCPRINT BITMAP COLLECT->bitmap1
     @ 2,50,20,95 DCPRINT BITMAP COLLECT->bitmap2
   
     DCPRINT FONT '12.Courier'
   
     @ 23, 5, 37, 90 DCPRINT BOX
   
     @ 24,10 DCPRINT SAY '    Description:'
     @ 25,10 DCPRINT SAY '           Type:'
     @ 26,10 DCPRINT SAY '       Sub-Type:'
     @ 27,10 DCPRINT SAY '      Condition:'
     @ 28,10 DCPRINT SAY '       Location:'
     @ 29,10 DCPRINT SAY '      For Sale?:'
     @ 30,10 DCPRINT SAY '  Original Date:'
     @ 31,10 DCPRINT SAY '  Acquired Date:'
     @ 32,10 DCPRINT SAY ' Original Price:'
     @ 33,10 DCPRINT SAY 'Appraised Value:'
     @ 34,10 DCPRINT SAY '       Comments:'
     @ 35,10 DCPRINT SAY '      Bit Map 1:'
     @ 36,10 DCPRINT SAY '      Bit Map 2:'
   
     DCPRINT FONT '14.Terminal'
   
     @ 24,32 DCPRINT SAY COLLECT->descrip
     @ 25,32 DCPRINT SAY COLLECT->type
     @ 26,32 DCPRINT SAY COLLECT->sub_type
     @ 27,32 DCPRINT SAY COLLECT->condition
     @ 28,32 DCPRINT SAY COLLECT->location
     @ 29,32 DCPRINT SAY aFor_Sale[COLLECT->for_sale+1]
     @ 30,32 DCPRINT SAY COLLECT->date_orig
     @ 31,32 DCPRINT SAY COLLECT->date_acqu
     @ 32,32 DCPRINT SAY COLLECT->orig_price
     @ 33,32 DCPRINT SAY COLLECT->appr_value
     @ 34,32 DCPRINT SAY COLLECT->comments
     @ 35,32 DCPRINT SAY COLLECT->bitmap1
     @ 36,32 DCPRINT SAY COLLECT->bitmap2
   
     DCPRINT FONT '12.Arial'
   
     cMemo := Alltrim(COLLECT->memo)
     nLineCount := MLCount(cMemo)
     FOR i := 1 TO nLineCount - 1
       cMemoLine := MemoLine( cMemo, nil, i )
       IF Empty(cMemoLine)
         EXIT
       ENDIF
       @ 40+i,10 DCPRINT SAY cMemoLine
     NEXT
   
     DCPRINT EJECT
   
     SKIP
   
   ENDDO
   
   IF !lPreview
     DC_Impl(cScrn)
   ENDIF
   
   END SEQUENCE
   
   DCPRINT OFF
   
   RETURN
   

Source/Library:

  DCPRINT.CH

See Also:

   dc_printeroff()
   DCPRINT ON



DCPRINT ON

Create a printer class object for @..SAY style printing

Syntax:

   DCPRINT ON ;
      [TO < oPrinter >] ;
      [OPTIONS < aDefaultOptions >] ;
      [NAME < cPrinterName >] ;
      [SIZE < nRows >,< nCols >] ;
      [PAGES < nFrom >,< nTo >] ;
      [VIEWPORT < nX1 >,< nY1 >,< nX2 >,< nY2 >] ;
      [ALLPAGES] ;
      [COPIES < nCopies >] ;
      [COPYLOOP] ;
      [COLLATE] ;
      [TOFILE] ;
      [TEXTONLY [OUTFILE < cOutFile > [OVERWRITE] [APPEND]] ;
      [FONT < ocFont >] ;
      [FIXED] ;
      [NOSCALE] [PIXEL] ;
      [PAGESIZE < aPageSize >] ;
      [UNITS < nUnits >] ;
      [USEDEFAULT ] ;
      [FORCEPRINTDIALOG] ;
      [HANDLER < bHandler >] ;
      [FONTBUTTON] ;
      [ORIENTATION < nOrientation >] ;
      [PAPERBIN < nPaperBin >] ;
      [FORMSIZE < nFormSize >] ;
      [DUPLEXMODE < nDuplexMode >] ;
      [COLORMODE < nColorMode >] ;
      [RESOLUTION < nResolution >] ;
      [MARGIN < anMargin >] ;
      [TITLE < cTitle >] ;
      [CANCELENABLE] ;
      [AUTOEJECT] ;
      [DIALOGSTYLE < nDialogStyle >] ;
      [GRID] ;
      [PREVIEW] ;
        [ZOOMFACTOR < nZoomFactor > [,< nZoomIncr >]] ;
        [SCROLLFACTOR < nScrollFactor >] ;
        [PPOSITION < nStartCol >,< nStartRow >] ;
        [PSIZE < nWidth >,< nHeight >] ;
        [NOSTOP] ;
        [HIDE] ;
        [NOPRINTBUTTON] ;
        [BUSYMESSAGE < cBusyMsg >] ;
        [FINDBUTTON] ;
        [BUTTONS < aButtons >] ;
      [ACROBAT]
   

Arguments:

   TO < oPrinter > is a variable to store the printer object.
   
   OPTIONS < aDefaultOptions > is used to establish the default
   options for print jobs.  < aDefaultOptions > is an array that was
   previously created by the DCPRINT OPTIONS command.
   
   NAME < cPrinterName > is the name of the printer.  If
   this argument is not used, a printer dialog will appear
   for the operator to choose a printer and other options.
   
   SIZE < nRows >, < nCols > is the number of print rows and columns.
   The default is 66 rows, 80 columns for compatibility with existing
   Xbase language reports.  This establishes a "grid" on the page
   so the page may be addressed using text-based coordinates.  To
   get tighter control of the pen location on the paper use very
   high numbers, such as 660,800.  When using commands such as
   @ < nRow >, < nCol > DCPRINT SAY, the < nRow > and < nCol > coordinates
   are the grid coordinates.
   
   PAGES < nFrom >, < nTo > is the starting and ending page.
   The default is All pages.
   
   VIEWPORT < nX1 >, < nY1 >, < nX2 >, < nY2 > contains the coordinates for
   the lower left and upper right corners of the viewport. Including
   this parameter is optional and sets the size of the viewport.
   
   The viewport is important for graphic output in the device context
   linked to the printer or preview presentation space. The viewport
   coordinates are relative to the point {0,0} of the output device
   or device context. In the viewport itself everything is displayed
   that is visible in the page of the presentation space. The
   viewport contents are transferred to the output device (the device
   context).
   
   Note: When dimensioning the viewport two automatic graphic
   transformations are performed. One is the transformation of the
   page to the viewport and the other is the transformation of the
   viewport to the output device (the device context). See the
   Xbase++ documentation for more information about the ViewPort.
   
   ALLPAGES will disable the users selection of pages to print
   in the printer dialog window.
   
   COPIES < nCopies > is the number of copies to print.  The
   default is 1.
   
   COLLATE will collate the pages.
   
   COPYLOOP is used to disable the sending of the request to the
   print driver to print multiple copies.  If the user selects
   copies from the print dialog screen the value selected will be
   placed in the oPrinter:nCopies variable and the programmer must
   used this value in a FOR..NEXT loop to print multiple copies.
   
   TOFILE is used to send the print job to a file rather than
   directly to the print spooler. The user will be prompted for
   the name of a print image file to create unless the OUTFILE
   < cOutFile > clause is used.  The file that is created may be
   later sent to the print spooler via RunShell() as per the
   following example:
   
    DCPRINT ON TOFILE JUNK.PRN
    ..... print commands
    RunShell( '/C COPY JUNK.PRN \\gigadrive\sc254887_p1' )
   
   FONT < ocFont > is the starting font.  May be a character string
   with a Font name or a font object.  Default is 12.Courier.
   
   FIXED will print each character in fixed columns (even when
   using proportional fonts).  If argument is not used,
   characters will be printed in the same proportion as the
   chosen font.
   
   NOSCALE or PIXEL will cause coordinates NOT to be text-based.
   Normally, coordinates are text-based and are scaled to the
   coordinate system defined by the UNITS command.  The scaling is
   based on the SIZE clause.
   
   PAGESIZE < aPageSize) determines the page size of the presentation
   space. < aPageSize > is an array of two elements that specifies the
   dimensions of the page in the x and y direction (X = width,
   Y = height). The page size depends on the unit < nUnits > of the
   coordinate system. The origin of the coordinate system( the point
   {0,0}) is the lower left corner of the page.
   
   UNITS < nUnits > optionally sets the unit for the coordinate system
   of the presentation space. The default unit is pixel. To define a
   different unit, a #define constant must be passed for < nUnits > .
   The following table lists the valid constants for < nUnits > .
   
    Constant          Description
   
   
    GRA_PU_ARBITRARY  Any unit. The coordinate system is scaled to
                      the viewport.
    GRA_PU_PIXEL      Unit is a pixel
   
    GRA_PU_LOMETRIC * Unit is 0.1 millimeter
   
    GRA_PU_HIMETRIC   Unit is 0.01 millimeter
   
    GRA_PU_LOENGLISH  Unit is 0.1 inch
   
    GRA_PU_HIENGLISH  Unit is 0.01 inch
   
    GRA_PU_TWIPS      Unit is 1/1440 inch
   
   
   *) Default value
   
   
   TEXTONLY will output the report in text-only mode.  The user will
   be prompted for the name of a text file to create unless the
   OUTFILE < cOutFile > clause is used.  Only text commands will be
   processed in TEXTONLY mode.  OVERWRITE will automatically
   overwrite any existing file.  APPEND will automatically append
   the output to the existing file.
   
   USEDEFAULT will send the print job to the currently selected
   Windows default printer driver without displaying a Printer
   dialog window (unless FORCEPRINTDIALOG) is used.
   
   FORCEPRINTDIALOG will force the Printer dialog window to be
   displayed.
   
   HANDLER < bHandler > is a codeblock to evaluate in the event loop
   of the preview window.  This gives the programmer control over
   previewing operations.  The DC_Printer() object is passed as a
   parameter when evaluating the code block.  A numeric value is
   returned from the code block:
   
     VALUE             FUNCTION
    ------------------ -----------------------------------------
    DCGUI_NONE         Normal operation
    DCGUI_IGNORE       Ignore this event (do not handle it)
    DCGUI_EXIT_OK      Exit the event loop and return control
                       to printing loop.
    DCGUI_EXIT_ABORT   Exit the event loop and set the ::terminated
                       flag of the DC_Printer() object to abort
                       the print routine.
   
   FONTBUTTON will enable the FONT button on the Printer dialog
   for the operator to select a font for the print operation.
   Note: Any FONT clause in DCPRINT commands will override the
   selection by the operator.
   
   ORIENTATION < nOrientation > is used to select the paper orientation
   the output is to the printer.
   
     < nOrientation >    Mode
     --------------    ----------------------------
           1           Portrait (default)
           2           Landscape
   
   PAPERBIN < nPaperBin > is used to instruct the printer which paper
   bin to use for the print job.  A #define constant from XBPDEV.CH
   must be used for < nPaperBin > . Valid constants have the prefix
   XBPPRN_PAPERBIN_.
   
   FORMSIZE < nFormSize > is used to instruct the printer what paper
   format is being used. Common formats are Letter, Legal or A4.
   They are selected by their numeric ID which is available as a
   #define constant from XBPDEV.CH.  Valid constants have the prefix
   XBPPRN_FORMSIZE_.
   
   DUPLEXMODE < nDuplexMode > is used to set the duplex mode for
   double-sided printing.  The mode is selected by a numeric ID
   which is available as a #define constant from XBPDEV.CH.  Valid
   constants have the prefix XBPPRN_DUPLEXMODE_.
   
   COLORMODE < nColorMode > is used to set the color mode for printing.
   The mode is selected by a numeric ID which is available as a
   #define constant from XBPDEV.CH.  Valid constants have the prefix
   XBPPRN_COLORMODE_.
   
   RESOLUTION < nResolution > is used to set the resolution for printing.
   The mode is selected by a numeric ID which is available as a
   #define constant from XBPDEV.CH.  Valid constants have the prefix
   XBPPRN_RESOLUTION_.
   
   MARGIN < anMargin > may be a numeric value or an array of two
   numeric values.  If it is a numeric value, then this will be the
   value of the left margin.  If it is an array, then the first
   element is the TOP margin and the second element is the LEFT
   margin.  The margins may be negative and/or decimal values.
   
   TITLE < cTitle > is the title to display in the title bar area of the
   Preview window and the Printer Dialog window.   This is also the
   name of the print job that is sent to the spooler.
   
   CANCELENABLE will display a dialog window during printing that
   includes a CANCEL button to cancel the print job.  It is required
   that the function DC_PrinterOK() be included in your print loop
   to cancel the print loop because cancelling will cause
   DC_PrinterOK() to return a .FALSE.
   
   AUTOEJECT will cause an automatic page eject whenever an
   attempt is made to print past the last print row defined by the
   SIZE < nRows >, < nCols > command or whenever an attempt is made to
   print to a row that is higher on the page than the last printed
   row.  This feature is provided for compatability with existing
   Clipper reports.
   
   DIALOGSTYLE < nDialogStyle > allows users of eXPress++ 1.3 and earlier
   versions to display the same style dialog in their 1.5 applications
   as was displayed in 1.3.  Xbase++ 1.5 introduced a new
   XbpPrinterDialog() class which was incorporated in eXPress++ 1.5.
   This new dialog is created by the print driver whereas the old
   dialog was created by eXPress++ and also included a FONT button for
   selecting a print font.  DIALOGSTYLE DCPRINT_DIALOG_EXPRESS will
   display the 1.3 style printer dialog.
   
   GRID will print a cross-hatch grid on the paper or preview
   window at each text-based row and column defined by the SIZE
   clause.  The grid will also include row/column numbers at the
   top and left border.  The GRID option will aid in the designing
   of reports.
   
   PREVIEW will cause the printed output to be sent to the
   display rather than the print device.  The PREVIEW arguments
   causes the methods of the DC_PRINTER() class to write to an
   XbpDialog() GUI dialog screen rather than to an XbpPrinter()
   object.
   
   ZOOMFACTOR < nZoomFactor > is a numeric value to use as the
   base for the initial zoom value of the Preview window.  This
   clause is used only in PREVIEW mode. The default is 1.0.  A
   higher number will cause the text and graphics in the screen
   to be larger.  The minimum value is .25.  Numeric values from
   0.25 to 4.00 are recommended.  < nZoomIncr > is a numeric value
   specifying the zoom resolution.  A smaller number will cause
   each click of the ZOOM+/ZOOM- key to have a smaller change.
   The default value is .25.
   
   SCROLLFACTOR < nScrollFactor > is used to set the sensitivity of
   the scroll bars in the PREVIEW window.  The default is 40.
   
   PPOSITION < nStartCol >, < nStartRow > are the starting coordinates
   of the PREVIEW window (in pixels) relative to the left, bottom
   of the screen.  The default is 0,0.
   
   PSIZE < nWidth >, < nHeight > is the width and height of the
   PREVIEW window (in pixels).  If no size is given then the
   window will be automatically sized to fit the screen.
   
   NOSTOP will supress the automatic stop of program execution each
   time a DCPRINT EJECT command or oPrinter:eject() method is
   encountered in the program.  The control will then be given to
   the event loop of the PREVIEW window.  If the NOSTOP clause is
   used then the control will only be given to the PREVIEW window
   when the command DCPRINT OFF or the function DC_PrinterOff() are
   encountered in the program.
   
   HIDE will hide the previewer window until the command DCPRINT OFF
   or the function DC_PrinterOff() are encountered in the program.
   If the HIDE clause is not used, each page will be visible in
   the preview window as they are being created.
   
   NOPRINTBUTTON will remove the 'Print' button from the preview
   window, thereby disabling the ability to print while previewing.
   
   BUSYMESSAGE < cBusyMsg > is a message to display while each
   screen is being created.  Use this clause if your application
   takes a long time to create a screen.
   
   FINDBUTTON will paint a 'Find' button on the preview window.
   Activating this button will popup a dialog window for the user to
   enter "Text to find in Report".  The preview buffer will be
   searched for a match and will jump to the page containing the
   found text.  The found text will be outlined.
   
   BUTTONS < aButtons > is an array that is used to configure the nine
   (9) pushbuttons at the top of the preview window.  This allows the
   buttons to be resized or deleted or the captions to be changed to
   character string, numeric resource or bitmap (1.7 only).  Each
   sub-array is an array of 3 elements:
   
    Element  Description
    -------  -----------------------------------------------
      1      Button Width (numeric). NIL for no change.
      2      Button Height (numeric). NIL for no change.
      3      Button Caption (numeric resource, string or
             XbpBitMap() object).  NIL for no change.
             This may also be an array of 2 bitmaps, to be
             used for the enabled and disabled condition
             of the button respectively.
   
   The button(s) to be configured are defined by the DCPRINT_BUTTON*
   constants in DCPRINT.CH.
   
    Constant                   Description
    -------------------------- -----------------------------------
    DCPRINT_BUTTON_PLUS        Plus (Zoom Out) Button
    DCPRINT_BUTTON_MINUS       Minus (Zoom In) Button
    DCPRINT_BUTTON_FIRSTPAGE   First Page Button
    DCPRINT_BUTTON_PREVPAGE    Previous Page Button
    DCPRINT_BUTTON_NEXTPAGE    Next Page Button
    DCPRINT_BUTTON_LASTPAGE    Last Page Button
    DCPRINT_BUTTON_PRINT       Print Button
    DCPRINT_BUTTON_FIND        Find Button
    DCPRINT_BUTTON_EXIT        Ok/Exit Button
   
   Example:
   
     In this example, the Find button is resized to a width of 50
     pixels and the caption is changed to BITMAP_FIND_1 (defined in
     DCBITMAP.CH).
   
     aButtons := Array(9)
     aButtons[DCPRINT_BUTTON_FIND] := { 50,nil,BITMAP_FIND_1 }
   
   ACROBAT is used to invoke Acrobat Reader as the the print
   previewer for a much more WYSIWIG preview of the print job.
   To use this clause both the Acrobat Reader 5.0
   (http://www.adobe.com) and the Win2PDF driver
   (http://daneprarie.com) must be installed. The Acrobat
   Reader is free and the Win2PDF driver is $39.00.  The demo
   version is included.  The Win2PDF driver works only on
   Windows NT, 2000 and XP.
   

Description:

    DCPRINT ON creates a printer class which is used to create
    reports that use row/column addressing identical to the
    @..SAY addressing used by Clipper.  This class provides
    for an easy migration of existing reports so that they
    may use the more powerful features of the Windows print
    manager like font selection and selection of a network
    printer.
   

Examples:

   #include "dcprint.ch"
   
   PROCEDURE XTest( lPreview )
   
   LOCAL aFor_Sale, oPrinter, i, nLineCount, cMemo, cMemoLine, cScrn
   
   lPreview := IIF( Valtype(lPreview)='L',lPreview,.t.)
   
   USE collect NEW
   
   aFor_Sale := { 'No','Yes','Not Sure' }
   
   BEGIN SEQUENCE
   
   IF lPreview
     DCPRINT ON SIZE 60,100 TO oPrinter FONT '12.Courier' ;
     PREVIEW HIDE
   ELSE
     DCPRINT ON SIZE 60,100 TO oPrinter FONT '12.Courier'
   ENDIF
   
   IF Valtype(oPrinter) # 'O' .OR. !oPrinter:lActive
     BREAK
   ENDIF
   
   DC_Gui(.t.)
   
   IF !lPreview
     cScrn := DC_WaitOn()
   ENDIF
   
   DO WHILE !Eof()
   
     @ 2,0,20,45 DCPRINT BITMAP COLLECT->bitmap1
     @ 2,50,20,95 DCPRINT BITMAP COLLECT->bitmap2
   
     DCPRINT FONT '12.Courier'
   
     @ 23, 5, 37, 90 DCPRINT BOX
   
     @ 24,10 DCPRINT SAY '    Description:'
     @ 25,10 DCPRINT SAY '           Type:'
     @ 26,10 DCPRINT SAY '       Sub-Type:'
     @ 27,10 DCPRINT SAY '      Condition:'
     @ 28,10 DCPRINT SAY '       Location:'
     @ 29,10 DCPRINT SAY '      For Sale?:'
     @ 30,10 DCPRINT SAY '  Original Date:'
     @ 31,10 DCPRINT SAY '  Acquired Date:'
     @ 32,10 DCPRINT SAY ' Original Price:'
     @ 33,10 DCPRINT SAY 'Appraised Value:'
     @ 34,10 DCPRINT SAY '       Comments:'
     @ 35,10 DCPRINT SAY '      Bit Map 1:'
     @ 36,10 DCPRINT SAY '      Bit Map 2:'
   
     DCPRINT FONT '14.Terminal'
   
     @ 24,32 DCPRINT SAY COLLECT->descrip
     @ 25,32 DCPRINT SAY COLLECT->type
     @ 26,32 DCPRINT SAY COLLECT->sub_type
     @ 27,32 DCPRINT SAY COLLECT->condition
     @ 28,32 DCPRINT SAY COLLECT->location
     @ 29,32 DCPRINT SAY aFor_Sale[COLLECT->for_sale+1]
     @ 30,32 DCPRINT SAY COLLECT->date_orig
     @ 31,32 DCPRINT SAY COLLECT->date_acqu
     @ 32,32 DCPRINT SAY COLLECT->orig_price
     @ 33,32 DCPRINT SAY COLLECT->appr_value
     @ 34,32 DCPRINT SAY COLLECT->comments
     @ 35,32 DCPRINT SAY COLLECT->bitmap1
     @ 36,32 DCPRINT SAY COLLECT->bitmap2
   
     DCPRINT FONT '12.Arial'
   
     cMemo := Alltrim(COLLECT->memo)
     nLineCount := MLCount(cMemo)
     FOR i := 1 TO nLineCount - 1
       cMemoLine := MemoLine( cMemo, nil, i )
       IF Empty(cMemoLine)
         EXIT
       ENDIF
       @ 40+i,10 DCPRINT SAY cMemoLine
     NEXT
   
     DCPRINT EJECT
   
     SKIP
   
   ENDDO
   
   IF !lPreview
     DC_Impl(cScrn)
   ENDIF
   
   END SEQUENCE
   
   DCPRINT OFF
   
   RETURN
   

Source/Library:

  DCPRINT.CH

See Also:

   dc_printeron()
   DCPRINT OFF
   DCPRINT OPTIONS



DCPRINT OPTIONS

Create an option array for setting printing defaults

Syntax:

   DCPRINT OPTIONS ;
      [TO < aOptions >] ;
      [NAME < cPrinterName >] ;
      [SIZE < nRows >,< nCols >] ;
      [PAGES < nFrom >,< nTo >] ;
      [VIEWPORT < nX1 >,< nY1 >,< nX2 >,< nY2 >] ;
      [ALLPAGES] ;
      [COPIES < nCopies >] ;
      [COPYLOOP] ;
      [COLLATE] ;
      [TOFILE] ;
      [TEXTONLY [OUTFILE < cOutFile > [OVERWRITE] [APPEND]] ;
      [FONT < ocFont >] ;
      [FIXED] ;
      [NOSCALE] [PIXEL] ;
      [PAGESIZE < aPageSize >] ;
      [UNITS < nUnits >] ;
      [USEDEFAULT ] ;
      [FORCEPRINTDIALOG] ;
      [HANDLER < bHandler >] ;
      [FONTBUTTON] ;
      [ORIENTATION < nOrientation >] ;
      [PAPERBIN < nPaperBin >] ;
      [FORMSIZE < nFormSize >] ;
      [DUPLEXMODE < nDuplexMode >] ;
      [COLORMODE < nColorMode >] ;
      [RESOLUTION < nResolution >] ;
      [MARGIN < anMargin >] ;
      [TITLE < cTitle >] ;
      [CANCELENABLE] ;
      [AUTOEJECT] ;
      [DIALOGSTYLE < nDialogStyle >] ;
      [GRID] ;
      [PREVIEW] ;
        [ZOOMFACTOR < nZoomFactor > [,< nZoomIncr >]] ;
        [SCROLLFACTOR < nScrollFactor >] ;
        [PPOSITION < nStartCol >,< nStartRow >] ;
        [PSIZE < nWidth >,< nHeight >] ;
        [NOSTOP] ;
        [HIDE] ;
        [NOPRINTBUTTON] ;
        [BUSYMESSAGE < cBusyMsg >]
   

Arguments:

   TO < aOptions > is the array to store the print options.
   
   NAME < cPrinterName > is the name of the printer.  If
   this argument is not used, a printer dialog will appear
   for the operator to choose a printer and other options.
   
   SIZE < nRows >, < nCols > is the number of print rows and columns.
   The default is 66 rows, 80 columns for compatibility with existing
   Xbase language reports.  This establishes a "grid" on the page
   so the page may be addressed using text-based coordinates.  To
   get tighter control of the pen location on the paper use very
   high numbers, such as 660,800.  When using commands such as
   @ < nRow >, < nCol > DCPRINT SAY, the < nRow > and < nCol > coordinates
   are the grid coordinates.
   
   PAGES < nFrom >, < nTo > is the starting and ending page.
   The default is All pages.
   
   VIEWPORT < nX1 >, < nY1 >, < nX2 >, < nY2 > contains the coordinates for
   the lower left and upper right corners of the viewport. Including
   this parameter is optional and sets the size of the viewport.
   
   The viewport is important for graphic output in the device context
   linked to the printer or preview presentation space. The viewport
   coordinates are relative to the point {0,0} of the output device
   or device context. In the viewport itself everything is displayed
   that is visible in the page of the presentation space. The
   viewport contents are transferred to the output device (the device
   context).
   
   Note: When dimensioning the viewport two automatic graphic
   transformations are performed. One is the transformation of the
   page to the viewport and the other is the transformation of the
   viewport to the output device (the device context). See the
   Xbase++ documentation for more information about the ViewPort.
   
   ALLPAGES will disable the users selection of pages to print
   in the printer dialog window.
   
   COPIES < nCopies > is the number of copies to print.  The
   default is 1.
   
   COLLATE will collate the pages.
   
   COPYLOOP is used to disable the sending of the request to the
   print driver to print multiple copies.  If the user selects
   copies from the print dialog screen the value selected will be
   placed in the oPrinter:nCopies variable and the programmer must
   used this value in a FOR..NEXT loop to print multiple copies.
   
   TOFILE is used to send the print job to a file rather than
   directly to the print spooler. The user will be prompted for
   the name of a print image file to create unless the OUTFILE
   < cOutFile > clause is used.  The file that is created may be
   later sent to the print spooler via RunShell() as per the
   following example:
   
    DCPRINT ON TOFILE JUNK.PRN
    ..... print commands
    RunShell( '/C COPY JUNK.PRN \\gigadrive\sc254887_p1' )
   
   FONT < ocFont > is the starting font.  May be a character string
   with a Font name or a font object.  Default is 12.Courier.
   
   FIXED will print each character in fixed columns (even when
   using proportional fonts).  If argument is not used,
   characters will be printed in the same proportion as the
   chosen font.
   
   NOSCALE or PIXEL will cause coordinates NOT to be text-based.
   Normally, coordinates are text-based and are scaled to the
   coordinate system defined by the UNITS command.  The scaling is
   based on the SIZE clause.
   
   PAGESIZE < aPageSize) determines the page size of the presentation
   space. < aPageSize > is an array of two elements that specifies the
   dimensions of the page in the x and y direction (X = width,
   Y = height). The page size depends on the unit < nUnits > of the
   coordinate system. The origin of the coordinate system( the point
   {0,0}) is the lower left corner of the page.
   
   UNITS < nUnits > optionally sets the unit for the coordinate system
   of the presentation space. The default unit is pixel. To define a
   different unit, a #define constant must be passed for < nUnits > .
   The following table lists the valid constants for < nUnits > .
   
    Constant          Description
   
   
    GRA_PU_ARBITRARY  Any unit. The coordinate system is scaled to
                      the viewport.
    GRA_PU_PIXEL      Unit is a pixel
   
    GRA_PU_LOMETRIC * Unit is 0.1 millimeter
   
    GRA_PU_HIMETRIC   Unit is 0.01 millimeter
   
    GRA_PU_LOENGLISH  Unit is 0.1 inch
   
    GRA_PU_HIENGLISH  Unit is 0.01 inch
   
    GRA_PU_TWIPS      Unit is 1/1440 inch
   
   
   *) Default value
   
   
   TEXTONLY will output the report in text-only mode.  The user will
   be prompted for the name of a text file to create unless the
   OUTFILE < cOutFile > clause is used.  Only text commands will be
   processed in TEXTONLY mode.  OVERWRITE will automatically
   overwrite any existing file.  APPEND will automatically append
   the output to the existing file.
   
   USEDEFAULT will send the print job to the currently selected
   Windows default printer driver without displaying a Printer
   dialog window (unless FORCEPRINTDIALOG) is used.
   
   FORCEPRINTDIALOG will force the Printer dialog window to be
   displayed.
   
   HANDLER < bHandler > is a codeblock to evaluate in the event loop
   of the preview window.  This gives the programmer control over
   previewing operations.  The DC_Printer() object is passed as a
   parameter when evaluating the code block.  A numeric value is
   returned from the code block:
   
     VALUE             FUNCTION
    ------------------ -----------------------------------------
    DCGUI_NONE         Normal operation
    DCGUI_IGNORE       Ignore this event (do not handle it)
    DCGUI_EXIT_OK      Exit the event loop and return control
                       to printing loop.
    DCGUI_EXIT_ABORT   Exit the event loop and set the ::terminated
                       flag of the DC_Printer() object to abort
                       the print routine.
   
   FONTBUTTON will enable the FONT button on the Printer dialog
   for the operator to select a font for the print operation.
   Note: Any FONT clause in DCPRINT commands will override the
   selection by the operator.
   
   ORIENTATION < nOrientation > is used to select the paper orientation
   the output is to the printer.
   
     < nOrientation >    Mode
     --------------    ----------------------------
           1           Portrait (default)
           2           Landscape
   
   PAPERBIN < nPaperBin > is used to instruct the printer which paper
   bin to use for the print job.  A #define constant from XBPDEV.CH
   must be used for < nPaperBin > . Valid constants have the prefix
   XBPPRN_PAPERBIN_.
   
   FORMSIZE < nFormSize > is used to instruct the printer what paper
   format is being used. Common formats are Letter, Legal or A4.
   They are selected by their numeric ID which is available as a
   #define constant from XBPDEV.CH.  Valid constants have the prefix
   XBPPRN_FORMSIZE_.
   
   DUPLEXMODE < nDuplexMode > is used to set the duplex mode for
   double-sided printing.  The mode is selected by a numeric ID
   which is available as a #define constant from XBPDEV.CH.  Valid
   constants have the prefix XBPPRN_DUPLEXMODE_.
   
   COLORMODE < nColorMode > is used to set the color mode for printing.
   The mode is selected by a numeric ID which is available as a
   #define constant from XBPDEV.CH.  Valid constants have the prefix
   XBPPRN_COLORMODE_.
   
   RESOLUTION < nResolution > is used to set the resolution for printing.
   The mode is selected by a numeric ID which is available as a
   #define constant from XBPDEV.CH.  Valid constants have the prefix
   XBPPRN_RESOLUTION_.
   
   MARGIN < anMargin > may be a numeric value or an array of two
   numeric values.  If it is a numeric value, then this will be the
   value of the left margin.  If it is an array, then the first
   element is the TOP margin and the second element is the LEFT
   margin.  The margins may be negative and/or decimal values.
   
   TITLE < cTitle > is the title to display in the title bar area of the
   Preview window and the Printer Dialog window.   This is also the
   name of the print job that is sent to the spooler.
   
   CANCELENABLE will display a dialog window during printing that
   includes a CANCEL button to cancel the print job.
   
   AUTOEJECT will cause an automatic page eject whenever an
   attempt is made to print past the last print row defined by the
   SIZE < nRows >, < nCols > command or whenever an attempt is made to
   print to a row that is higher on the page than the last printed
   row.  This feature is provided for compatability with existing
   Clipper reports.
   
   DIALOGSTYLE < nDialogStyle > allows users of eXPress++ 1.3 and earlier
   versions to display the same style dialog in their 1.5 applications
   as was displayed in 1.3.  Xbase++ 1.5 introduced a new
   XbpPrinterDialog() class which was incorporated in eXPress++ 1.5.
   This new dialog is created by the print driver whereas the old
   dialog was created by eXPress++ and also included a FONT button for
   selecting a print font.  DIALOGSTYLE DCPRINT_DIALOG_EXPRESS will
   display the 1.3 style printer dialog.
   
   GRID will print a cross-hatch grid on the paper or preview
   window at each text-based row and column defined by the SIZE
   clause.  The grid will also include row/column numbers at the
   top and left border.  The GRID option will aid in the designing
   of reports.
   
   PREVIEW will cause the printed output to be sent to the
   display rather than the print device.  The PREVIEW arguments
   causes the methods of the DC_PRINTER() class to write to an
   XbpDialog() GUI dialog screen rather than to an XbpPrinter()
   object.
   
   ZOOMFACTOR < nZoomFactor > is a numeric value to use as the
   base for the initial zoom value of the Preview window.  This
   clause is used only in PREVIEW mode. The default is 1.0.  A
   higher number will cause the text and graphics in the screen
   to be larger.  The minimum value is .25.  Numeric values from
   0.25 to 4.00 are recommended.  < nZoomIncr > is a numeric value
   specifying the zoom resolution.  A smaller number will cause
   each click of the ZOOM+/ZOOM- key to have a smaller change.
   The default value is .25.
   
   SCROLLFACTOR < nScrollFactor > is used to set the sensitivity of
   the scroll bars in the PREVIEW window.  The default is 40.
   
   PPOSITION < nStartCol >, < nStartRow > are the starting coordinates
   of the PREVIEW window (in pixels) relative to the left, bottom
   of the screen.  The default is 0,0.
   
   PSIZE < nWidth >, < nHeight > is the width and height of the
   PREVIEW window (in pixels).  If no size is given then the
   window will be automatically sized to fit the screen.
   
   NOSTOP will supress the automatic stop of program execution each
   time a DCPRINT EJECT command or oPrinter:eject() method is
   encountered in the program.  The control will then be given to
   the event loop of the PREVIEW window.  If the NOSTOP clause is
   used then the control will only be given to the PREVIEW window
   when the command DCPRINT OFF or the function DC_PrinterOff() are
   encountered in the program.
   
   HIDE will hide the previewer window until the command DCPRINT OFF
   or the function DC_PrinterOff() are encountered in the program.
   If the HIDE clause is not used, each page will be visible in
   the preview window as they are being created.
   
   NOPRINTBUTTON will remove the 'Print' button from the preview
   window, thereby disabling the ability to print while previewing.
   
   BUSYMESSAGE < cBusyMsg > is a message to display while each
   screen is being created.  Use this clause if your application
   takes a long time to create a screen.
   

Description:

    DCPRINT OPTIONS will create an option array to be used later
    with the DCPRINT ON command or DC_PrintFile() function.
   

Examples:

   #include "dcprint.ch"
   
   FUNCTION XTest()
   
   LOCAL aOptions
   
   DCPRINT OPTIONS ;
      TO aOptions ;
      NOPRINTBUTTON ;
      PSIZE AppDeskTop():currentSize()[1], ;
            AppDeskTop():currentSize()[2] ;
      HIDE ;
      NOSTOP
   
   DC_PrintFile('README.TXT',.t.,nil,aOptions)
   
   RETURN nil
   

Source/Library:

  DCPRINT.CH

See Also:

   DCPRINT ON
   DC_PrintFile()



DCPRINT SIZE

Set the size of the print page in rows and columns

Syntax:

    DCPRINT SIZE < nRows >, < nCols > ;
       WHEN < bWhen >
   

Arguments:

   < nRows >, < nCols > is the number of print rows and
   columns.  The default is 66 rows, 80 columns.
   
   WHEN < bWhen > is a condition codeblock that is evaluated before
   the command is executed during previewing and printing from
   preview.  The DC_Printer() object is passed to the code block.
   The code block must return a logical .TRUE. to enable the command.
   

Description:

    DCPRINT SIZE is used to change the number of print rows and
    columns (the text-based grid size).  This command functions the
    same as the SIZE clause of the DCPRINT ON command except it
    allows for changing of the print grid within a single document,
    to allow for such printing variations as a different grid for
    the header than for the body of the document.
   

Examples:

   FUNCTION Xtest()
   
   LOCAL oPrinter, i, j, x
   
   DCPRINT ON TO oPrinter PREVIEW
   
   FOR x := 1 TO 5
     DCPRINT SIZE 40, 80
     DCPRINT FONT '12.Courier New'
     @ 1, 20 DCPRINT SAY 'This is Header Line 1 (Row 1, Col 20)'
     @ 2, 20 DCPRINT SAY 'This is Header Line 2 (Row 2, Col 20)'
     @ 3, 20 DCPRINT SAY 'This is Header Line 3 (Row 3, Col 20)'
     @ 4, 20 DCPRINT SAY 'This is Header Line 4 (Row 4, Col 20)'
   
     DCPRINT SIZE 66, 132
     DCPRINT FONT '6.Courier New'
     FOR i := 10 TO 40
       FOR j := 1 TO 120 STEP 15
         @ i,j DCPRINT SAY 'Row ' + Str(i,2) + ' Col ' + Alltrim(Str(j,3))
       NEXT
     NEXT
     DCPRINT EJECT
   NEXT
   
   DCPRINT OFF
   
   RETURN nil
   

Source/Library:

  DCPRINT.CH

See Also:

   dc_printer()



DCQDEBUG

Send debug information to a debugging CRT window

Syntax:

    DCQDEBUG < xExpr1 > [ ; < xExprN > ]
   

Arguments:

   < xExpr1 > through < xExprN > is any expression.
   

Description:

    DCQDEBUG is used to send data to a debugging window when
    debugging GUI applications.
   
    A list of expressions may be included and the output of each
    expression will be displayed on a new line in the window.
   

Notes:

   DC_DebugQoutAppendBlock() is a get-set function used to setup
   additional information to append to each debug line.
   

Examples:

    #include "dcdialog.ch"
   
    USE COLLECT NEW SHARED
   
    DCQDEBUG Alias(), RecCount()
   

Source/Library:

  DCDIALOG.CH

See Also:

   dc_debugqout()
   dc_debugqoutappendblock()
   dc_qout()
   DCQOUT



DCQDEBUGOFF

Send debug information to a debugging CRT window

Syntax:

    DCQDEBUGOFF < xExpr1 > [ ; < xExprN > ]
   

Arguments:

   < xExpr1 > through < xExprN > is any expression.
   

Description:

    DCQDEBUGOFF is used to send data to a debugging window when
    debugging GUI applications.
   
    A list of expressions may be included and the output of each
    expression will be displayed on a new line in the window.
   
    DCQDEBUGOFF is similar to DCQDEBUG except it will not
    echo the expression.
   

Notes:

   DC_DebugQoutAppendBlock() is a get-set function used to setup
   additional information to append to each debug line.
   

Examples:

    #include "dcdialog.ch"
   
    USE COLLECT NEW SHARED
   
    DCQDEBUGOFF Alias(), RecCount()
   

Source/Library:

  DCDIALOG.CH

See Also:

   dc_debugqout()
   dc_debugqoutappendblock()
   dc_qout()
   DCQOUT



DCQDEBUGOFFQUIET

Send debug information to a debugging CRT window

Syntax:

    DCQDEBUGOFFQUIET < xExpr1 > [ ; < xExprN > ]
   

Arguments:

   < xExpr1 > through < xExprN > is any expression.
   

Description:

    DCQDEBUGOFFQUIET is used to send data to a debugging window when
    debugging GUI applications.
   
    A list of expressions may be included and the output of each
    expression will be displayed on a new line in the window.
   
    DCQDEBUGOFFQUIET is similar to DCQDEBUG except it will not
    echo the expression or the callstack information.
   

Notes:

   DC_DebugQoutAppendBlock() is a get-set function used to setup
   additional information to append to each debug line.
   

Examples:

    #include "dcdialog.ch"
   
    USE COLLECT NEW SHARED
   
    DCQDEBUGOFFQUIET Alias(), RecCount()
   

Source/Library:

  DCDIALOG.CH

See Also:

   DCQDEBUG



DCQDEBUGQUIET

Send debug information to a debugging CRT window

Syntax:

    DCQDEBUG < xExpr1 > [ ; < xExprN > ]
   

Arguments:

   < xExpr1 > through < xExprN > is any expression.
   

Description:

    DCQDEBUGQUIET is used to send data to a debugging window when
    debugging GUI applications.
   
    A list of expressions may be included and the output of each
    expression will be displayed on a new line in the window.
   
    DCQDEBUGQUIET is similar to DCQDEBUG except it will not
    echo the callstack information.
   

Notes:

   DC_DebugQoutAppendBlock() is a get-set function used to setup
   additional information to append to each debug line.
   

Examples:

    #include "dcdialog.ch"
   
    USE COLLECT NEW SHARED
   
    DCQDEBUGQUIET Alias(), RecCount()
   

Source/Library:

  DCDIALOG.CH

See Also:

   DCQDEBUG



DCQOUT

Send data to the default CRT window

Syntax:

   DCQOUT | DCQQOUT [ xText ]
   

Arguments:

   < xText > is any variable type.
   

Description:

    DCQOUT and DCQQOUT are used to send data to the default
    CRT window when debugging GUI applications.  The CRT window is
    used with the DCQOUT command to echo any information.  Using
    the ? command or Qout() function will cause an error if
    SetAppWindow() is not set to an XbpCrt() object.  This makes it
    very difficult to use ? or Qout() inside GUI applications where
    SetAppWindow() is pointing to a GUI object like an XbpDialog(),
    whereas DCQOUT/DCQQOUT will create an XbpCrt() object if it does
    not exist.
   

Examples:

    #include "dcapp.ch"
    #include "dcdialog.ch"
   
    PROCEDURE Xtest()
   
    LOCAL GetList := {}, oStatic, oAppEdit
   
    USE COLLECT NEW SHARED
   
    DCQOUT Alias(), RecCount()
   
    @  0,0 DCSTATIC XBPSTATIC_TYPE_RAISEDBOX SIZE 78,7 ;
       GROUP oStatic
   
    DCAPPEDIT INTO oAppEdit STYLE 3D POSITION 0,0 PARENT oStatic
   
    DCQOUT COLLECT->descrip
   
    DCAPPFIELD COLLECT->descrip INTO oAppEdit ;
      CAPTION 'Description' ;
      COLOR GRA_CLR_BLUE
   
    DCQQOUT COLLECT->type
   
    DCAPPFIELD COLLECT->type INTO oAppEdit  ;
      CAPTION 'Type'       ;
      COLOR GRA_CLR_BLUE
   
    DCREAD GUI ;
      FIT ;
      ADDBUTTONS
   
    RETURN
   

Source/Library:

  DCDIALOG.CH

See Also:

   dc_qoutwindow()
   dc_qout()
   DCQOUT WINDOW
   DCQDEBUG



DCQOUT WINDOW

Establish or Create a CRT window for debugging GUI apps

Syntax:

   DCQOUT WINDOW  [ oCrt ] ;
      [ EVAL < bEval > ] ;
      [ APPWINDOW ] )
   

Arguments:

   < oCrt > is a pointer to an existing XbpCrt() object to post
   as the object for DCQOUT commands.  If no argument is passed
   then a new XbpCrt() object will be created.
   
   EVAL < bEval > is a code block to evaluate after the XbpCrt() window
   is created.  The Crt object is passed to the code block.
   
   APPWINDOW set the Crt object as the application window with
   SetAppWindow().
   

Description:

    DCQOUT WINDOW is used to Create a CRT window for debugging
    GUI applications.  The CRT window is used with the DC_Qout()
    function and DCQOUT command to echo any information.  Using the
    ? command or Qout() function will cause an error if SetAppWindow()
    is not set to an XbpCrt() object.  This makes it very difficult
    to use ? or Qout() inside GUI applications where SetAppWindow()
    is pointing to a GUI object like an XbpDialog().
   

Examples:

    #include "dcapp.ch"
    #include "dcdialog.ch"
   
    PROCEDURE Xtest()
   
    LOCAL GetList := {}, oStatic, oAppEdit
   
    USE COLLECT NEW SHARED
   
    DCQOUT WINDOW
   
    DCQOUT Alias(), RecCount()
   
    @  0,0 DCSTATIC XBPSTATIC_TYPE_RAISEDBOX SIZE 78,7 ;
       GROUP oStatic
   
    DCAPPEDIT INTO oAppEdit STYLE 3D POSITION 0,0 PARENT oStatic
   
    DCQOUT COLLECT->descrip
   
    DCAPPFIELD COLLECT->descrip INTO oAppEdit ;
      CAPTION 'Description' ;
      COLOR GRA_CLR_BLUE
   
    DCQQOUT COLLECT->type
   
    DCAPPFIELD COLLECT->type INTO oAppEdit  ;
      CAPTION 'Type'       ;
      COLOR GRA_CLR_BLUE
   
    DCREAD GUI ;
      FIT ;
      ADDBUTTONS
   
    RETURN
   

Source/Library:

  DCDIALOG.CH

See Also:

   dc_qoutwindow()
   dc_qout()



DCREAD GUI

Read the DIALOG GetList with the GUI reader

Syntax:

   DCREAD GUI ;
       [TO < lVar >] ;
       [TITLE < cTitle >] ;
       [OPTIONS < aOptions >] ;
       [BUTTONS < nButtons > | ADDBUTTONS ] ;
       [HANDLERBLOCK < bEventHandler >] [HANDLER < HandlerFunc >] ;
         [REFERENCE < xRef >] ;
       [PARENT @< oDlg >] ;
       [APPWINDOW < oAppWindow >] ;
       [EXIT] ;
       [FIT] ;
       [MODAL] ;
       [EVAL < bEval >] ;
       [SAVE] ;
       [ENTEREXIT] ;
       [ARRAYTRANSLATE] ;
       [SETFOCUS < xObject >] ;
       [GROUP < ancGroup >] ;
       [TIMEOUT < anTimeOut >] ;
       [NODESTROY] ;
       [CLEAREVENTS] ;
       [SETAPPWINDOW] ;
       [POSTEVENT < nEvent >] ;
       [MULTILISTS]
   

Arguments:

   TO < lVar > is a memory variable to store the result of the
   dialog when it is exited.  If it was exited with the OK button,
   or DC_ReadGuiEvent(DCGUI_EXIT_OK,GetList) then < lVar > will be set
   to .TRUE.  If it was exited with the CANCEL button or ESCAPE or
   DC_ReadGuiEvent(DCGUI_EXIT_ABORT,GetList) then < lVar > will be set
   to .FALSE.
   
   TITLE < cTitle > is the title to display on the top of the dialog
   box.
   
   OPTIONS < aOptions > is an array of options for the GUI dialogue
   box.  This is ignored if painting text-based GETS.  See
   DCDIALOG.CH for a description of this array.
   
   BUTTONS < nButtons > will add extra buttons to the bottom area
   of the main dialog window.  < nButtons > is a numeric value
   designating the buttons to add based on the below table.
   DCDIALOG.CH contains DCGUI_BUTTON_* constant definitions for
   the available buttons.  These values are summed to enable multiple
   buttons.
   
   Numeric Value       Description
   ------------------  ---------------------------------------------
   DCGUI_BUTTON_OK     Will add a button with the caption OK.
                       Selecting this button will exit the GUI reader
                       and save all changes to their associated
                       memory variables.
   
   DCGUI_BUTTON_CANCEL Will add a button with the caption CANCEL.
                       Selecting this button will exit the GUI reader
                       and restore all memory variables to their
                       original value.
   
   DCGUI_BUTTON_EXIT   Same as DCGUI_BUTTON_OK except the caption is
                       labeled as EXIT.
   
   Optionally, the ADDBUTTONS clause may be used in place of
   BUTTONS < nButtons >.  This will paint both the OK and CANCEL
   buttons.
   
   NOTE: The added buttons may be aligned left, center or right
         by using the BUTTONALIGN clause of the DCGETOPTIONS command.
   
   
   HANDLERBLOCK < bEventHandler > is a code block which points
   to a custom event handler.  DC_ReadGui() uses it's own, default
   event handler to manage the objects during the running of the
   program.  The default event handler makes a call to the
   custom event handler before processing it's default events.
   The custom event handler uses Appevent() to get information
   on the current event and passes the following parameters:
   
    1. nEvent   - The event type.
    2. mp1      - The first event parameter.
    3. mp2      - The second event parameter.
    4. oXbp     - A pointer to the object creating the event.
    5. oDlg     - A pointer to the main dialogue object.
    6. aGetlist - A pointer to the GetList array.
    7. aRef     - A pointer to an optional Reference array that
                  was passed to DC_ReadGets().
    8. lOk      - A logical value that is .TRUE. if the OK button
                  was clicked and .FALSE. if CANCEL was clicked.
   
    The Function should look like this:
   
    STATIC FUNCTION MyHandler ( nEvent, mp1, mp2, oXbp, oDlg,
                                aGetlist, aRef, lOk )
   
    /* custom code */
   
    RETURN DCGUI_NONE
   
   The function must return a numeric value which controls the
   behavior of the event loop as follows:
   
    Return Value          Behavior
    ------------          --------------------------------------------
    DCGUI_NONE            Continue processing the event
    DCGUI_IGNORE          Ignore event
    DCGUI_CLEAR           Ignore event and clear all events from queue
    DCGUI_EXIT            Exit the DC_ReadGui() reader event loop
    DCGUI_MOVE_UP         Set focus to previous object in Get List
    DCGUI_MOVE_DOWN       Set focus to next object in Get List
    DCGUI_MOVE_TOP        Set focus to first object in Get List
    DCGUI_MOVE_BOTTOM     Set focus to last object in Get List
    DCGUI_MOVE_UP_PAR     Set focus to previous object in Get List that
                          has the same parent as the current object.
    DCGUI_MOVE_DOWN_PAR   Set focus to next object in Get List that
                          has the same parent as the current object.
    DCGUI_MOVE_TOP_PAR    Set focus to first object in Get List that
                          has the same parent as the current object.
    DCGUI_MOVE_BOTTOM_PAR Set focus to last object in Get List that
                          has the same parent as the current object.
    DCGUI_NOHOTKEY        Don't activate hot key associated with
                          the current object.
   
   As an alternative the clause HANDLER < HandlerFunc > may be used, where
   < HandlerFunc > is the name of the function.  The code block will be
   created from the function name.
   
   REFERENCE < aRef > is any array or variable to pass to the handler
   function.  Programming dialogue systems that must manipulate
   many variables is much simpler if all the variables are placed
   into a single array and then passed to the dialogue system and
   its event handler.  See example 2.
   
   PARENT @< oDialog > is a reference to a parent dialog or to a
   memory variable to store a reference to the dialog that will be
   created.  If < oDialog > has already been created as an Xbase Parts
   class object, it will become the parent for all the objects in
   the GetList.  If < oDialog > is passed by reference as a NIL, the
   dialog object created by the reader will be stored in this
   memory variable.  NOTE: Xbase++ does not allow < oDialog > to be
   a PRIVATE or a PUBLIC variable if it is passed by reference.
   
   The parent of the dialog that will be created is referenced by
   APPWINDOW < oAppWindow >.  If no < oAppWindow > argument is used
   then the parent of the created dialog will be AppDeskTop().
   
   FIT will automatically form the dialog screen to fit comfortably
   around the objects within the dialog.  This option allows the
   programmer to use coordinates on dialog objects for relative
   addressing only without worrying about how the objects relate to
   the borders of the main dialog.  After all the objects are
   created, the main dialog borders will be sized to fit the
   objects.  The amount of dead space padding is set by using the
   FITPAD clause of the DCGETOPTIONS command.  The default is 10
   pixels.
   
   
   CAUTION: Do not use GRASTRING clause of @..DCSAY or DCGRA*
            commands with the FIT clause of DCREAD GUI or the
            AUTOSIZE clause of DCGETOPTIONS, unless the DCGRA*
            object is drawn on an object that does not get resized
            or repositioned at a later time.  Auto-Sizing and
            Auto-Fitting is accomplished by traversing child list
            of the Parent object and reading the size and/or
            coordinates of all objects.  DCGRA* commands are not
            objects, therefore they cannot be repositioned
            correctly.
   
   EXIT will exit the reader after the objects are created and will
   not enter the reader's event loop.  It is the responsibility of
   the programmer to insure that events are managed and the dialog
   is destroyed.  This feature is used to add more objects to an
   existing dialog, or to create a dialog that will be managed by
   an external event loop.
   
   APPWINDOW < oAppWindow > is the parent object for the main dialog.
   If this option is not used then the AppDeskTop() will be used
   as the application window.
   
   MODAL will set this dialog modal state to MODAL -
   APPLICATION WIDE. If this option is not used, then the dialog
   with be NON-MODAL.
   
   NOTE: For MODAL windows to function properly, the calling window
         must be the SetAppWindow().  This can be accomplished quite
         easily by using the EVAL clause of the DCREAD GUI command
         like so:
   
          DCREAD GUI ;
            FIT ;
            ADDBUTTONS ;
            MODAL ;
            EVAL {|o|SetAppWindow(o)}
   
   EVAL < bEval > is an optional code block to evaluate after all the
   objects are created and just before entering the event loop.
   The main dialog object is passed to this code block as an
   argument.
   
   SAVE will save the GetList array after returning from the text
   or GUI reader.  If the SAVE clause is not used, the GetList
   array will be re-initialized to an empty array.
   
   ENTEREXIT will exit the dialog if the ENTER key is pressed in the
   "last GET".  If this option is not used, then pressing the ENTER
   key in the last GET will cause the first GET to receive focus
   provided that SET WRAP is ON, otherwise pressing ENTER in the
   last GET will have no affect.
   
   ARRAYTRANSLATE will translate the HEIGHT, WIDTH, START COLUMN and
   START ROW elements in the GETLIST array to pixel coordinates and
   write these coordinates back to the original GETLIST array.  It
   will also write the translated  Dialog window coordinates to the
   GETOPTIONS array and set the TRANSLATE flag in the GETOPTIONS
   array to .FALSE.
   
   < oOwner > is the owner of the Dialog window that is created by
   DC_ReadGui().
   
   SETFOCUS < xObject > is the object that receives focus when entering
   the event handler. < xObject > may be a type "O" (object), a type
   "N" (numeric) or a type "C" character.  If < xObject > is a type "O"
   the pass-by-reference operator should be used like so: @< xObject >.
   If < xObject > is a type "N" then the numeric value must be a
   number from 1 to the length of the GetList.  This is an ordinal
   pointer to the GetList item. If < xObject > is a type "C" then the
   character string value must be a value equivalent to the ID of
   the item in the GetList which is to receive focus.
   
   GROUP < ancGroup > is the GetList group to create.  Each item in
   the GetList may be assigned a group name or number via the
   GROUP < ancGroup > clause.  If a numeric or character value is
   passed then only the items in the GetList which match < ancGroup >
   will be created.  < ancGroup > may consist of an array of numeric
   values or character values so that more than one group may be
   created. If < ancGroup > is a nil then all items in the GetList
   will be refreshed.
   
   TIMEOUT < anTimeOut > is used to exit the dialog after a specified
   number of seconds.  < anTimeOut > may be a numeric value equivalent
   to the number of seconds or an array of two elements as defined
   below:
   
    ELEMENT  TYPE  DESCRIPTION
    -------  ----  ------------------------------------------------
       1       N   The timeout in seconds
       2       B   A code block to execute after the timeout.  The
                   code block must return a logical value.  If a .T.
                   is returned the exit will occur, otherwise the
                   timeout will be reset.
   
   NODESTROY will preserve the dialog window that is created when
   a NIL PARENT clause is used.  By default, this window is
   automatically destroyed when exiting the read.
   
   CLEAREVENTS will clear all events from the event queue before
   starting up the event loop.  Many times there are many extra
   xbeP_Paint events created by DC_ReadGui(), especially when
   creating browse screens to insure that all browse objects are
   stablized.  If you see a flicker in the screen at startup it
   is recommended that you use the CLEAREVENTS clause.
   
   SETAPPWINDOW is important for proper modality.  If your dialog
   calls popup windows in validations, popup buttons, etc. you
   will want to insure that the called window is MODAL.  If you
   use the MODAL clause in the DCREAD GUI command of a popup
   window it will not work properly unless the calling window is
   the "application window".  This is accomplished with the
   SETAPPWINDOW clause.  When returning from DCREAD GUI the
   application window will be restored to the previous setting.
   
   POSTEVENT < nEvent > will post an event to the event queue
   before starting up the event loop.
   
   MULTILISTS changes the behavior of the event loop slightly so
   one event loop can work with multiple GetLists.  This clause
   is needed only if the application will be creating new dialogs
   or new objects with the DCREAD GUI EXIT command and returning
   control to the main event loop.
   

Description:

    DCREAD GUI is used to process the Getlist array using the GUI
    Dialog reader.
   
    This is the equivalent to DC_ReadGui().
    It uses the GetList array of dialogue definitions created by the
    DC* commands in DCDIALOG.CH, DCDIR.CH, DCAPP.CH and
    DCTREE.CH.
   
    An array of DIALOG definitions must exist when using this command
    and it must have the variable name GETLIST.
   

Examples:

    -- Example 1 --
   /*
   This example will display a list of fields in the
   "Available Fields" selection, allow the operator to
   select a set of fields, then display a Browse of the
   database for the fields selected.  The example shows
   how to use DCREAD GUI to create a master dialog and
   a sub dialog.
   */
   
   
   #include "dcpick.ch"
   
   
   PROCEDURE XTest( )
   
   LOCAL GetList := {}, GetOptions, cAlias, aListField, ;
         aPickField, oBrowse, oDialog
   
   USE COLLECT NEW SHARED
   
   cAlias := 'COLLECT'
   aListField := Array(FCount())
   AFields(aListField)
   
   @ 2,3 DCPICKLIST aPickField LIST aListField ;
      CAPTION "Available Fields", "Selected Fields" ;
      SIZE 35,12 ;
      DATALINK {||BrowseCollect(cAlias,oDialog,@oBrowse,@aPickField)}
   
   DCGETOPTIONS ;
      WINDOWHEIGHT 360 ;
      WINDOWWIDTH 600
   
   DCREAD GUI ;
      TITLE "Picklist Demo" ;
      OPTIONS GetOptions ;
      PARENT @oDialog ;
      ADDBUTTONS
   
   RETURN
   
   /* --------------------- */
   
   STATIC FUNCTION BrowseCollect ( cAlias, oDialog, oBrowse, aPickField )
   
   LOCAL GetList := {}, i, aChildList
   
   IF Valtype(oBrowse) = 'O'
     aChildList := oBrowse:ChildList()
     FOR i := 1 TO Len(aChildList)
       aChildList[i]:Destroy()
     NEXT
     oBrowse:Destroy()
   ENDIF
   
   oBrowse := nil
   
   IF Empty(aPickField)
     RETURN nil
   ENDIF
   
   @ 2,40 DCBROWSE oBrowse DATA cAlias SIZE 39,12 PARENT oDialog:drawingArea
   
   SELECT collect
   FOR i := 1 TO Len(aPickField)
     DCBROWSECOL DATA &('{||COLLECT->'+aPickField[i]+'}') ;
       HEADER aPickField[i] PARENT oBrowse
   NEXT
   
   DCREAD GUI ;
      PARENT oDialog ;
      EXIT
   
   oBrowse:hide()
   oBrowse:show()
   
   RETURN nil
   
   
   --- Example 2 ---
   
   This example shows how to use the DCGUI_NOHOTKEY return value
   in a custom handler.  Return this value from any custom event
   handler to disable the hotkey processing of the event.  This was
   added to solve a problem with a customer who used ACCELKEY
   parameters of xbeK_CTRL_M (ENTER) and xbeK_CTRL_I (TAB) as hot
   keys but wanted the pressing of ENTER and TAB to behave normally
   and not activate the hotkey.
   
   aButtons := { xbeK_CTRL_M, {||Ctrl_M_Key()}, ;
                 xbeK_CTRL_I, {||Ctrl_I_Key()} }
   
   @ 1,0 DCPUSHBUTTON .. ACTION aButtons[1,2] ACCELKEY aButtons[1,1]
   @ 2,0 DCPUSHBUTTON .. ACTION aButtons[2,2] ACCELKEY aButtons[2,1]
   
   bHandler := {|a,b,c,d,e,f,g,h|My_EventHandler(a,b,c,d,e,f,@g,h)}
   
   DCREAD GUI HANDLERBLOCK bHandler
   
   STATIC FUNCTION ;
     My_EventHandler( nEvent, mp1, mp2, oXbp, oDlg, GetList, aButtons )
   
   LOCAL nButton, nKeyState := AppKeyState( xbeK_CTRL )
   
   IF nEvent == xbeP_Keyboard
     nButton := AScan( aButtons, {|a|a[1]==mp1} )
     IF nButton > 0
       IF nKeyState == 1  // Ctrl key down
         Eval( aButtons[nButton,2], nil, nil, oXbp )
         RETURN DCGUI_IGNORE
       ELSE // Ctrl key up
         RETURN DCGUI_NOHOTKEY
       ENDIF
     ENDIF
   ENDIF
   RETURN DCGUI_NONE
   

Source/Library:

  DCDIALOG.CH

See Also:

   dc_readgui()
   DCGETOPTIONS
   dc_getrefresh()



DCREAD HTML

Read the DIALOG GetList with the HTML reader

Syntax:

   DCREAD HTML                                                       ;
         [ TO < cHtml > ]                                                    ;
         [ TITLE < cTitle > ]                                                ;
         [ PARENT < oParent > ]                                              ;
         [ ROOTDIR < cRootDir > ]                                            ;
         [ OBJECT < oHtml > ]                                                ;
         [ MESSAGEINTO < cMessageInto > [TARGET < cTarget >] ]                 ;
   

Arguments:

   TO < cHtml > is a memory variable to store the HTML source
   code that is a result of evaluating the GetList.
   
   TITLE < cTitle > is the title to display on the top of the
   browser window.
   
   PARENT < oParent > is any parent DC_Html*() object previously
   created by DCREAD HTML.
   
   ROOTDIR < cRootDir > is the root directory where other HTML
   documents or images reference in the HTML code exist.
   
   OBJECT < oHtmlMain > is the name of a variable to store a
   a pointer to the DC_HtmlMain() object created by the HTML
   reader.  This object can be stored to a static variable or
   state management cargo system to maintain the state of the
   application.
   
   MESSAGEINTO < cMessageInto > is the name of a variable that
   will be passed in a < a href > tag with the message text of
   any object that uses the message clause.  This is activated
   when the user clicks on the underlined screen prompt.
   TARGET < cTarget > is the name of the Web Browser frame to
   invoke the message call.  If this argument is not used,
   then a new browser window will be displayed.
   
   variable.
   

Description:

    DCREAD HTML is used to process the Getlist array using the GUI
    HTML reader.
   
    This is the equivalent to DC_ReadHtml().
    It uses the GetList array of dialogue definitions created by the
    DC* commands in DCDIALOG.CH and DCHTML.CH.
   
    An array of DIALOG definitions must exist when using this command
    and it must have the variable name GETLIST.
   

Source/Library:

  DCHTML.CH

See Also:

   dc_readhtml()



DCREAD TEXT

Read the DIALOG GetList

Syntax:

   DCREAD TEXT ;
       [TITLE < cTitle >] ;
       [TO < lVar >] ;
       [SAVE]
   

Arguments:

   The GetList is passed to DC_READMODAL() - the text reader.
   
   TO < lVar > is a memory variable to store the result of the
   dialog when it is exited.  If it was exited with the OK button,
   or DC_ReadGuiEvent(DCGUI_EXIT_OK,GetList) then < lVar > will be set
   to .TRUE.  If it was exited with the CANCEL button or ESCAPE or
   DC_ReadGuiEvent(DCGUI_EXIT_ABORT,GetList) then < lVar > will be set
   to .FALSE.
   
   TITLE < cTitle > is the title to display on the top of the dialog
   box.
   
   SAVE will save the GetList array and not reinitialize it
   to an empty array.
   

Description:

    DCREAD TEST is used to process the Getlist array using the
    TEXT Dialog reader.
   
    This is the equivalent to DC_ReadModal().
    It uses the GetList array of dialogue objects created by the
    DC* commands in DCDIALOG.CH.
   
    An array of DIALOG definitions must exist when using this command
    and it must have the variable name GETLIST.
   

Source/Library:

  DCDIALOG.CH

See Also:

   dc_readgets()



DCSETGROUP

Set the GROUP name for successive DC* commands

Syntax:

   DCSETGROUP [TO] [< cGroup >]
   

Arguments:

   TO < cGroup > is the name of the group.
   

Description:

    The command DCSETGROUP creates a new GROUP definition and
    adds the definition to the array named GETLIST which is later
    processed by the DC_READGUI() function or by the DCREAD GUI
    command.  DCSETGROUP is used to set the default GROUP name to
    be used for all successive DC* commands when the GROUP clause
    is not used.
   

Examples:

   #include "dcdialog.ch"
   
   PROCEDURE Xtest()
   
   LOCAL oTabPage1, oTabPage2, GetList := {}
   
   @ 1,1 DCTABPAGE oTabPage1 CAPTION 'Page 1' SIZE 50,10
   
   DCSETPARENT TO oTabPage1
   DCSETGROUP TO 'PAGE1'
   
   @ 2,2 DCSAY 'This goes on Tab Page ONE'
   @ 4,2 DCSAY 'This goes on Tab Page ONE too!'
   @ 6,2 DCSAY 'This goes on Tab Page ONE too!'
   
   DCSETPARENT TO
   DCSETGROUP TO
   
   @ 0,0 DCTABPAGE oTabPage2 CAPTION 'Page 2' RELATIVE oTabPage1
   
   DCSETPARENT TO oTabPage2
   DCSETGROUP TO 'PAGE2'
   
   @ 2,2 DCSAY 'This goes on Tab Page TWO'
   @ 4,2 DCSAY 'This goes on Tab Page TWO too!'
   @ 6,2 DCSAY 'This goes on Tab Page TWO too!'
   
   DCREAD GUI FIT ADDBUTTONS TITLE 'Example of DCSETGROUP command'
   
   RETURN nil
   

Source/Library:

  DCDIALOG.CH

See Also:

   DC_GetRefresh()



DCSETPARENT

Set the Parent object for successive DC* commands

Syntax:

   DCSETPARENT [TO] [< oParent >]
   

Arguments:

   TO < oParent > is the variable that points to the object to set as
   the default parent.  If this parameter is not used, then the
   parent is set to the main dialog window.
   

Description:

    The command DCSETPARENT creates a new Parent object definition
    adds the definition to the array named GETLIST which is later
    processed by the DC_READGUI() function or by the DCREAD GUI
    command.  DCSETPARENT is used to set the default object to be
    used for all successive DC* commands when the PARENT clause is
    not used.
   

Examples:

   #include "dcdialog.ch"
   
   PROCEDURE Xtest()
   
   LOCAL oTabPage1, oTabPage2, GetList := {}
   
   @ 1,1 DCTABPAGE oTabPage1 CAPTION 'Page 1' SIZE 50,10
   
   DCSETPARENT TO oTabPage1
   
   @ 2,2 DCSAY 'This goes on Tab Page ONE'
   @ 4,2 DCSAY 'This goes on Tab Page ONE too!'
   @ 6,2 DCSAY 'This goes on Tab Page ONE too!'
   
   DCSETPARENT TO
   
   @ 0,0 DCTABPAGE oTabPage2 CAPTION 'Page 2' RELATIVE oTabPage1
   
   DCSETPARENT TO oTabPage2
   
   @ 2,2 DCSAY 'This goes on Tab Page TWO'
   @ 4,2 DCSAY 'This goes on Tab Page TWO too!'
   @ 6,2 DCSAY 'This goes on Tab Page TWO too!'
   
   DCREAD GUI FIT ADDBUTTONS TITLE 'Example of DCSETPARENT command'
   
   RETURN nil
   

Source/Library:

  DCDIALOG.CH

DCSTATUSBAR

Create a Status Bar area on the perimiter of a dialog

Syntax:

   DCSTATUSBAR < oObject >          ;
         [TYPE < nType >]           ;
         [ALIGN < nAlign >]         ;
         [HEIGHT < nHeight >]       ;
         [WIDTH < nWidth >]         ;
         [SPACING < nSpacing >]     ;
         [CARGO < xCargo >]         ;
         [PRESENTATION < aPres >]   ;
         [PREEVAL < bPreEval >] ;
         [EVAL < bEval >]           ;
         [TITLE < cTitle >]         ;
         [HIDE < bHide >]           ;
         [ID < cId >]               ;
         [GROUP < cGroup >]
   

Arguments:

   < oStatus > is the name of the variable to assign as a storage
   place for this object.
   
   TYPE < nType > is the type of status bar.  Status Bars are created
   using XbpStatic() objects, so valid constants start with the
   prefix XBPSTATIC_TYPE_ and are listed in XBP.CH.  The default
   is XBPSTATIC_TYPE_RAISEDBOX.
   
   ALIGN < nAlign > is a numeric constant defined in DCDIALOG.CH.
   
   DCGUI_ALIGN_TOP    - Attach statusbar to top of window
   DCGUI_ALIGN_BOTTOM - Attach statusbar to bottom of window
   DCGUI_ALIGN_RIGHT  - Attach statusbar to right side of window
   DCGUI_ALIGN_LEFT   - Attach statusbar to left side of window
   
   HEIGHT < nHeight > is the height (in pixels) of the status bar if
   it has a top or bottom alignment.  This clause is ignored if the
   status bar has a left or right alignment.
   
   WIDTH < nWidth > is the width (in pixels) of the status bar if
   it has a left or right alignment.  This clause is ignored if the
   status bar has a top or bottom alignment.
   
   SPACING < nSpacing > is the number of pixels between child objects
   on the status bar.  The default is 3 pixels.  When a child object
   is placed on a top or bottom status bar, only the < row > address
   is significant because this determines the vertical location of
   the object on the status bar.  The < column > address is ignored
   because the object is placed to the right of the previous child
   object spaced by < nSpacing > pixels.  When a child object is
   placed on a left or right status bar, only the < column > address
   is significant because this determines the horizontal location
   of the object on the status bar.  The < row > address is ignored
   because the object is below the previous child object spaced by
   < nSpacing > pixels.
   
   PRESENTATION < aPres > is a two-dimensional array. If specified,
   this contains presentation parameters for the Statusbar object.
   The first column of the array must contain #define constants
   from the XBP.CH file starting with the prefix XBP_PP_. These
   constants define the presentation parameters that can be set
   for the object and include colors and fonts. The second column
   of the array in < aPres > contains the value for each setting.
   These are also generally set using #define constants from the
   GRA.CH file.
   
   PREEVAL < bPreEval > is a code block to be evaluated by the GUI
   reader before the Xbase Parts object is created.  The object is
   passed to the code block.
   
   EVAL < bEval > is a code block to be evaluated by the GUI reader
   after the Status Bar object is created.  The object is passed
   to the code block.
   
   HIDE < bHide > is a code block that is evaluated in the event loop.
   This code block must return a logical value.  If the value
   returned is .TRUE. then the status bar will be hidden from view.  If
   the value returned is .FALSE. then the status bar will be displayed.
   The object is passed as a parameter to the code block.
   
   CARGO < xCargo > is any kind of data you wish to to add to the
   :cargo container for this object.  The cargo may be accessed
   at any time via the :cargo exported variable, however it will not
   be stored in the same manner it is entered.  The :cargo container
   of DCDIALOG objects is an array of at least three elements:
   
    [1] - A numeric value that is a pointer to the Getlist array
          for this object.
   
    [2] - A pointer to the GetList array.
   
    [3] - The value of < xCargo >.
   
    [4] and up - optional values added by the GUI reader.
   
   ID < cId > is a unique identifier for this object.  This ID is used
   with functions like DC_GETOBJECT() to determine the status
   of a get object.
   
   TITLE < cTitle > is a title to assign to this object.  The title
   is not displayed on the screen but is simply a description of the
   get object which is saved in the GetList.
   
   GROUP < cGroup > is a "group" name (case-sensitive) to assign to
   this GetList object.  Assignment to a group makes it possible to
   perform operations only on GetList items which are members of a
   specified group, using functions such as DC_GetRefresh() or
   DC_ReadGui().
   

Description:

   DCSTATUSBAR is used to create areas around the perimiter of the
   a dialog window that are automatically resized when the dialog
   is resized and are children of the main XbpDialog() object
   rather than the drawingArea.  This allows for toolbars, message
   areas, progress bars, etc that are anchored to the main dialog
   window and cannot be hidden by other child windows.
   
   A single dialog may have multiple status bars.  Each status bar
   can be individually hidden from view which will shift all other
   status bars to the top, bottom, etc.  The status bar is a window
   of the XbpStatic() type class and can be the parent of any other
   type of DC* object.
   

Examples:

   /*
   This example demonstrates status bars of all four alignment
   styles in an MDI application.  The first status bar is used as
   a toolbar with buttons to HIDE or SHOW the other status bars.
   */
   
   
   FUNCTION XTest()
   
   LOCAL GetList := {}, GetOptions, oMenuBar, oFileMenu, oToolBottom, ;
         oDlg, oDrawingArea, oStatBottom, bReSize, oMsgBox, oProgress, ;
         oMsgStatic, lTesting := .f., oInsStatic, oNumStatic, ;
         oCapsStatic, oStatTop, oToolTop, oStatTop2, oToolTop2, ;
         lHideStatus2 := .f., lHideStatus3 := .f., lHideStatus4 := .f., ;
         lHideStatus5 := .f., oStatLeft1, oStatLeft2, oStatRight1, ;
         oToolLeft1, oToolleft2, oToolRight1, oProgressStatic, ;
         oStatRight2, oToolRight2, lHideStatus6 := .f., lHideStatus7 := .f.
   
   DCMENUBAR oMenuBar
   
     DCSUBMENU oFileMenu CAPTION 'File' ;
       MESSAGE 'File Options' INTO oMsgBox ;
       PARENT oMenuBar
   
       DCMENUITEM CAPTION 'Browse' ;
         MESSAGE 'Browse the Documentation Database' ;
         INTO oMsgBox ;
         PARENT oFileMenu ;
         ACTION {|o|o:=Thread():new(), ;
                 o:start({||BrowseWindow(oDlg:drawingArea,oMsgBox,;
                            oProgress,@lTesting,GetList)}) }
   
       DCMENUITEM CAPTION 'Exit' ;
         MESSAGE 'Quit this Program' INTO oMsgBox ;
         PARENT oFileMenu ;
         ACTION {||DC_ReadGuiEvent(DCGUI_EXIT_OK,GetList)}
   
   // Top Statusbar #1 with Toolbar
   DCSTATUSBAR oStatTop HEIGHT 20 ALIGN DCGUI_ALIGN_TOP SPACING 0
   
   @ 0,0 DCTOOLBAR oToolTop SIZE 400,20 BUTTONSIZE 100,20 ;
         TYPE XBPSTATIC_TYPE_RAISEDBOX PARENT oStatTop PIXEL
   
   DCADDBUTTON CAPTION 'Top ToolBar 2' ;
     ACTION {||lHideStatus2 := !lHideStatus2, ;
               DC_GetRefresh(GetList), ;
               DC_StatusBarRePaint(oDlg)} ;
     PARENT oToolTop PIXEL
   
   DCADDBUTTON CAPTION 'Bottom StatusBar' ;
     ACTION {||lHideStatus3 := !lHideStatus3, ;
               DC_GetRefresh(GetList), ;
               DC_StatusBarRePaint(oDlg)} ;
     PARENT oToolTop PIXEL
   
   DCADDBUTTON CAPTION 'Left ToolBar #1' ;
     ACTION {||lHideStatus4 := !lHideStatus4, ;
               DC_GetRefresh(GetList), ;
               DC_StatusBarRePaint(oDlg)} ;
     PARENT oToolTop PIXEL
   
   DCADDBUTTON CAPTION 'Left ToolBar #2' ;
     ACTION {||lHideStatus5 := !lHideStatus5, ;
               DC_GetRefresh(GetList), ;
               DC_StatusBarRePaint(oDlg)} ;
     PARENT oToolTop PIXEL
   
   DCADDBUTTON CAPTION 'Right ToolBar #1' ;
     ACTION {||lHideStatus6 := !lHideStatus6, ;
               DC_GetRefresh(GetList), ;
               DC_StatusBarRePaint(oDlg)} ;
     PARENT oToolTop PIXEL
   
   DCADDBUTTON CAPTION 'Right ToolBar #2' ;
     ACTION {||lHideStatus7 := !lHideStatus7, ;
               DC_GetRefresh(GetList), ;
               DC_StatusBarRePaint(oDlg)} ;
     PARENT oToolTop PIXEL
   
   
   // Top Statusbar #2 (Hideable) with toolbar
   DCSTATUSBAR oStatTop2 HEIGHT 20 ALIGN DCGUI_ALIGN_TOP ;
      HIDE {||lHideStatus2}
   
   @ 0,0 DCTOOLBAR oToolTop2 SIZE 400,20 BUTTONSIZE 50,20 ;
         TYPE XBPSTATIC_TYPE_RAISEDBOX PARENT oStatTop2 PIXEL
   
   DCADDBUTTON CAPTION 'Button4' ;
     ACTION {||DC_ReadGuiEvent(DCGUI_EXIT_OK,GetList)} ;
     PARENT oToolTop2 PIXEL
   
   DCADDBUTTON CAPTION 'Button5' ;
     ACTION {||DC_ReadGuiEvent(DCGUI_EXIT_OK,GetList)} ;
     PARENT oToolTop2 PIXEL
   
   DCADDBUTTON CAPTION 'Button6' ;
     ACTION {||DC_ReadGuiEvent(DCGUI_EXIT_OK,GetList)} ;
     PARENT oToolTop2 PIXEL
   
   // Bottom Statusbar (Hideable) with message, scrollbar, buttons, key status
   DCSTATUSBAR oStatBottom HEIGHT 28 ALIGN DCGUI_ALIGN_BOTTOM ;
      HIDE {||lHideStatus3}
   
   @ 3,0 DCSTATIC TYPE XBPSTATIC_TYPE_RECESSEDBOX ;
         SIZE 300,20 ;
         PARENT oStatBottom PIXEL OBJECT oMsgStatic
   
   @ 2,2 DCMESSAGEBOX TYPE XBPSTATIC_TYPE_TEXT ;
         SIZE 300,20 MOTION ;
         COLOR GRA_CLR_BLUE, GRA_CLR_BACKGROUND ;
         OBJECT oMsgBox PARENT oMsgStatic PIXEL
   
   @ 3,0 DCSTATIC TYPE XBPSTATIC_TYPE_RECESSEDBOX ;
         OBJECT oProgressStatic ;
         SIZE 100,20 PARENT oStatBottom PIXEL
   
   @ 2,3 DCPROGRESS oProgress ;
         COLOR GRA_CLR_DARKRED, GRA_CLR_BACKGROUND ;
         TYPE XBPSTATIC_TYPE_TEXT ;
         SIZE 96,16 PARENT oProgressStatic PIXEL
   
   @ 3,0 DCTOOLBAR oToolBottom SIZE 126,20 BUTTONSIZE 40,20 ;
         TYPE XBPSTATIC_TYPE_RECESSEDBOX PARENT oStatBottom PIXEL
   
   DCADDBUTTON CAPTION '&Exit' ;
     ACTION {||DC_ReadGuiEvent(DCGUI_EXIT_OK,GetList)} ;
     PARENT oToolBottom PIXEL
   
   DCADDBUTTON TYPE XBPSTATIC_TYPE_RAISEDBOX SIZE 3,22 ;
     PARENT oToolBottom PIXEL
   
   DCADDBUTTON CAPTION '&Cancel' ;
     ACTION {||lTesting := .f.} ;
     WHEN {||lTesting} ;
     PARENT oToolBottom PIXEL
   
   DCADDBUTTON TYPE XBPSTATIC_TYPE_RAISEDBOX SIZE 3,22 ;
     PARENT oToolBottom PIXEL
   
   DCADDBUTTON CAPTION '&Browse' ;
     PARENT oToolBottom ;
     ACTION {|o|o:=Thread():new(), ;
       o:start({||BrowseWindow(oDlg:drawingArea,oMsgBox:ChildList()[1], ;
                   oProgress,@lTesting,GetList)}) } ;
     PIXEL
   
   @ 3,0 DCSTATIC TYPE XBPSTATIC_TYPE_RECESSEDBOX ;
         SIZE 30,20 PARENT oStatBottom PIXEL OBJECT oCapsStatic
   
   @ 1,1 DCSAY '' PARENT oCapsStatic ID 'CAPSLOCK' ;
         SAYSIZE 28,18 SAYCENTER PIXEL
   
   @ 3,0 DCSTATIC TYPE XBPSTATIC_TYPE_RECESSEDBOX ;
         SIZE 30,20 PARENT oStatBottom PIXEL OBJECT oNumStatic
   
   @ 1,1 DCSAY '' PARENT oNumStatic ID 'NUMLOCK' ;
         SAYSIZE 28,18 SAYCENTER PIXEL
   
   @ 3,0 DCSTATIC TYPE XBPSTATIC_TYPE_RECESSEDBOX ;
         SIZE 30,20 PARENT oStatBottom PIXEL OBJECT oInsStatic
   
   @ 1,1 DCSAY '' PARENT oInsStatic ID 'INSERT' ;
         SAYSIZE 28,18 SAYCENTER PIXEL
   
   
   // Left Statusbar #1 (Hideable) with toolbar
   DCSTATUSBAR oStatLeft1 WIDTH 45 ALIGN DCGUI_ALIGN_LEFT ;
      HIDE {||lHideStatus4} TYPE XBPSTATIC_TYPE_TEXT
   
   @ 0,0 DCTOOLBAR oToolLeft1 SIZE 45,1000 BUTTONSIZE 45,20 ;
         TYPE XBPSTATIC_TYPE_RAISEDBOX PARENT oStatLeft1 PIXEL
   
   DCADDBUTTON CAPTION '1-Test1' PARENT oToolLeft1 PIXEL
   DCADDBUTTON CAPTION '1-Test2' PARENT oToolLeft1 PIXEL
   DCADDBUTTON CAPTION '1-Test3' PARENT oToolLeft1 PIXEL
   DCADDBUTTON CAPTION '1-Test4' PARENT oToolLeft1 PIXEL
   
   // Left Statusbar #2 (Hideable) with toolbar
   DCSTATUSBAR oStatLeft2 WIDTH 45 ALIGN DCGUI_ALIGN_LEFT ;
      HIDE {||lHideStatus5} TYPE XBPSTATIC_TYPE_TEXT
   
   @ 0,0 DCTOOLBAR oToolLeft2 SIZE 45,1000 BUTTONSIZE 45,20 ;
         TYPE XBPSTATIC_TYPE_RAISEDBOX PARENT oStatLeft2 PIXEL
   
   DCADDBUTTON CAPTION '2-Test1' PARENT oToolLeft2 PIXEL
   DCADDBUTTON CAPTION '2-Test2' PARENT oToolLeft2 PIXEL
   DCADDBUTTON CAPTION '2-Test3' PARENT oToolLeft2 PIXEL
   DCADDBUTTON CAPTION '2-Test4' PARENT oToolLeft2 PIXEL
   
   // Right Statusbar #1 (Hideable) with toolbar
   DCSTATUSBAR oStatRight1 WIDTH 30 ALIGN DCGUI_ALIGN_RIGHT ;
      HIDE {||lHideStatus6} TYPE XBPSTATIC_TYPE_TEXT
   
   @ 0,0 DCTOOLBAR oToolRight1 SIZE 30,1000 BUTTONSIZE 30,25 ;
         TYPE XBPSTATIC_TYPE_RAISEDBOX PARENT oStatRight1 PIXEL
   
   DCADDBUTTON CAPTION BITMAP_EXECUTE_M PARENT oToolRight1 PIXEL
   DCADDBUTTON CAPTION BITMAP_UNDO_M PARENT oToolRight1 PIXEL
   DCADDBUTTON CAPTION BITMAP_REDO_M PARENT oToolRight1 PIXEL
   DCADDBUTTON CAPTION BITMAP_BOLD_M PARENT oToolRight1 PIXEL
   DCADDBUTTON CAPTION BITMAP_ITALIC_M PARENT oToolRight1 PIXEL
   DCADDBUTTON CAPTION BITMAP_UNDERLINE_M PARENT oToolRight1 PIXEL
   DCADDBUTTON CAPTION BITMAP_CODEWRITE_M PARENT oToolRight1 PIXEL
   DCADDBUTTON CAPTION BITMAP_CONFIG_M PARENT oToolRight1 PIXEL
   DCADDBUTTON CAPTION BITMAP_DESIGN_M PARENT oToolRight1 PIXEL
   DCADDBUTTON CAPTION BITMAP_COMMENT_M PARENT oToolRight1 PIXEL
   
   
   // Right Statusbar #2 (Hideable) with toolbar
   DCSTATUSBAR oStatRight2 WIDTH 30 ALIGN DCGUI_ALIGN_RIGHT ;
      HIDE {||lHideStatus7} TYPE XBPSTATIC_TYPE_TEXT
   
   @ 0,0 DCTOOLBAR oToolRight2 SIZE 30,1000 BUTTONSIZE 30,25 ;
         TYPE XBPSTATIC_TYPE_RAISEDBOX PARENT oStatRight2 PIXEL
   
   DCADDBUTTON CAPTION BITMAP_BROWSER_M PARENT oToolRight2 PIXEL
   DCADDBUTTON CAPTION BITMAP_CHECKBOX_M PARENT oToolRight2 PIXEL
   DCADDBUTTON CAPTION BITMAP_LISTBOX_M PARENT oToolRight2 PIXEL
   DCADDBUTTON CAPTION BITMAP_DIALOG_M PARENT oToolRight2 PIXEL
   DCADDBUTTON CAPTION BITMAP_EDIT_M PARENT oToolRight2 PIXEL
   DCADDBUTTON CAPTION BITMAP_SPINBUTTON_M PARENT oToolRight2 PIXEL
   DCADDBUTTON CAPTION BITMAP_MLE_M PARENT oToolRight2 PIXEL
   DCADDBUTTON CAPTION BITMAP_GET_M PARENT oToolRight2 PIXEL
   
   
   DCHOTKEY xbeK_INS ACTION {||ReadInsert(!ReadInsert())}
   
   DCGETOPTIONS WINDOWWIDTH 610 ;
                WINDOWHEIGHT 400
   
   DCREAD GUI OPTIONS GetOptions ;
      PARENT @oDlg ;
      TITLE 'Status Bar Example' ;
      EVAL {|o|SetTimerEvent(100,{||_UpdateStats(GetList)}) }
   
   SetTimerEvent(0)
   
   RETURN nil
   
   * ------------------
   
   STATIC FUNCTION _UpdateStats( GetList )
   
   LOCAL oCapsLock := DC_GetObject(GetList,'CAPSLOCK')
   LOCAL oNumLock  := DC_GetObject(GetList,'NUMLOCK')
   LOCAL oInsert   := DC_GetObject(GetList,'INSERT')
   LOCAL lCaps     := AppKeystate( VK_CAPITAL, .T. )
   LOCAL lNum      := AppKeystate( VK_NUMLOCK, .T. )
   
   IF lNum == APPKEY_PRESSED
     oNumlock:SetCaption( "Num" )
   ELSE
     oNumlock:SetCaption( "" )
   ENDIF
   IF lCaps == APPKEY_PRESSED
     oCapslock:SetCaption( "Caps" )
   ELSE
     oCapslock:SetCaption( "" )
   ENDIF
   IF ReadInsert()
     oInsert:SetCaption( "Ins" )
   ELSE
     oInsert:SetCaption( "Ovr" )
   ENDIF
   
   RETURN nil
   
   * ------------
   
   STATIC FUNCTION BrowseWindow( oDlg, oMsgBox, oProgress, ;
                   lTesting, aMainGetList )
   
   LOCAL GetList := {}, oBrowse, GetOptions
   
   IF !File('..\XDOC\EXPRESS.DBF')
     DC_MsgBox({'Sorry.  The database required to show this feature',;
                'is not included in the demonstration version', ;
                'or the ..\XDOC\EXPRESS.DBF file does not exist'})
     RETURN nil
   ENDIF
   
   SET DEFA TO ..\XDOC
   USE EXPRESS VIA FOXCDX SHARED ALIAS 'XDOC'
   SET INDEX TO EXPRESS.CDX
   OrdSetFocus('COMMAND')
   SET DEFA TO
   
   @ 0,0 DCSAY ''
   @ 1,0 DCBROWSE oBrowse ALIAS 'XDOC' SIZE 50, 8
   
   DCBROWSECOL DATA {||XDOC->command} HEADER 'Command' ;
      PARENT oBrowse ;
      MESSAGE 'This is the Command, Function or Class' ;
      INTO oMsgBox
   
   DCBROWSECOL DATA {||XDOC->short} HEADER 'Short' ;
      PARENT oBrowse ;
      MESSAGE 'This is the Short Description' ;
      INTO oMsgBox
   
   DCBROWSECOL DATA {||XDOC->type} HEADER 'Type' ;
      PARENT oBrowse ;
      MESSAGE 'This is the Type of Help Item' ;
      INTO oMsgBox
   
   DCBROWSECOL DATA {||XDOC->module} HEADER 'Module' ;
      PARENT oBrowse ;
      MESSAGE 'This is the name of the Module containing this item' ;
      INTO oMsgBox
   
   DCBROWSECOL DATA {||XDOC->see_also} HEADER 'See Also' ;
      PARENT oBrowse ;
      MESSAGE 'This is a list of related items' ;
      INTO oMsgBox
   
   @ 9.5,40 DCPUSHBUTTON CAPTION 'Test' SIZE 10,1.2 ;
     TOOLTIP 'Test all the records in the database' ;
     WHEN {||!lTesting} ;
     TITLE 'eXPress++ Documentation' ;
     ACTION {||_TestRecords(oMsgBox,oProgress,@lTesting,aMainGetList)}
   
   DCHOTKEY xbeK_INS ACTION {||ReadInsert(!ReadInsert())}
   
   DCGETOPTIONS ;
      AUTORESIZE ;
      WINDOWCOL 5 ;
      CASCADE
   
   DCREAD GUI FIT ;
      OPTIONS GetOptions ;
      APPWINDOW oDlg ;
      TITLE 'eXPress++ Help File'
   
   RETURN nil
   
   * -------------
   
   STATIC FUNCTION _TestRecords( oMsgBox, oProgress, lTesting, aMainGetList )
   
   LOCAL nRecNo := RecNo(), nCount
   
   lTesting := .t.
   DC_GetRefresh(aMainGetList)
   oMsgBox:setCaption('Test in Progress...')
   GO TOP
   nCount := 0
   DO WHILE !Eof() .AND. lTesting
     DC_AppEvent(@lTesting,0,.01)
     DC_GetProgress( oProgress, nCount++, RecCount() )
     Sleep(1)
     // .. put test code here
     SKIP
   ENDDO
   oMsgBox:setCaption('Test Completed!  No Errors!')
   
   DC_GetProgress( oProgress, -1, 0 ) // Clear progress box
   
   GO nRecNo
   lTesting := .f.
   DC_GetRefresh(aMainGetList)
   
   RETURN nil
   

Source/Library:

  DCDIALOG.CH

DCSUBMENU

Add Submenu to MENUBAR object for displaying with Text/GUI reader

Syntax:

   DCSUBMENU < oSubMenu > ;
       [PROMPT < cPrompt >] ;
       [INDEX < nIndex >] ;
       [PARENT < oParent >] ;
       [PARENT < cParentId >] ;
       [WHEN < bWhen >] ;
       [ACTION < bAction >] ;
       [CHECKED] ;
       [CHECKWHEN < bCheckWhen >] ;
       [SEPARATOR] ;
       [STYLE < nStyle >] ;
       [ATTRIBUTE < nAttr >] ;
       [HELPCODE < cHelpCode >] ;
       [LOCK < cLock >] ;
       [CARGO < xCargo >] ;
       [ACCELKEY < nAccelKey >] ;
       [ID < cId >] ;
       [PRESENTATION < aPres >] ;
       [PREEVAL < bPreEval >] ;
       [EVAL < bEval >] ;
       [TITLE < cTitle >] ;
       [GROUP < cGroup >] ;
       [MESSAGE < bcMsg > [INTO < oMsgBox >]] ;
       [LOCK < cLock >] ;
       [PROTECT < bProtect >]
   

Arguments:

   < oSubMenu > is the name of the variable to assign to the
   object.
   
   PROMPT < cPrompt > is the caption to assign to this menu item.
   The caption may be a character string, a resource number for
   a bitmap, another XbpMenu() object, or a NIL (for separator
   bars).  If the caption is a character string, it may include
   a Tilde (~) character to define the hot-key for the item
   like so: "Save ~Changes".
   
   ACTION < bAction > is a code block that gets evaluated when
   the menu item is selected.  Do not use this clause if
   the submenu has menu items.
   
   PARENT < oParent > is the name of the variable that was
   assigned to the parent MenuBar or SubMenu for this SubMenu.
   If this argument is not passed then the parent will be the
   object set with the DCSETPARENT command.
   
   PARENTID < cParentID > may be used in lieu of the PARENT < oParent >
   clause.  This identifies the ID of the parent instead of the
   parent's object variable name.
   
   INDEX < nIndex > is a variable name to store the index number
   that is assigned to this item when it is created.
   
   CHECKED will cause a check mark to appear next to the menu
   item.  This option is ignored if a < nAttr > parameter is used.
   
   CHECKWHEN < bWhen > is a code block that is evaluated in the event
   loop. This code block must return a logical value.  If the value
   returned is .FALSE. then the item will be unchecked. If the
   value returned is .TRUE. then the item will be checked. The
   parent DCSUBMENU object is passed as a parameter to the code
   block.
   
   SEPARATOR is used only if this is a menu separator bar rather
   than a selectable item.  Do not include a PROMPT.  All other
   parameters are ignored.  This option is ignored if a < nStyle >
   parameter is used.
   
   STYLE < nStyle > is a list of XBPMENUBAR_MIS_* numbers defined
   in XBP.CH.  These options are summed together.
   
   ATTRIBUTE < nAttr > is a list of XBPMENUBAR_MIA_* numbers defined
   in XBP.CH.  These options are summed together.
   
   MESSAGE < cMsg > is the message you want to display in the
   message area of the dialogue screen defined by an @..DCMESSAGE
   command.  The message is displayed when the mouse is passed over
   the menu item.  Optionally, INTO < oMsgBox > will designate which
   message box to display the message into. If the INTO clause is
   not used, then the last message box in the GetList is the
   default.  < oMsgBox > may also be any object that supports the
   :setCaption() method.  < bcMsg > may be a code block that returns
   a character value.< oSubMenu > is the variable name to assign to
   this submenu for storage of the XbpMenu() object.
   
   HELPCODE < cHelp > is a character string that is passed to the
   DC_HelpF1() function if F1 is pressed when the mouse is placed
   over the menu item.  The help code is used by the Help system
   to for specific context-help.
   
   PRESENTATION < aPres > is a two-dimensional array. If specified,
   this contains presentation parameters for the Button object.
   The first column of the array must contain #define constants
   from the XBP.CH file starting with the prefix XBP_PP_. These
   constants define the presentation parameters that can be set
   for the object and include colors and fonts. The second column
   of the array in < aPres > contains the value for each setting.
   These are also generally set using #define constants from the
   GRA.CH file.
   
   WHEN < bWhen > is a code block that is evaluated in the event loop.
   This code block must return a logical value.  If the value
   returned is .FALSE. then the submenu will be disabled and grayed.
   If the value returned is .TRUE. then the submenu will be enabled.
   The object is passed as a parameter to the code block.
   
   ID < cID > is a unique 8-character ID to assign to this menu
   item.  This is used to allow users to assign a menu item as
   "default" by pressing a special key.
   
   TITLE < cTitle > is a title to assign to this object.  The title
   is not displayed on the screen but is simply a description of the
   get object which is saved in the GetList.
   
   PREEVAL < bPreEval > is a code block to be evaluated by the GUI
   reader before the Xbase Parts object is created.  The object is
   passed to the code block.
   
   EVAL < bEval > is a code block to be evaluated by the GUI reader
   after the Xbase Parts object is created.  The object is passed
   to the code block.
   
   CARGO < xCargo > is any kind of data you wish to to add to the
   :cargo container for this object.  The cargo may be accessed
   at any time via the :cargo exported variable, however it will not
   be stored in the same manner it is entered.  The :cargo container
   of DCDIALOG objects is an array of at least three elements:
   
    [1] - A numeric value that is a pointer to the Getlist array
          for this object.
   
    [2] - A pointer to the GetList array.
   
    [3] - The value of < xCargo >.
   
    [4] and up - optional values added by the GUI reader.
   
   ID < cId > is a unique identifier for this object.  This ID is used
   with functions like DC_GETORIGUPDATED() to determine the status
   of a get object.
   
   TITLE < cTitle > is the title or description of the submenu.
   
   GROUP < cGroup > is a "group" name (case-sensitive) to assign to
   this GetList object.  Assignment to a group makes it possible to
   perform operations only on GetList items which are members of a
   specified group, using functions such as DC_GetRefresh() or
   DC_ReadGui().
   
   MESSAGE < bcMsg > is the message you want to display in the
   message area of the dialogue screen defined by the DCMESSAGEBOX
   command when the mouse is passed over the menu item.  Optionally,
   INTO < oMsgBox > will designate which message box to display the
   message into. If the INTO clause is not used, then the last
   message box in the GetList is the default.  < oMsgBox > may also
   be any object that supports the :setCaption() method.  < bcMsg >
   may be a code block that returns a character value.
   
   LOCK < cLock > is a lock code to assign to this sub-menu. Lock
   codes are any character string up to 5 characters in length.
   To gain access to a menu item, a logged on user must own a key
   of the same name as the lock or a master key to the lock.  The
   function DC_ReadGuiMenuAccess() must be called prior to calling
   DC_ReadGui() or using any DCREAD GUI command in which the Getlist
   contains menu items with locks.  DC_ReadGuiMenuAccess() is passed
   a comma-delimited character string containing the set of keys
   owned by the logged on user.  In a typical application, this
   function should be called immediately after the logon of a new
   user and the users predefined keylist passed to the function.
   
    Example: DC_ReadGuiMenuAccess('ABC,K*,XY*')
    This key list will allow access to any menu items that have
    no locks or to menu items locked with 'ABC', 'K*' or 'XY*'
    To give access to all menu locks assign the key "*****'.
   
   If a submenu is locked and the user does not own a key, the
   submenu and all of its menu items will not be displayed in the
   menu.
   
   PROTECT < bProtect > is a code block to evaluate which protects
   this menu item.  The code block must return a logical value.  If
   the value returned is .TRUE. then the menu item will not be
   included in the menu.
   
   ACCELKEY < nAccelKey > is a numeric "hot-key" assignment that will
   activate the menu item when the hot-key is pressed.  The key
   must be a valid key with the prefix xbeK_*.  These keys are
   defined in APPEVENT.CH.
   

Description:

    The command DCSUBMENU creates a new SubMenu definition and
    adds the definition to the array named GETLIST which is later
    processed by the DC_READGUI() function or by the DCREAD GUI
    command.  The GETLIST array must be first declared and
    initialized to the value of {}.  The command DCREAD GUI activates
    the edit mode for all objects found in the GetList array.
    A Getlist object remains stored as long as it is referenced
    in an array or by a variable.  The commands CLEAR and
    CLEAR GETS assign an empty array to the GetList variable.
    This also occurs after the completion of the DCREAD command
    if it is called without the SAVE option, causing all Get
    objects referenced by the GetList array to be released.
   
    DCSUBMENU is used with the DCMENUBAR command to add pull-down
    menus to a MenuBar object.
   

Notes:

    The dialog object created by DCSUBMENU is an object of the
    XbpMenu() class, therefore it can be manipulated with
    any iVar or method supported by XbpMenu().
   

Examples:

   /*
   This example displays a dialogue box with two tab pages
   and a menu with 3 submenus:  File, Edit, Util.
   */
   
   #include "dcdialog.ch"
   #include "appevent.ch"
   
   PROCEDURE Xtest()
   
   LOCAL GetList := {}, oFileMenu, oMenuBar, oEditMenu, oMemo, oUtilMenu, ;
         cMemo
   
   USE COLLECT
   
   cMemo := COLLECT->memo
   
   @ 0,0 DCMULTILINE cMemo SIZE 70,7 FONT "10.Courier.Bold"
   
   
   /* ---- Menu ---- */
   
   DCMENUBAR oMenuBar
   
   DCSUBMENU oFileMenu PROMPT "&File" PARENT oMenuBar
   
   DCMENUITEM "&Open a File" PARENT oFileMenu ;
               ACTION {||Msgbox('OpenFile')} ;
   
   DCMENUITEM "&Close File" PARENT oFileMenu ;
               ACTION {||Msgbox('CloseFile')}
   
   DCMENUITEM "&Pack File" PARENT oFileMenu ;
               ACTION {||Msgbox('Packfile')}
   
   DCSUBMENU oEditMenu PROMPT "&Edit" PARENT oMenuBar
   
   DCMENUITEM "&Next Record" PARENT oEditMenu ;
               ACTION {||dbSkip(), ;
                         cMemo := COLLECT->memo,;
                         DC_GetRefresh(GetList)} ;
               ACCELKEY xbeK_ALT_N ;
               WHEN {||!Eof()}
   
   DCMENUITEM "&Previous Record" PARENT oEditMenu ;
               ACTION {||dbSkip(-1), ;
                         cMemo := COLLECT->memo,;
                         DC_GetRefresh(GetList)} ;
               ACCELKEY xbeK_ALT_P ;
               WHEN {||!Bof()}
   
   DCMENUITEM "&Top of File" PARENT oEditMenu ;
               ACTION {||dbGoTop(), ;
                         cMemo := COLLECT->memo,;
                         DC_GetRefresh(GetList)} ;
               ACCELKEY xbeK_ALT_T
   
   DCMENUITEM "&Bottom of File" PARENT oEditMenu ;
               ACTION {||dbGoBottom(), ;
                         cMemo := COLLECT->memo, ;
                         DC_GetRefresh(GetList)} ;
               ACCELKEY xbeK_ALT_B
   
   DCSUBMENU oUtilMenu PROMPT "&Util" PARENT oMenuBar
   
   DCMENUITEM "Copy File" PARENT oUtilMenu ;
               ACTION {||Msgbox('CopyFile')}
   
   DCMENUITEM "Move File" PARENT oUtilMenu ;
               ACTION {||Msgbox('MoveFile')}
   
   DCREAD GUI ;
      TITLE 'Menu Demo' ;
      FIT ;
      ADDBUTTONS
   
   RETURN
   

Source/Library:

  DCDIALOG.CH

See Also:

   DCMENUBAR
   DCMENUITEM
   dc_readguimenuaccess()



DCTABGROUP

A command for creating TABPAGES in HTML

Syntax:

   @ [ < nRow >, < nCol > ] DCTABGROUP     ;
         [OBJECT < oObject >]            ;
         [TABOBJECT < oTabs >]           ;
         [BORDER < nBorder >]            ;
         [TABS,COLS,COLUMNS < nCols >]   ;
         [CAPTIONS < aCaptions >]        ;
         [NAME < cName >]                ;
         [SELECT < nTabSelect >]         ;
         [ALIGN < nAlign >]              ;
         [PARENT < oParent >]            ;
         [PARENTID < cPID >]             ;
         [BGCOLOR < ncBgC >]             ;
         [SELECTEDCOLOR < xSelColor >]    ;
         [UNSELECTEDCOLOR < xUnSelColor >];
         [BORDERCOLOR < xBorderColor >]    ;
         [BORDERCOLORLIGHT < xBorderColorLight] ;
         [BORDERCOLORDARK < xBorderColorDark >] ;
         [CELLPADDING < nCellPadding >]  ;
         [CELLSPACING < nCellSpacing >]  ;
         [HSPACE < nHspace >]            ;
         [VALIGN < nValign >]            ;
         [VSPACE < nVspace >]            ;
         [WIDTH < nWidth >]              ;
         [CARGO < xCargo >]              ;
         [HIDE < bHide >]                ;
         [EVAL < bEval >]                ;
         [TITLE < cTitle >]              ;
         [PRE,PRETEXT < bcPreHTML >]     ;
         [POST,POSTTEXT < bcPostHTML >]  ;
         [ID < cId >]                    ;
         [GROUP < cGroup >]              ;
   

Arguments:

   < nRow > and < nCol > are the row number and column number of
   the table if the parent of this object is a DCTABLE. The
   text will be inserted in the cell of the table defined by
   the row/column.
   
   OBJECT < oObject > is the name of the variable to assign as a
   storage place for this object.
   
   TABOBJECT < oTabs > is the name of the variable to assign as a
   storage place for the tab object.
   
   PARENT < oParent > is the name of the variable that was
   assigned to the parent of this table. If this argument
   is not passed then the parent will be the object set with
   the DCSETPARENT command.
   
   PARENTID < cParentID > may be used in lieu of the PARENT < oParent >
   clause.  This identifies the ID of the parent instead of the
   parent's object variable name.
   
   BORDER < nBorder > specifies the width in pixels of the border
   around the table.
   
   NAME < cName > is the name to assign to this Tab Group.
   
   TABS < nTabs > is the number of tabs in the Tab Group.
   
   SELECT < nTabSelect > is the number of the currently selected tab.
   
   CAPTIONS < aCaptions > is an array of character strings to use
   as captions for each tab.  If this array is not used, then
   tabs captions, images, etc must be added to the childlist
   of the TABOBJECT < oTabs >.
   
   UNSELECTEDCOLOR < xSelColor > is the color of the tabs that are
   not selected.  The color may be an RGB color value (#XXXXXX) ,
   a standard color name, an RGB 3-element array or a numeric
   value defined in GRA.CH.
   
   SELECTEDCOLOR < xUnSelColor > is the color of the tab that is
   currently selected.  The color may be an RGB color value
   (#XXXXXX), a standard color name, an RGB 3-element array or
   a numeric value defined in GRA.CH.
   
   Internet explorer lets you alter the colors that make up an
   individual cell's border - if border are turned on with the
   border attribute.  The values for BORDERCOLOR < xBorderColor >,
   BORDERCOLORDARK < xBorderColorDark > and
   BORDERCOLORLIGHT < xBorderColorLight > may be an RGB color
   value (#XXXXXX) , a standard color name, an RGB 3-element
   array or a numeric value defined in GRA.CH.  The different
   colors shade the edges of the border to give it a 3D
   appearance with < nBorderColor > shades the central body of
   the border.
   
   HSPACE < nHSpace > is the number of pixels of space on the
   outside of the table on both the left and right side.
   
   VSPACE < nVSpace > is the number of pixels of space on the
   outside of the table on both the top and bottom.
   
   WIDTH < cWidth > is a character string defining the width of
   the table.  Values may be either an integer--interpreted
   as a number of pixels--or a character string defining a
   percentage of the horizontal or vertical space.   The
   value 50% means half the available space while 50 means
   50 pixels.
   
   CELLPADDING < nCellPadding > defines the amount of space within table
   cells (i.e., between the border and cell contents). The
   value may be given as a number of pixels or as a percentage,
   though most browsers do not support percentages, treating
   "20%" as if it were "20". A percentage value is relative to
   the vertical space available for vertical padding or spacing,
   and the amount is split evenly between the top and bottom.
   Horizontal padding and spacing behave similarly.  The padding
   or spacing is always applied to all four sides.
   
   CELLSPACING < nCellSpacing > defines the amount of space between
   table cells.
   
   Internet explorer lets you alter the colors that make up an
   individual cell's border - if border are turned on with the
   border attribute.  The values for BORDERCOLOR < xBorderColor >,
   BORDERCOLORDARK < xBorderColorDark > and BORDERCOLORLIGHT
   < xBorderColorLight > may be an RGB color value (#XXXXXX) ,
   a standard color name, an RGB 3-element array or a numeric
   value defined in GRA.CH.  The different colors shade the
   edges of the border to give it a 3D appearance with
   < nBorderColor > shades the central body of the border.
   
   BORDER < nBorder > specifies the width in pixels of the border
   around the table.
   
   ALIGN < nAlign > specifies the default horizontal alignment of
   items in the table cells.  Possible values are left, right,
   and center.
   
   VALIGN < nVAlign > specifies the default vertical alignment of
   items in the table cells.  Possible values are top, bottom,
   and center.
   
   BGCOLOR < xBGColor > specifies the default background color for
   the entire table.  Value may be an RGB color value (#XXXXXX),
   a standard color name, an RGB 3-element array or a numeric
   value defined in GRA.CH.
   
   CARGO < xCargo > is any kind of data you wish to to add to the
   :cargo container of object created by this definition.
   
   PRE,PRETEXT < bcPreHTML > is a character string or a code block
   that returns a character string containing any HTML text
   that will precede the opening < table > tag in the source
   that is written.
   
   POST,POSTTEXT < bcPostHTML > is a character string or a code block
   that returns a character string containing any HTML text
   that will follow the closing < /table > tag in the source
   that is written.
   
   HIDE < bHide > is a code block that is evaluated at the
   time the :writeHtml() method is called for the class that
   supports this command.  If the code block returns a .TRUE.,
   then no HTML code will be written.
   
   EVAL < bEval > is a code block that is evaluated after the
   object is created in DC_ReadHtml().  A pointer to the
   object associated with this command is passed as an
   argument to the code block.
   
   ID < cId > is a unique identifier for this object.  This ID is used
   with functions like DC_GETOBJECT() to determine the status
   of a get object.
   
   TITLE < cTitle > is a title to assign to this object.  The title
   is not used in the HTML output but is simply a description of the
   get object which is saved in the GetList.
   
   GROUP < cGroup > is a "group" name (case-sensitive) to assign to
   this GetList object.  Assignment to a group makes it possible to
   perform operations only on GetList items which are members of a
   specified group.
   

Description:

   DCTABGROUP is a command for creating HTML tables that
   emulate GUI tab pages.  The class name associated with this
   command is DC_HtmlTabGroup().  The :writeHtml() method
   returns the source code of the table tag and all of its
   child elements.
   

Examples:

   #include "dcdialog.ch"
   #include "dchtml.ch"
   
   FUNCTION Xtest()
   
   LOCAL i, GetList[0], oForm, cHtml, oTabGroup, oTabs, aTabCaptions, ;
         aMemos[4]
   
   DCFORM OBJECT oForm
   
   DCTABGROUP ;
          WIDTH '400' ;
          OBJECT oTabGroup ;
          TABOBJECT oTabs ;
          PARENT oForm ;
          SELECT 2 ;
          COLOR GRA_CLR_WHITE ;
          SELECTEDCOLOR GRA_CLR_GREEN ;
          UNSELECTEDCOLOR GRA_CLR_PALEGRAY ;
          BORDER 0 ;
          CELLPADDING 0 ;
          CELLSPACING 0 ;
          TABS 4
   
   aTabCaptions := {'Customer','Vendor','History','Misc'}
   
   FOR i := 1 TO Len(aTabCaptions)
   
     DCSUBMIT ;
       TYPE DCHTML_BUTTONTYPE_SUBMIT ;
       CAPTION aTabCaptions[i] ;
       PARENT oTabs ;
       NAME 'App.Tab'  + Alltrim(Str(i))
   
     aMemos[i] := 'This is the ' + aTabCaptions[i] + ' Memo'
     @ 0,0 DCMULTILINE aMemos[i] SIZE 60,10 ;
       PARENT oTabGroup
   
   NEXT
   
   DCREAD GUI TO cHtml
   
   MemoWrit('TEST.HTM',cHtml)
   
   RETURN cHtml
   

Source/Library:

  DCHTML.CH

See Also:

   DCREAD HTML
   dc_html()
   dc_readhtml()
   dc_htmltabgroup()



DCTREEITEM

Create a new item for a Tree View

Syntax:

    DCTREEITEM                                                       ;
      [CAPTION < cCaption >] ;
      [PARENT < oParent >] ;
      [LOCK < cLock >] ;
      [PROTECT < bProtect >] ;
      [ACTION < bAction >] ;
      [HELPCODE < cHelpCode >] ;
      [MESSAGE < cMsg > [INTO < oMsg >]] ;
      [CARGO < xCargo >] ;
      [ID < cId >] ;
      [OBJECT < oObject >] ;
      [TITLE < cTitle >] ;
      [PREEVAL < bPreEval >] ;
      [EVAL < bEval >] ;
      [GROUP < cGroup >] ;
      [IMAGEEXPANDED < noImageExpanded >] ;
      [IMAGENORMAL < noImageNormal >] ;
      [IMAGEMARKED < noImageMarked >]
   

Arguments:

   CAPTION < cCaption > is the Caption which will appear in the
   Tree View window for this item.
   
   PARENT < oParent > is the name of the variable that was assigned to
   the parent XbpTreeView or DCTREEROOT object for this object.
   If this argument is not passed then the parent will be the
   object set with the DCSETPARENT command.
   
   OBJECT < oObject > is the variable to use as a container for the
   object after it is created by the GUI reader.
   
   MESSAGE < bcMsg > is the message you want to display in the
   message area of the dialogue screen defined by the DCMESSAGEBOX
   command when the item is marked.  Optionally, INTO < oMsgBox >
   will designate which message box to display the message into.
   If the INTO clause is not used, then the last message box in the
   GetList is the default.
   
   WHEN < bWhen > is a code block that is evaluated in the event loop.
   This code block must return a logical value.  If the value
   returned is .FALSE. then the object will be disabled and grayed.
   If the value returned is .TRUE. then the object will be enabled.
   The object is passed as a parameter to the code block.
   
   ACTION < bAction > is a code block to evaluate when this tree item
   is selected either with the ENTER key or a double-click.  The
   code block is passed three parameters as follows:
   
    {| oItem, aRect, oTree | ... }
   
    < oItem > is the selected XbpTreeViewItem object.
   
    < aRect > := { nX1, nY1, nX2, nY2 }
   
    < aRect > is an array with four elements. They contain the
    xy-coordinates for the lower left and upper right corner of
    < oItem > . The origin for the coordinates is the lower left
    corner of the parent XpbTreeView object.
   
    < oTree > is the Parent XbpTreeView object.
   
   
   HELPCODE < cHelp > is a character string that is passed to the
   DC_HelpF1() function if F1 is pressed or the HELP button
   is clicked when this GET has focus.  This HELPCODE allows
   the Help system to override the passing of the Procedure and
   Varname for more specific context-help.
   
   
   CARGO < xCargo > is any kind of data you wish to to add to the
   :cargo container for this object.  The cargo may be accessed
   at any time via the :cargo exported variable, however it will not
   be stored in the same manner it is entered.  The :cargo container
   of DCDIALOG objects is an array of at least three elements:
   
    [1] - A numeric value that is a pointer to the Getlist array
          for this object.
   
    [2] - A pointer to the GetList array.
   
    [3] - The value of < xCargo >.
   
    [4] and up - optional values added by the GUI reader.
   
   ID < cId > is a unique identifier for this object.  This ID is used
   with functions like DC_GETORIGUPDATED() to determine the status
   of a get object.
   
   TITLE < cTitle > is a title to assign to this object.  The title
   is not displayed on the screen but is simply a description of the
   get object which is saved in the GetList.
   
   GROUP < cGroup > is a "group" name (case-sensitive) to assign to
   this GetList object.  Assignment to a group makes it possible to
   perform operations only on GetList items which are members of a
   specified group, using functions such as DC_GetRefresh() or
   DC_ReadGui().
   
   PREEVAL < bPreEval > is a code block to be evaluated by the GUI
   reader before the Xbase Parts object is created.  The object is
   passed to the code block.
   
   EVAL < bEval > is a code block to be evaluated by the GUI reader
   after the Xbase Parts object is created.  The object is passed
   to the code block.
   
   IMAGEEXPANDED < noImageExpanded > is the icon or bitmap to use when
   this tree item is expanded.  If < noImageExpanded > is a numeric
   value it must be an icon resource that is linked to the .EXE or
   exists in < cDllName >.  If < noImageExpanded > is an object, it
   must be a bitmap of the XbpBitMap() class.  An object may be used
   only with Xbase++ 1.7 or later.
   
   IMAGENORMAL < noImageNormal > is the icon resource to use when this
   tree item is not marked or expanded.  If < noImageNormal > is a
   numeric value it must be an icon resource that is linked to the
   .EXE or exists in < cDllName >.  If < noImageNormal > is an object, it
   must be a bitmap of the XbpBitMap() class.  An object may be used
   only with Xbase++ 1.7 or later.
   
   IMAGEMARKED < noImageMarked > is the icon resource to use when this
   tree item is marked.  If < noImageMarked > is a numeric value it
   must be an icon resource that is linked to the .EXE or exists in
   < cDllName >.  If < noImageMarked > is an object, it must be a bitmap
   of the XbpBitMap() class.  An object may be used only with Xbase++
   1.7 or later.
   
   DLLNAME < cDllName > is the name of the DLL containing the image
   icons.  If this clause is not used, then the icons must be linked
   into the .EXE.
   
   LOCK < cLock > is a lock code to assign to this tree item. Lock
   codes are any character string up to 5 characters in length.
   To gain access to a tree item, a logged on user must own a key
   of the same name as the lock or a master key to the lock.  The
   function DC_ReadGuiMenuAccess() must be called prior to calling
   DC_ReadGui() or using any DCREAD GUI command in which the Getlist
   contains tree items with locks.  DC_ReadGuiMenuAccess() is passed
   a comma-delimited character string containing the set of keys
   owned by the logged on user.  In a typical application, this
   function should be called immediately after the logon of a new
   user and the users predefined keylist passed to the function.
   
    Example: DC_ReadGuiMenuAccess('ABC,K*,XY*')
    This key list will allow access to any tree items that have
    no locks or to tree items locked with 'ABC', 'K*' or 'XY*'
    To give access to all tree locks assign the key "*****'.
   
   If a tree item is locked and the user does not own a key, the
   item and it's sub-items will not be displayed in the tree.
   
   PROTECT < bProtect > is a code block to evaluate which protects
   this tree item.  The code block must return a logical value.  If
   the value returned is .TRUE. then the tree item will not be
   included in the tree.
   

Description:

    The command DCTREEITEM creates a new TreeView item and
    adds the object to the array named GETLIST which is later
    processed by the DC_READGUI() function or by the DCREAD GUI
    command.  The GETLIST array must be first declared and
    initialized to the value of {}.  The command DCREAD GUI activates
    the edit mode for all objects found in the GetList array.
    A Getlist object remains stored as long as it is referenced
    in an array or by a variable.  The commands CLEAR and
    CLEAR GETS assign an empty array to the GetList variable.
    This also occurs after the completion of the DCREAD command
    if it is called without the SAVE option, causing all Get
    objects referenced by the GetList array to be released.
   
    DCTREEITEM is used with the @ DCTREEROOT command to create
    a TreeView system for viewing any kind of data.
   

Notes:

    The object created by DCTREEITEM is an object of the
    XbpTreeViewItem() class, therefore it can be manipulated with
    any iVar or method supported by XbpTreeViewItem().
   

Examples:

   #include "dctree.ch"
   
   PROCEDURE Xtest()
   
   LOCAL GetList := {}, oTree, oSubTree1, oSubTree2, cSelected
   
   @ 1,1 DCTREEROOT SIZE 30,10 OBJECT oTree CAPTION 'Tree Root' ;
     HASLINES ;
     HASBUTTONS ;
     ITEMSELECTED {|o| cSelected := o:caption, ;
                       DC_ReadGuiEvent(DCGUI_EXIT_OK,GetList)}
   
   DCTREEITEM CAPTION 'SubTree 1' PARENT oTree OBJECT oSubTree1
     DCTREEITEM CAPTION 'Sub-SubTree 1/1' PARENT oSubTree1
     DCTREEITEM CAPTION 'Sub-SubTree 1/2' PARENT oSubTree1
     DCTREEITEM CAPTION 'Sub-SubTree 1/3' PARENT oSubTree1
   
   DCTREEITEM CAPTION 'SubTree 2' PARENT oTree OBJECT oSubTree2
     DCTREEITEM CAPTION 'Sub-SubTree 2/1' PARENT oSubTree2
     DCTREEITEM CAPTION 'Sub-SubTree 2/2' PARENT oSubTree2
     DCTREEITEM CAPTION 'Sub-SubTree 2/3' PARENT oSubTree2
   
   DCREAD GUI FIT ADDBUTTONS
   
   DC_MsgBox({'You Selected:',cSelected})
   
   RETURN nil
   

Source/Library:

  DCTREE.CH

See Also:

   @ DCTREEROOT
   dc_readguimenuaccess()



DCVARS

A command for managing HIDDEN variables in HTML

Syntax:

   DCVARS                                 ;
          [OBJECT < oVars >]                ;
          [PARENT < oParent >]              ;
          [PARENTID < cPID >]               ;
          [CARGO < xCargo >]                ;
          [HIDE < bHide >]                  ;
          [INCLUDE < aInclude >]            ;
          [REPLICATE < aVars >]             ;
          [EXCLUDE < aExclude >]            ;
          [PRE,PRETEXT < bcPreText >]       ;
          [POST,POSTTEXT < bcPostText >]    ;
          [EVAL < bEval >]                  ;
          [ID < cId >]                      ;
          [GROUP < cGroup >]                ;
   

Arguments:

   PARENT < oParent > is the name of the variable that was
   assigned to the parent of this object. If this argument
   is not passed then the parent will be the object set with
   the DCSETPARENT command.
   
   PARENTID < cParentID > may be used in lieu of the PARENT < oParent >
   clause.  This identifies the ID of the parent instead of the
   parent's object variable name.
   
   REPLICATE < aVars > is a 2-dimensional array containing all the
   system variables passed in to the application from the
   HTTP handler.
   
   INCLUDE < aInclude > is a 2-dimensional array containing any
   additional vars.
   
   EXCLUDE < aExclude > is a 1-dimensional array containing the
   names of vars in < sysVars > to exclude.  This array may contain
   names with * wildcard characters.  Names are case sensitve.
   
   OBJECT < oVars > is the name of the variable to assign as a
   storage place for this object.
   
   CARGO < xCargo > is any kind of data you wish to to add to the
   :cargo container of object created by this definition.
   
   PRE,PRETEXT < bcPreHTML > is a character string or a code block
   that returns a character string containing any HTML text
   that will precede the opening < table > tag in the source
   that is written.
   
   POST,POSTTEXT < bcPostHTML > is a character string or a code block
   that returns a character string containing any HTML text
   that will follow the closing < /table > tag in the source
   that is written.
   
   HIDE < bHide > is a code block that is evaluated at the
   time the :writeHtml() method is called for the class that
   supports this command.  If the code block returns a .TRUE.,
   then no HTML code will be written.
   
   EVAL < bEval > is a code block that is evaluated after the
   object is created in DC_ReadHtml().  A pointer to the
   object associated with this command is passed as an
   argument to the code block.
   
   ID < cId > is a unique identifier for this object.  This ID is used
   with functions like DC_GETOBJECT() to determine the status
   of a get object.
   
   TITLE < cTitle > is a title to assign to this object.  The title
   is not used in the HTML output but is simply a description of the
   get object which is saved in the GetList.
   
   GROUP < cGroup > is a "group" name (case-sensitive) to assign to
   this GetList object.  Assignment to a group makes it possible to
   perform operations only on GetList items which are members of a
   specified group.
   

Description:

   DCVARS is a command for creating and replicating hidden
   variables in HTML forms.
   
   The command DCVARS creates an HTML element definition and
   adds the definition to the array named GETLIST which is later
   processed by the DC_READHTML() function or by the DCREAD HTML
   command.  The GETLIST array must be first declared and
   initialized to the value of {}.  The command DCREAD HTML
   creates all the DC_Html*() objects from the GetList array
   and then invokes the :writeHtml() method of the topmost
   parent object to generate the HTML code.
   
   A Getlist object remains stored as long as it is referenced
   in an array or by a variable.  The commands CLEAR and
   CLEAR GETS assign an empty array to the GetList variable.
   This also occurs after the completion of the DCREAD command
   if it is called without the SAVE option, causing all
   objects referenced by the GetList array to be released.
   

Notes:

   DCVARS creates an object of the DC_HtmlVars() class.
   

Examples:

   #include "dcdialog.ch"
   #include "dchtml.ch"
   
   FUNCTION Xtest()
   
   LOCAL i, GetList[0], cHtml, aVars, oForm
   
   aVars := { { 'App.Text.1', 'some text' }, ;
              { 'App.Text.2', 'more text' }, ;
              { 'App.Text.3', 'still more text' }, ;
              { 'App.Checkbox', 'on' }, ;
              { 'App.RadioButton', 'Mint' }, ;
              { 'App.Memo', 'lots of text' }, ;
              { 'App.RecordNumber', '12' }, ;
              { 'App.Database', 'CUSTOMER' }, ;
              { 'App.Account', '40055' } }
   
   DCFORM OBJECT oForm
   
   DCVARS ;
      PARENT oForm ;
      REPLICATE aVars ;
      EXCLUDE { 'App.Text.*','App.Memo' } ;
      INCLUDE { { 'App.Date', Date() }, ;
                { 'App.Time', Time() } }
   
   DCREAD HTML TO cHtml
   MemoWrit('TEST.HTM',cHtml)
   
   RETURN cHtml
   

Source/Library:

  DCHTML.CH

See Also:

   DCREAD HTML
   dc_html()
   dc_readhtml()
   dc_htmlvars()



DELETE

Mark record(s) for deletion

Syntax:

    DELETE [ < args > ]
   

Arguments:

    See the Xbase++ documentation for < args >.
   

Description:

    DELETE without arguments is used to mark the current record for
    deletion.  This command is a front-end to the Xbase++ dbDelete()
    function that automatically locks and unlocks the record to
    prevent a runtime error on shared databases.
   
    DELETE with arguments works identical to the Xbase++ DELETE
    command except a progress odometer will display the number of
    records scanned and the number of records that were actually
    deleted.
   

Examples:

    . USE EXPRESS INDEX EXPRESS.CDX SHARED
    . GO 10
    . DELETE
    . DELETE WHILE RecNo() < 20
   

Source/Library:

  DCSTD.CH

See Also:

   dc_delete()
   RECALL



DELETE FILE

Delete a file

Syntax:

    DELETE FILE [ < filename > ]
   

Arguments:

   < filename > is the name of the file to delete. If this argument
   is not used then a GUI dialog will be displayed to choose a file.
   

Description:

    DELETE FILE is used to delete a file from the disk.
   

Examples:

    . DELETE FILE JUNK.PRN
    . DELETE FILE
   

Source/Library:

  DCSTD.CH

See Also:

   dc_erase()



DELETE TAG

Delete a tag from a combined index

Syntax:

    DELETE TAG
   

Arguments:

    None.
   

Description:

    DELETE TAG is used to delete an index tag from a combined
    index.
   

Examples:

    . USE EXPRESS INDEX EXPRESS.CDX EXCL
    . DELETE TAG
   

Source/Library:

  DCSTD.CH

See Also:

   dc_tagdelete()



DIR

Display a directory of files or databases

Syntax:

    DIR [ < FileSpec > ]
   

Arguments:

   DIR < FileSpec > is the specification of the files to display including
   path and extension.  The file dialog shows the file name, date,
   size and time.
   
   If no argument is passed, then only .DBF database files will be
   displayed.  This dialog allows for the file to be automatically
   opened when the item is selected.  The database dialog shows the
   file name, date, size, number of records, and type of database.
   

Description:

    DIR is used to display a directory of files or databases.
   

Examples:

    . DIR       // display all database files
    . DIR *.TXT // display all text files
   

Source/Library:

  DCSTD.CH

See Also:

   dc_dir()



DISPLAY MEMORY

Display the contents of a memory file or current memory

Syntax:

    DISPLAY MEMORY [FILE cMemFileName]
   

Arguments:

   FILE < cMemFileName > is the name of the memory file.  If no
   extension is given then .XPF is assumed.
   
   If no argument is passed then the current contents of memory
   are saved to a file named EXPRESS.XPF and the contents of
   EXPRESS.XPF are displayed.  NOTE: If any PUBLIC or PRIVATE
   memory variables exist containing non-persistent data such as
   objects or some type of code blocks, a runtime error will
   result and the contents of memory cannot be displayed.
   

Description:

    DISPLAY MEMORY is used to display the contents of an .XPF (memory)
    file or the current contents of memory (PUBLICS/PRIVATES only)
    in a GUI scrolling browse window.
   

Examples:

    . custname := 'Donnay Software'
    . product := 'eXPress++ 2.0'
    . DISPLAY MEMORY
    . DISPLAY MEMORY FILE PRODUCT.XPF
   

Source/Library:

  DCSTD.CH

See Also:

   dc_xpftoarray()
   dc_dispmem()



DISPLAY STATUS

Display System status window

Syntax:

    DISPLAY STATUS
   

Arguments:

    None.
   

Description:

    DISPLAY STATUS is used to display a scrollable window of information
    about the system application.
   

Examples:

    . USE COLLECT INDEX COLLECT
    . DISPLAY STATUS
   

Source/Library:

  DCSTD.CH

See Also:

   dc_status()



DISPLAY STRUCTURE

Display the structure of the selected database

Syntax:

    DISPLAY STRUCTURE [WIDE]
   

Arguments:

   WIDE displays the structure in a Wide Window with the data
   formatted in the screen to view more fields in the viewable
   area of the window.  Use this option when viewing the structure
   of databases with many fields.
   

Description:

    DISPLAY STRUCTURE is used to display the structure of the selected
    database file.  A GUI dialog window displays the structure in
    a scrollable window with options to Print or save to a File.
   

Examples:

    . USE COLLECT
    . DISPLAY STRUCTURE
   

Source/Library:

  DCSTD.CH

See Also:

   dc_dbstru()
   dc_dbstruw()



DLL LIST

List all loaded dynamic .DLLs

Syntax:

    DLL LIST
   

Arguments:

   < cDllName > is the name of the .DLL to load.  If this argument
   is not passed a GUI dialog will be displayed prompting for the
   name.
   
   < lMessage > if .TRUE. (default) will display a GUI message box
   if the .DLL could not be loaded.
   

Description:

    DLL LIST is used to list all the dynamic .DLLs that are
    currently loaded.  These .DLLs must have been loaded with
    DC_DllLoad() or DLL LOAD.
   

Examples:

    . DLL LOAD MYTEST
    . DLL LOAD MYFUNCS
   

Source/Library:

  DCSTD.CH

See Also:

   dc_dlllist()



DLL LOAD

Load a dynamic .DLL

Syntax:

    DLL LOAD [ < cDllName > ]
   

Arguments:

   < cDllName > is the name of the .DLL to load.  If this argument
   is not passed a GUI dialog will be displayed prompting for the
   name.
   

Description:

    DLL LOAD is used to load a dynamic .DLL and save away
    information about the .DLL in a static array to be used later
    with DLL UNLOAD or DC_DllUnload().
   

Examples:

    . DLL LOAD MYTEST
    . DO test
    . DLL UNLOAD MYTEST
   

Source/Library:

  DCSTD.CH

See Also:

   dc_dllload()



DLL UNLOAD

UnLoad a dynamic .DLL

Syntax:

    DLL UNLOAD [ < cDllName > ]
   

Arguments:

   < cDllName > is the name of the .DLL to unload.
   

Description:

    DLL UNLOAD is used to unload a dynamic .DLL that was previously
    loaded with DLL LOAD or DC_DllLoad().
   

Examples:

    . DLL LOAD MYTEST
    . DO test
    . DLL UNLOAD MYTEST
   

Source/Library:

  DCSTD.CH

See Also:

   dc_dllunload()
   DLL LOAD



EDIT FILE

Edit a source file

Syntax:

    EDIT FILE < cFileName > ;
         [LINE < nLineNmbr >] ;
         [ < cParameters > ]
   

Arguments:

   < cFileName > is the name of the ascii file to edit.  If no
   argument is given, then the user will be prompted for the name
   of the file. If no extension is included, then .PRG is
   assumed.
   
   LINE < nLineNmbr > is the line number to go to.  If no parameter is
   passed then the editing will start at line 1.
   
   < cParameters > is an optional set of parameters to pass to the
   editor.
   

Returns:

    A logical .TRUE. if editor was called successfully.
   

Description:

    EDIT FILE is used to edit a source code file.  This function
    will use the editor defined as the "system" editor via the
    EDITOR= command in DCLIP.SYS, the DC_EDITCONFIG() function
    or the SET EDITOR command.
   
    If no external editor is defined, then an imbedded GUI text
    editor will be used.
   

Notes:

    If the drive and directory is not included in the <þcFileNameþ>
    argument, then DC_EDITPRG() will search for the file first in
    the SET DCLIP directory followed by the SET PDIR directory (if
    file is a .PRG).
   

Examples:

    . dc_editconfig( '\express\util\MEW2.BAT' ) // Multi-Edit (Windows)
    . DC_EDITPRG( 'test' )
   

Source/Library:

  DCSTD.CH

See Also:

   dc_editprg()



EDIT VIRTUAL

Edit the Virtual Record

Syntax:

    EDIT VIRTUAL
   

Arguments:

    None.
   

Description:

    EDIT VIRTUAL pops up a full-screen (text-mode) editor to modify
    the contents of the virtual record previously saved by the SAVE
    VIRTUAL command.
   

Examples:

    . USE CUSTOMER
    . GO 10
    . SAVE VIRTUAL
    . EDIT VIRTUAL
    . GO 20
    . REPLACE WITH VIRTUAL
   

Source/Library:

  DCSTD.CH

See Also:

   SAVE VIRTUAL



FILE DELETE

Delete a file group from the DCFILES.DBF dictionary

Syntax:

    FILE DELETE ;
        [GROUP < cFileGroup >] )
   

Arguments:

   GROUP < cFileGroup > is the name of the file group in DCFILES.DBF
   to delete (up to 8 characters).  If no parameter is passed then
   a pick list will be displayed.
   

Description:

    FILE DELETE is used to delete a file group from the DCFILES.DBF
    file dictionary.
   

Examples:

    // Delete the file group named JUNK
    . FILE DELETE JUNK
   

Source/Library:

  DCSTD.CH

See Also:

   dc_filedel()



FILE EDIT

A Database File / Work area Definition editor

Syntax:

    FILE EDIT [ < acFileGroup > ]
   

Arguments:

   < acFileGroup > is the name of the file group in DCFILES.DBF
   to load and edit (up to 8 characters) or < acFileGroup > is a
   File Group array.  See DC_FileEdit() (RETURNS) for a specification
   of this array.  If no parameter is passed, a pick-list of all
   File Groups in DCFILES.DBF will be displayed.
   

Description:

    FILE EDIT is an editor that maintains the definition of
    each database and it's indexes and relations.
   
    Each file group is stored in the DCFILES.DBF dictionary file.
   
    A file group contains all the information necessary to
    restore work areas for editing and browsing.  The data
    dictionary contains information for opening databases and
    indexes (or creating indexes that do not exist).
   

Examples:

    -- Example 1 --
    // Load a file group from the dictionary and edit it //
    . FILE EDIT
   
    -- Example 2 --
    // Edit file group "CUSTOMER"
    . FILE EDIT GROUP CUSTOMER
   
    -- Example 3 --
    // Edit a file group array //
    . aFileGroup := DC_FilePik()
    . FILE EDIT GROUP aFileGroup
   

Source/Library:

  DCSTD.CH

See Also:

   dc_fileedit()



FILE IMPORT

Import File Group(s) from the Import File Dictionary

Syntax:

    FILE IMPORT ;
      [GROUP < cFileGroup > | ALL ]
   

Arguments:

   GROUP < cFileGroup > is the name of the file group.  This is a
   name of up to eight (8) digits.  If a group name is passed then
   the DXFILES.DBF database will be searched and all group
   items that match the group name be imported into DCFILES.DBF.
   If no name is passed, then a pick-list of all file groups stored
   in the DXFILES.DBF database will be displayed.
   
   If ALL is passed as the group name, then all groups in the
   DXFILES.DBF will be imported into DCFILES.DBF.
   

Description:

    FILE IMPORT is used to import file group configurations from a
    DXFILES.DBF file into the DCFILES.DBF file.
   

Notes:

    The DCFILES.DBF file is the data-dictionary database that
    contains all file group configurations.  If this file does not
    exist in your default directory or path then it will be created.
    The DXFILES.DBF file is the data-dictionary database that contains
    all file groups that were exported from another system.
   

Source/Library:

  DCSTD.CH

See Also:

   dc_fileimp()



FILE RESTORE

Restore work areas, indexes, relations, from dictionary

Syntax:

    FILE RESTORE [ < acFileGroup > ], ;
                 [ADDITIVE], ;
                 [EXCLUSIVE], ;
                 [TAG < cTagName >]
   

Arguments:

   < acFileGroup > is the name of a file group in the DCFILES.DBF
   dictionary or an array that conforms to the specifications of
   the array returned by DC_FileEdit().  If no argument is passed,
   a picklist will be displayed.
   
   ADDITIVE is an optional clause which will insure that
   currently used work areas are not affected.  If a database is
   already opened in a work area, it will not be reopened in a new
   work area.  If the < lAdditive > parameter is not passed, then
   all work areas will be closed before restoring the old work.
   
   EXCLUSIVE if .TRUE. will override the settings in the DCFILES.DBF
   file for the file group and open the files EXCLUSIVE.  If the
   parameter is not passed or is .FALSE., then files will be
   opened in the default mode.
   
   TAG < cTagName > if passed as a character string or numeric value
   will override the tag name or index order in the DCFILES.DBF
   file group.
   

Description:

    FILE RESTORE is used to restore a complete work area
    environment from a the DCFILES.DBF data dictionary. This
    function will accomplish the following:
   
     * Re-open all databases, using the required RDD (Replaceable
       Data Driver).
   
     * Open all indexes or rebuild indexes that don't exist or have
       not been properly updated.
   
     * Set parent-child relations.
   
     * Restore record, index and tag pointers.
   
     * Restore browse windows. (optional)
   
     * Restore filters.
   
     * Restore Database environment such as PATH, DEFAULT, UNIQUE,
       etc.
   

Examples:

    use maillist via 'ADSDBE"
    index on zip tag zip
    index on phone tag phones
    use customer via 'ADSDBE' new index custnmbr
    use invoice via 'ADSDBE' new index invoice
    set relation to cust_nmbr into customer
    FILE SAVE MYWORK
    close all
    FILE RESTORE MYWORK
   

Source/Library:

  DCSTD.CH

See Also:

   dc_filerest()
   FILE SAVE



FILE SAVE

Save Work area definition array to dictionary

Syntax:

    FILE SAVE [FROM < aFileGroup >] ;
              [WORKAREAS] ;
              [GROUP < cFileGroup >]
   

Arguments:

   FROM < aFileGroup > is a file group array that conforms to the
   specification of the array returned by DC_FILEEDIT().
   
   WORKAREAS will save the information about currently open
   workareas rather than a passed array. The < aFileGroup >
   parameter is not needed and will be ignored if WORKAREAS is
   used.
   
   GROUP < cFileGroup > is needed only if the WORKAREAS clause is
   used. This is the name of the file group (up to 8 characters)
   to assign to the file group.
   

Description:

    FILE SAVE is used to save the contents of a file group
    array or the current workareas to the DCFILES.DBF
    data-dictionary.
   

Examples:

    -- Example 1 --
    /* Save Work areas to file dictionary */
    FILE SAVE WORKAREAS GROUP CUSTOMER
   
    -- Example 2 --
    /* Edit and Save a file group array //
    cFileGroup := DC_FilePik()
    aFileGroup := DC_FileEdit( cFileGroup )
    FILE SAVE FROM aFileGroup
   

Source/Library:

  DCSTD.CH

See Also:

   dc_filesave()
   FILE RESTORE



FIND

GUI dialog for finding a record using an index

Syntax:

    FIND
   

Arguments:

    None.
   

Description:

    FIND is a high-level command that scans all index keys
    and creates an input screen to allow the user to find
    information by simply typing in the value in the box next to
    the associated index key.  This is a quick method of finding
    information in a database that has multiple index files open or
    multiple index tags in a combined index.
   
    After the user enters in the value next to the referenced
    index, the database is checked to see if more than one record
    matches the entered value.  If duplicates are found, then a
    pick-list of records is displayed to allow the user to choose
    one.
   

Examples:

    . USE EXPRESS VIA FOXCDX INDEX EXPRESS.CDX
    . FIND
   

Source/Library:

  DCSTD.CH

See Also:

   dc_find()
   HUNT



GO BOTTOM

Go to the Bottom of a set of Scoped Records

Syntax:

    GO | GOTO BOTTOM
   

Arguments:

    None.
   

Description:

    GO BOTTOM is used to go to the first record in a group of
    "scoped" records.  Scopes are set via the DC_SetScope() function.
    If a scope is not set, then GO BOTTOM simply calls dbGoBottom().
   

Examples:

    . USE EXPRESS INDEX EXPRESS.CDX
    . SET ORDER TO 'COMMAND'
    . SET SCOPE TOP TO 'C'
    . SET SCOPE BOTTOM TO 'E'
    . GO BOTTOM
   

Source/Library:

  DCSTD.CH

See Also:

   dc_dbgobottom()



GO TOP

Go to the Top of a set of Scoped Records

Syntax:

    GO | GOTO TOP
   

Arguments:

    None.
   

Description:

    GO TOP is used to go to the first record in a group of "scoped"
    records.  Scopes are set via the DC_SetScope() function.
    If a scope is not set, then GO TOP simply calls dbGoTop().
   

Examples:

    . USE EXPRESS INDEX EXPRESS.CDX
    . SET ORDER TO 'COMMAND'
    . SET SCOPE TOP TO 'C'
    . SET SCOPE BOTTOM TO 'E'
    . GO TOP
   

Source/Library:

  DCSTD.CH

See Also:

   dc_dbgotop()



GUI

Set the Dialogue mode to GUI or TEXT

Syntax:

   GUI ON | OFF
   

Arguments:

   GUI ON will cause eXPress++ to process Dual-Mode functions as
   a GUI dialogue.  GUI OFF will cause eXPress++ to process all
   Dual-Mode functions as a TEXT dialogue.
   

Returns:

    .TRUE. if any gets were updated, .FALSE. otherwise.
   

Description:

    GUI or DCGUI is used to set Text or Gui mode for Dual-Mode
    Functions.  The eXPress++ library contains a variety of
    functions which operate in "Dual-Mode".  When GUI mode is
    ON, the function uses a GUI dialogue based on Xbase Parts.  When
    the GUI mode is OFF the function works in standard text-mode.
   

Examples:

     /*
     In this example, DC_ReadBox() and DC_Impl() will only
     display and restore the window in Text-Mode.  They are
     ignored in GUI mode.
     */
   
     #include "dcdialog.ch"
   
     PROCEDURE Xtest( )
   
     LOCAL GetList := {}, GetOptions, aReadArea, cLastName := Space(15), ;
           cFirstName := Space(15), cCompany := Space(25), ;
           cStreet := Space(25), cCity := Space(25), cState := Space(2), ;
           cCountry := Space(25), cPhone := Space(15), cScrn, lOk
   
     lGui := IIF( Valtype(lGui)='L',lGui,.t.)
   
     GUI ON   //  set GUI mode
   
     cScrn := DC_ReadBox(3,5,15,75,,@aReadArea)
   
     @ 5,10 DCSAY ' Last Name' GET cLastName
     @ 5,40 DCSAY 'First Name' GET cFirstName
     @ 7,10 DCSAY '   Company' GET cCompany
     @ 8,10 DCSAY '    Street' GET cStreet
     @ 9,10 DCSAY '      City' GET cCity
     @10,10 DCSAY '     State' GET cState
     @11,10 DCSAY '   Country' GET cCountry
     @13,10 DCSAY '     Phone' GET cPhone PICT '(999)-999-9999'
   
     DCGETOPTIONS SAYWIDTH 70 SAYRIGHTJUST
   
     lOk := DC_ReadGets( GetList,"Enter Data",aReadArea,;
                         GetOptions )
     DC_Impl(cScrn)
   
     RETURN
   

Source/Library:

  DCDIALOG.CH

See Also:

   dc_readmodal()
   dc_readgui()
   dc_gui()



HELP

Display HELP for a command or function

Syntax:

   HELP [< command >]
   

Arguments:

   < command > is the name of a command or function.
   

Description:

   HELP will display the help window and optionally go to a
   specified help item.
   

Examples:

   HELP
   HELP @ DCBROWSE
   HELP dc_arrayview()
   

Source/Library:

  DCSTD.CH

See Also:

   dc_help()



HUNT

Hunt for a record by search all indexes

Syntax:

    HUNT < xValue >
   

Arguments:

   < xValue > is the value to HUNT.  This can be a value or an
   expression. If entered as an expression ( includes quotes or
   parenthesis ) it will be evaluated and converted to the proper
   value before performing the seek.  If entered as a literal
   argument, then a "smart" process in invoked which will
   determine the type of argument based on the kind of information
   entered.
   

Description:

    HUNT is a method of FINDing a record by searching all open
    index files or tags for the value entered.  This is the
    quickest method of finding information by scanning all the keys
    for the first match.  The value entered on the command line is
    automatically converted to the proper "type" to perform the
    seek.  For example, if you entered the command HUNT 12.5, only
    numeric indexes will be seeked, or if you enter the command
    HUNT 01/02/03, only date indexes will be seeked.  If you enter
    an expression, such as HUNT DATE()-30, then only the indexes
    that match the type of the expression entered will be seeked.
   
    Using HUNT and RESUME is the fastest method of finding
    information in a large database that uses many index keys.  It
    is recommended that you build a set of keys for all fields that
    you want to include in the HUNT operation.  This can be
    accomplished easily by using the INDEX FIELDS command to create
    a set of tags all at one time.
   

Notes:

    HUNT automatically capitalizes the passed argument, so make
    sure that your character type indexes are UPPER() case.  When
    building index tags with INDEX FIELDS, this is accomplished
    automatically.
   

Examples:

    . USE MAILLIST
    . INDEX FIELDS LAST, FIRST, COMPANY, MAIL_DATE, SOURCE ;
                   TO MAILLIST.CDX
    . HUNT COMP
    . RESUME
    . HUNT DATE()
    . HUNT LARRY
    . HUNT EGGHEAD
   

Source/Library:

  DCSTD.CH

See Also:

   FIND
   dc_hunt()



IF ELSE

Evaluate a list of expressions based on a condition

Syntax:

    IF < bIf > DO < bDoIf > ;
       [ELSE < bDoElse >]
   

Arguments:

   < bIf > is a code block to be that is evaluated as the IF
   statement.
   
   DO < bDoIf > is a code block that is evaluated if < bIf > evaluates
   .TRUE.
   
   ELSE < bDoElse > is a code block that is evaluated if < bIf > evaluates
   .FALSE.
   

Description:

    IF ELSE is a dot-prompt replacement for IF...ELSE...ENDIF
    programming structure to be used when a single line command
    is needed.
   

Examples:

    . USE COLLECT
    . IF eof() DO DC_MsgBox('End of file') ELSE dbSkip()
   

Source/Library:

  DCSTD.CH

See Also:

   dc_ifelse()



INDEX FIELDS

Create index tags for all fields in a database

Syntax:

    INDEX FIELDS [ < list > ] ;
          [LENGTH < nLength >] ;
          [TO < cCDXName >]
   

Arguments:

   TO < cCDXName > is the name of the Combined Index file to create.
   If no extension is given, then if the default extension for
   combined indexes supported by the Data driver in use will be
   appended.
   
   If no < cCDXName > name is given, then the index will be created
   using the same prefix as the open database and with the default
   extension for combined indexes supported by the Data driver in
   use.
   
   < list > is a list of index tag names to create, separated by
   commas.  The tag name(s) must be the same as the name(s) of
   valid fields in the current work area.  If no list is passed
   then tags for ALL fields will be created.
   
   LENGTH < nLength > is an optional argument only to determine the
   maximum length of character type indexes.  For example, if you
   have a character field of 100 bytes, you most likely will not
   want to index on all 100 bytes, but instead on only the first
   10 characters.  If this argument is not passed, then a default
   length of 10 will be used. If the length of any character field
   is less than < nLength > then the index length for that specific
   tag will be the field length.
   

Description:

    INDEX FIELDS is used to create an index tag for all fields
    (up to 99) in a database.  This command is handy when you wish
    to have an index for each field in the database and are using
    the HUNT..RESUME  .or DC_HUNT() "smart seeking" feature of
    eXPress++.
   

Examples:

    . USE MAILLIST VIA DBFCDX
    . INDEX FIELDS "LAST", "COMPANY", "SOURCE"
    . HUNT 'SCOTT'
   

Source/Library:

  DCSTD.CH

See Also:

   dc_tagallcreate()



INDEX ON

Create an index

Syntax:

    INDEX ON [ < clauses > ]
   

Arguments:

    See the Xbase++ documentation for a description of < clauses >.
   

Description:

    INDEX ON is a front-end to the Xbase++ INDEX ON command and
    supports all the same options.  It functions identically with
    the exception that it displays a progress bar during the
    index process.
   

Examples:

    . USE CUSTOMER
    . INDEX ON CUST_NMBR TO  CUSTNMBR
    . INDEX ON NAME TO CUSTNAME
    . SET INDEX TO CUSTNAME, CUSTNMBR
    . USE COLLECT VIA DBFCDX
    . INDEX ON TYPE TAG TYPE
   

Source/Library:

  DCSTD.CH

INKEY

Display Inkey() and AppEvent() values for pressed keys

Syntax:

    INKEY
   

Arguments:

    None.
   

Description:

    INKEY is used to display Inkey() and AppEvent() values for
    keys pressed by the user.
   

Examples:

    . INKEY
   

Source/Library:

  DCSTD.CH

See Also:

   dc_inkeydsp()
   dc_inkey()



INSERT

Insert Blank or Virtual records in selected database

Syntax:

   INSERT [VIRTUAL] [< nRecords >]
   

Arguments:

   < nRecords > is the number of new records to insert.
   
   VIRTUAL option will replace all new records with the value of
   the virtual record created by using the SAVE VIRTUAL command.
   

Description:

    INSERT will insert a specified number of blank or virtual
    records into the currently selected database starting at the
    current record. All records after the current record will be
    pushed down and the selected number of records will be inserted
    into the database.
   

Examples:

    . INSERT 20
    . INSERT VIRTUAL 5
   

Source/Library:

  DCSTD.CH

See Also:

   SAVE VIRTUAL
   BLANK



INTERPRET

Interpret a command string

Syntax:

   INTERPRET [CLIPBOARD] ;
             [MEMVAR < memvar >] ;
             [FILE < file >] ;
             [WITH < params,... >]
   

Arguments:

   MEMVAR < memvar > is a string containing a set of commands or an
   array containing a procedure.  If < memvar > is an array, then it
   must conform to the specifications of the array returned by
   DC_PROGLOAD(). If this parameter is a NIL, then the Windows
   ClipBoard will be used as the program to interpret.  This
   allows for cutting code snippets out of a help file, copying
   them to the ClipBoard and then interpreting the code snippet.
   
    - or -
   
   FILE < file > is a text file containing a set of commands.
   
   WITH < params > is a single-dimensional array of parameters to
   pass to the program being interpreted.  There should be one
   element in the array for each parameter included in the
   PARAMETERS statement in the interpreted program.
   
   NOTE: The CLIPBOARD clause or no parameters will use the Windows
         ClipBoard as the source of the program.
   

Description:

    INTERPRET is a command-line interpreter that will translate
    and execute any sequence of commands that is supported by Xbase++,
    eXPress++ and/or any command that has been user defined in
    DCCUSTOM.CH.  INTERPRET requires that the file DCSTD.CH and
    DCCUSTOM.CH exist in the INCLUDE path of the workstation.  The
    DCSTD.CH file contains all the standard eXPress++ commands and
    pointers to the Xbase++ include files for the standard Xbase++
    commands and defines.
   
    INTERPRET will execute a single command string or an array of
    commands that encompass an entire procedure with passed parameters
    and a return value.
   
    INTERPRET was designed to work in conjuction with DC_PROGRAM()
    and/or DC_PROGLOAD() which will load a program from the DCPROG.DBF
    program catalog, compile the program into a multi-dimensional
    array, then pass the program to INTERPRET for execution.
   

Examples:

    . INTERPRET MYPROG.TXT
   

Source/Library:

  DCSTD.CH

See Also:

   dc_dot()
   dc_translate()
   dc_interpret()



LOCATE

Locate a record

Syntax:

    LOCATE [ < clauses > ]
   

Arguments:

    See the Xbase++ documentation for a description of < clauses >.
   

Description:

    LOCATE is a front-end to the Xbase++ LOCATE command and
    supports all the same options.  It functions identically with
    the exception that it displays a progress bar during the
    index process and it also stays within any scope that was
    previously set with SET SCOPE or DC_SetScope().
   

Examples:

    . USE EXPRESS VIA FOXCDX
    . LOCATE FOR COMMAND = 'dc_dot'
   

Source/Library:

  DCSTD.CH

See Also:

   dc_dblocate()
   dc_dbcontinue()
   CONTINUE



LOCK

Lock the current record

Syntax:

    LOCK
   

Arguments:

    None.
   

Description:

    LOCK is used to lock the currently selected record
    before attempting to replace field data.
   

Examples:

    . USE COLLECT
    . GO 5
    . LOCK
    . COLLECT->condition := 'P'
    . UNLOCK
   

Source/Library:

  DCSTD.CH

See Also:

   dc_reclock()
   UNLOCK



LOCK EDIT

Maintain the "Lock" definition database

Syntax:

    LOCK EDIT
   

Description:

    LOCK EDIT is used to maintain a database of "Locks"
    which are put onto files, menu items, or fields when
    designing an application.  This database, DCLOCKS.DBF, is used
    as a reference only and is not needed to establish locks on menu
    items or other locks.  The database simply provides a handy
    picklist to choose a lock to put on an item.  The database
    assigns names and codes to locks.
   

Examples:

    . LOCK EDIT
   

Source/Library:

  DCSTD.CH

See Also:

   dc_lockmaint()
   dc_usermaint()



LOCK FILE

Lock the current file

Syntax:

    LOCK FILE | ALL
   

Arguments:

    None.
   

Description:

    LOCK FILE is used to lock the currently selected file before
    attempting to perform database operations that modify the data
    in mulitiple records.
   

Examples:

    . use customer
    . LOCK ALL
    . replace print_flag with .F. for print_flag
    . UNLOCK ALL
   

Source/Library:

  DCSTD.CH

See Also:

   dc_filock()



LOG

Write system status to a log file

Syntax:

    LOG [TO < cFileName >]
   

Arguments:

   TO < cFileName > is the name of the file to write.
   

Description:

    LOG will log information about the currently running
    procedure to a log file including the current status of work
    areas and environment variables.
   
    A dialog window will be displayed first for the user to type
    in specific information that will be saved in the log file
    or to specify the name and location of the log file.
   

Examples:

    . LOG
   

Source/Library:

  _DCLOG.PRG, DCLIP2.DLL

See Also:

   dc_log()
   dc_setdclip()



LOGIN

Login to application to establish user rights

Syntax:

    LOGIN [USER < cUserID >] ;
       [PASSWORD < cPassword >]
   

Arguments:

   USER < cUserID > is the User ID of the logging on user.  If this
   parameter IS NOT passed and the PASSWORD < cPassword > parameter
   IS passed, then the DCUSERS.DBF will be searched only for a
   match to the < cPassword >.  If < cUserID > is passed and
   < cPassword > is not passed, then the user will be prompted to
   enter a password.  If neither < cUserID > or < cPassword > is
   passed, then the user will be prompted for both a User ID
   and a password.
   

Description:

    LOGIN is used to log a user onto the system in the event that
    it is necessary to establish rights to menus, files, or
    specified fields.  LOGIN calls the function DC_UserLogin().
   
    The eXPress++ menu system, data-entry (editing) system, browsing
    system, and file system provide for establishing locks on menu
    items, fields and/or files.  If these systems are used without
    first calling DC_Userlogin(), then the user will be given full
    rights.  If however, DC_UserLogin() is called first, then the
    user will be given access to only those items in which the user
    has the exact key or a master key for each specified lock.
   
    If the user logs on with the MASTER PASSWORD, then he/she is
    automatically established as a "programmer" and is given full
    access.  The MASTER PASSWORD is hard-coded by a definition in
    DCUSER.CH.  To change the MASTER PASSWORD you must redefine it
    in DCUSER.CH and then recompile _DCUSER.DBF and include the
    new _DCUSER.OBJ in your link-script.
   
    User PASSWORDS are stored in the DCUSER.DBF database in
    encrypted form.  Passwords may be assigned or changed only
    with the DC_USERMAINT() function or the USER EDIT command.
   
    User KEYS are stored in the DCUSER.DBF database and may be
    assigned or changed only with the DC_USERMAINT() function or
    the USER EDIT command. Locks are placed on menu items or
    fields by entering a 3-character "lock" sequence when using
    the menu-designer and/or data-entry designer.  A database of
    standard locks and their definitions may be maintained by
    DC_LOCKMAINT().  When assigning a user a set of "keys" they
    may be specific keys or "master" keys.  A Master key is
    assigned by using wild-cards.  For example, the Master Key
    "5****" will allow access to any lock starting with the number
    "5", whereas the Master Key "67***" will allow access to any
    lock with the number "67".  Keys are stored in the USR_KEYS
    field and are separated by commas.
   
    Example:
   
     "1****,2****,3****,41***,42***,52231,6****"
   

Examples:

    . LOGIN USER LARRY PASSWORD BOOZER
   

Source/Library:

  DCSTD.CH

See Also:

   dc_userlogin()



MENU CREATE

Create a new menu with Menu Editor

Syntax:

    MENU CREATE < cMenuName >
   

Arguments:

   < cMenuName > is the name of the new menu to create.  The menu
   will be saved to the DCMENU.DBF dictionary.
   

Description:

    MENU CREATE is used to create a new menu using the menu editor
    system - DC_MenuEdit().
   

Examples:

    . MENU CREATE NEWMENU
   

Source/Library:

  DCSTD.CH

See Also:

   MENU EDIT
   dc_menuedit()



MENU EDIT

A Complex Pull-Down Menu Editor

Syntax:

    MENU EDIT [ < acMenu > ] ;
       [CREATE]
   

Arguments:

   < acMenu > is the name of the menu or the menu contents. If
   < acMenu > is a character string, it is a name of up to eight (8)
   digits.  If < acMenu > is an array, it must conform to the
   specifications of a menu array defined in the RETURNS section.
   If a menu name is passed then the DCMENU.DBF menu dictionary
   database will be searched and all menu items that match the
   menu name be loaded into an array for editing. If a NIL is
   passed, then a pick-list of all menus stored in the DCMENU.DBF
   database will be displayed.  If none is chosen, then it will
   be assumed that you wish to create a new menu.
   
   CREATE will create a new menu.
   

Description:

    MENU EDIT is a menu-designer system that will create complex
    pull-down menus.  Menus are designed by entering information in
    a browse-style window that displays menu items and sub-menus in
    an easy-to-read "indented" format.  The designed menu can be saved
    to an array, an array file, the data-dictionary, or to source-code
    which can be compiled and run by your application.
   
    MENU EDIT creates menus that are passed as an array to the
    DC_MENUMAIN() (Text Mode Reader) or DC_MENUOSYS() (Gui Mode Reader)
    functions for execution.  During the menu design process, the
    menu can be executed in a WYSIWIG fashion to provide instant
    feedback that the menu will function as it has been designed.
   
    MENU EDIT supports all the features of DC_MENUMAIN() and
    DC_MENUOSYS() including sub-sub-menus, automatic mouse support,
    message boxes, help-codes, accelerator keys, code-blocks, and access
    keys.  In addition, DC_MENUEDIT() supports conditional compiling of
    menu items to exclude key items at run-time based on a key list that
    is passed to DC_MENURUN() or DC_MENUCOMPILE() or based on a
    code block.
   

Examples:

    /* -- Edit the Main Menu -- */
    MENU EDIT MAINMENU
   

Source/Library:

  DCSTD.CH

See Also:

   dc_menuedit()
   dc_menuload()
   MENU CREATE



MODIFY STRUCTURE

Modify the structure of a database

Syntax:

    MODIFY STRUCTURE [TO < cNewFileName >]
   

Arguments:

   TO < cNewFileName > is the name to assign to the new modified file.
   If no argument is given, then the new file name will be the
   same as the original and the original file will be renamed to
   the same name as the file alias with a .DBK extension.  If the
   file contained at least one memo field, then the memo file
   will be renamed to the same name as the file alias with the
   .DTK extension.
   

Description:

    MODIFY STRUCTURE is used to change the structure of the
    database in the current work area and restore all the data in
    the file or save the database to a new name.
   
    You can add perform the following operations with a GUI dialog:
   
     1. Add a new field
     2. Delete a field
     3. Move a field
     4. Rename a field
     5. Replicate a set of new fields
     6. Change the type of a field
     7. Change the length of a field
   
    All data in the former file will restored to the modified
    file except for any fields that were deleted.
   

Examples:

    . USE COLLECT
    . MODIFY STRUCTURE TO COLLECT2
   

Source/Library:

  DCSTD.CH

See Also:

   dc_modstru()
   dc_struupdate()



OBJ LOAD

Dynamically load an Xbase++ compiled .OBJ for execution

Syntax:

    OBJ LOAD < cObjName > ;
       [RUN [< bcRunProc >] ]
   

Arguments:

   < cObjName > is the name of the .OBJ file to link.  If no drive/
   directory is included in the file name, then the .OBJ must
   exist in the directory specified by the SET ODIR command, ODIR=
   in DCLIP.SYS, or DC_SETT('ODIR',< path >).
   
   RUN < bcRunProc > will be automatically execute the < bcRunProc >
   procedure.  This may be the name of a procedure or function
   in quotes or a code block.
   

Returns:

    A logical .TRUE. if the .OBJ file could be linked into a .DLL
    and the .DLL loaded for execution, .FALSE. otherwise.
   

Description:

    OBJ LOAD is used to "dynamic-link" an Xbase++-compiled .OBJ
    file into memory for execution of any functions within the
    compiled .OBJ.  This is done by creating a temporary .DLL with
    the same name as the .OBJ file and loading the .DLL.
   

Examples:

    . OBJ mytest RUN test
   

Source/Library:

  DCSTD.CH

See Also:

   dc_objload()
   dc_compile()



PACK

Pack the current database

Syntax:

    PACK
   

Arguments:

    None.
   

Description:

    PACK is a high-level command that will pack the database
    in the currently selected work area.  This function does not
    use the Clipper dbPack() function but instead packs the file as
    follows:
   
    1. Displays a progress odometer during the packing process.
    2. Optimizes size of memo fields (removes dead space).
    3. Creates a backup file.
   

Examples:

    . USE EXPRESS INDEX EXPRESS.CDX VIA FOXCDX
    . PACK
   

Source/Library:

  DCSTD.CH

See Also:

   dc_pack()



PROGRAM

Run a Program from the Program Dictionary

Syntax:

    PROGRAM [ < cProgName > ] ;
       [WITH < aParams >]
   

Arguments:

   < cProgName > is the Tag Name of the program in the DCPROG.DBF
   Program Catalog file.  If no parameter is passed, then a pick-
   list of available programs will be displayed.  If an array
   < aProgram > is passed then it must conform to the structure
   of the array returned by DC_PROGLOAD() or interpreted
   programs.
   
   WITH < aParams > is a single-dimensional array of parameters to pass
   to the program being interpreted.  There should be one element
   in the array for each parameter included in the PARAMETERS
   statement in the interpreted program.  If less parameters are
   passed than specified in the PARAMETERS statement, the unpassed
   parameters will be initialized to NIL.
   

Description:

    PROGRAM is used to load a program from the DCPROG.DBF
    program catalog database and execute the program using the
    interpreter or runtime compiler.  Programs in the dictionary
    are pre-designated as "Interpreted" or "Compiled".
   
    Interpreted programs may contain any command that can be
    intrepreted at the dot-prompt plus the same type of structural
    elements as standard Clipper programs such as DO..WHILE and
    FOR..NEXT loops, IF..ELSE, DO..CASE statements, PARAMETERS
    statement and RETURN value, however they cannot contain
    CLASS statements, FUNCTION statements, LOCALS or STATICS.  If
    a program is designated to be Interpreted, the program is
    passed to the DC_INTERPRET() function.
   
    Compiled programs may contain any type of code that can be
    compiled with the XPP.EXE compiler.   IF a program is designated
    to be Compiled, the program is first compiled by the DC_COMPILE()
    function, then loaded into memory with the DC_OBJLOAD() function
    and executed.
   

Examples:

    . PROGRAM TEST WITH { Date(), Time() }
   

Source/Library:

  DCSTD.CH

See Also:

   dc_program()



PROGRAM MAINTENANCE

Maintain the DCPROG.DBF Program Dictionary File

Syntax:

    PROGRAM MAINTENANCE
   

Arguments:

    None.
   

Description:

    PROGRAM MAINTENANCE is used to maintain a database catalog of
    programs for later interpreting with PROGRAM or DC_PROGRAM().
    This system in intended for creating small programs that may
    be run from the dot-prompt, menus, data-entry validations, etc.
   
    PROGRAM MAINTENANCE provides an editor, search routines, print
    routines, etc.
   
    Programs are saved in a MEMO field in the DCPROG.DBF/.DBT file.
    These "interpreted" programs are not intended to replace compiled
    code but are instead a handy way of creating additional on-the-fly
    functions and procedures to give a data-driven system some extra
    convenience and functionality.
   

Examples:

    . PROGRAM MAINT
   

Source/Library:

  DCSTD.CH

See Also:

   dc_progmaint()



PURGE

Purge duplicate records from a database

Syntax:

    PURGE ON < exp1 > ;
          [TO < file >] ;
          [RETAIN < exp2 > ;
          [MAX | MIN]] ;
          [FIELD < field >]
   

Arguments:

   ON < exp1 > is an expression of field names to use in determining
   how to determine the duplication of records.  For example, if
   you want to purge records that have duplication of information
   in which LAST_NAME, FIRST_NAME and STREET are identical, then
   use UPPER(LAST_NAME+FIRST_NAME+STREET) as the expression.
   
   If an < expression > is not given then a window will appear with
   a user prompt to enter an expression or to press ALT-F for the
   index builder.  If ALT-F is pressed, a pick-list of fields will
   appear to aid in building the expression.
   
   TO < file > will create a new database that contains the purged
   records.
   
   RETAIN < exp2 > is an expression that determines which record of
   the set of duplicate records to retain (not mark for deletion).
   The default is "RECNO()".  MAX will retain the maximum value.
   MIN will retain the minimum value.  The default is MIN.
   
   FIELD < field > is the name of an optional numeric field in the
   database being purged. This field is used to write a number from
   0 to N.  If there are no duplicates, then a 0 will be written to
   the record.  If there ARE duplicates then a 1 will be written to
   the RETAINED record and a number from 2 to N will be written to
   each duplicate.
   

Description:

    PURGE is used to remove records from a database that have
    duplicates based on a test of specified fields.  The purged
    records will be marked as *deleted* but will not actually be
    removed from the data file until the file is packed.  This will
    allow you to BROWSE the file and monitor the purged information
    before completing the final reduction.
   
    PURGE actually creates a temporary index file based on an
    expression that is passed or created from the pop-up index
    builder.
   
    Purged records can be written to a new data file for recovery
    at any time.
   

Notes:

    PURGE will not actually remove duplicate records from the
    database, but will instead mark them for deletion.  To complete
    a full purge of the duplicate records, you must PACK the
    database.  If you wish you recall the deleted records after a
    purge, use the command RECALL ALL.
   

Examples:

    /* Purge all duplicate records that have an exact match
       for Last Name, First Name, Phone Number and Street.
       Retain the record that has the latest Mail Date */
   
    . USE MAILLIST
    . PURGE ON LAST+FIRST+PHONE+STREET RETAIN MAIL_DATE MAX
    . BROWSE
    . PACK
   

Source/Library:

  DCSTD.CH

See Also:

   dc_purge()



RECALL

Recall record(s) that were previously marked for deletion

Syntax:

    RECALL [ < args > ]
   

Arguments:

    See the Xbase++ documentation for < args >.
   

Description:

    RECALL without arguments is used to recall the current record
    after it was previously marked for deletion.  This command is
    a front-end to the Xbase++ dbRecall() function that automatically
    locks and unlocks the record to prevent a runtime error on
    shared databases.
   
    RECALL with arguments works identical to the Xbase++ RECALL
    command except a progress odometer will display the number of
    records scanned and the number of records that were actually
    recalled.
   

Examples:

    . USE EXPRESS INDEX EXPRESS.CDX SHARED
    . GO 10
    . RECALL
    . RECALL WHILE RecNo() < 20
   

Source/Library:

  DCSTD.CH

See Also:

   dc_recall()
   DELETE



REPLACE

Assign new values to field variables

Syntax:

    REPLACE [ < args > ]
   

Arguments:

    See the Xbase++ documentation for the REPLACE command.
   

Description:

    REPLACE works identical to the Xbase++ REPLACE command except
    a progress odometer will display the number of records scanned
    and the number of records that were actually replaced. Also,
    each record is individually locked and unlocked thus allowing
    REPLACE to be used with shared applications.
   
    If no arguments are used, then REPLACE displays a GUI dialog
    so the user may enter the conditions for the replacement.
   

Examples:

    . USE COLLECT
    . REPLACE ALL CONDITION WITH 'E'
    . REPLACE
   

Source/Library:

  DCSTD.CH

See Also:

   dc_virtrepl()
   SAVE VIRTUAL



REPLACE VIRTUAL

Replace the current record contents with Virtual record arra

Syntax:

    REPLACE WITH VIRTUAL
   

Arguments:

    None.
   

Description:

    REPLACE VIRTUAL will replace the contents of the current
    record with the data in the virtual record.  This function will
    automatically handle the record locking, so it is not necessary
    to lock the record.
   

Examples:

    . USE COLLECT
    . GO 5
    . SAVE VIRTUAL
    . GO 6
    . REPLACE VIRTUAL
   

Source/Library:

  DCSTD.CH

See Also:

   dc_virtrepl()
   SAVE VIRTUAL



RESTORE ARRAY

Restore a multidimensional array from a binary file

Syntax:

    RESTORE ARRAY < aArray > [FROM < cFileName >]
   

Arguments:

   < aArray > is the name of the variable to store the array contents.
   
   FROM < cFileName > is the name of the binary file that was previously
   created with SAVE ARRAY or DC_ASave().  If this argument is not
   passed then a file named < aArray >.DCA will be the default.
   

Description:

    RESTORE ARRAY will create an multidimensional array from the
    contents of a binary file that was created with SAVE ARRAY.
   

Examples:

    . aDir := Directory()
    . SAVE ARRAY aDir
    . RESTORE ARRAY aDir
    . SAVE ARRAY aDir TO junk.ar
    . RESTORE ARRAY aDir FROM junk.ar
   

Source/Library:

  DCSTD.CH

See Also:

   dc_arestore()
   SAVE ARRAY



RESTORE DATA

Restore work areas

Syntax:

    RESTORE DATA FROM < aWorkArea >
   

Arguments:

   < aWorkArea > is a multidimensional array created by the SAVE DATA
   command or DC_DataSave() function.
   

Description:

    RESTORE DATA will reopen all databases, indexes and relations
    from the array created by SAVE DATA or DC_DataSave().  This
    function is handy when it is necessary to insure that database
    work areas are restored to their original condition after
    calling a routine that may close files, open files, select
    different indexes or clobber relations.
   

Examples:

    . USE EXPRESS ALIAS XDOC VIA FOXCDX INDEX EXPRESS
    . SET TAG TO COMMAND
    . SAVE DATA TO aWorkArea
    . CLOSE ALL
    . RESTORE DATA FROM aWorkArea
   

Source/Library:

  DCSTD.CH

See Also:

   dc_datarest()
   SAVE DATA



RESTORE SET

Restore the SET environment from a file

Syntax:

    RESTORE SET FROM < cFileName >
   

Arguments:

   < cFileName > is the name of the file previously created by
   DC_SetSave() or SAVE SET.  If no extension is given then the
   extension .DCA will be added.
   

Description:

    RESTORE SET is used to restore the values of all Xbase++ and
    eXPress++ environment variables from a file previously created
    by SAVE SET.
   
    The SET environment is the complete set of standard Xbase++
    SETs such as SET EPOCH, SET DEFAULT, etc. and the additional
    eXPress++ SETs such as SET ODIR, SET PROMPT, etc.
   

Examples:

    . SAVE SET TO MYFILE.SET
    . DoSomethingThatChangesEnvironment()
    . RESTORE SET FROM MYFILE.SET
   

Source/Library:

  DCSTD.CH

See Also:

   dc_setrest()
   dc_setsave()
   SAVE SET



SAVE ARRAY

Save a multidimensional array to a binary file

Syntax:

    SAVE ARRAY < aArray > ;
       [TO < cFileName >]
   

Arguments:

   < aArray > is any multidimensional array.
   
   TO < cFileName > is the name of the binary file to create with
   the array contents.  If this argument is not passed then the
   file will be assigned the name < aArray >.DCA.
   

Description:

    SAVE ARRAY will save the contents of any multi-dimensional
    array to a binary file for later restoring with RESTORE ARRAY.
   

Examples:

    . aDir := Directory()
    . SAVE ARRAY aDir
    . SAVE ARRAY aDir TO junk.ar
   

Source/Library:

  _DCASAVE.PRG/.OBJ, DCLIPX.LIB

See Also:

   dc_asave()
   RESTORE ARRAY



SAVE DATA

Save info about all open workareas to an array

Syntax:

    SAVE DATA TO < aWorkArea >
   

Arguments:

   < aWorkArea > is the name of the variable to store the array
   pointer.
   

Description:

    SAVE DATA will store all work area info to an array.
   
    RESTORE DATA will reopen all databases, indexes and relations
    from the array created by SAVE DATA or DC_DataSave().  This
    function is handy when it is necessary to insure that database
    work areas are restored to their original condition after
    calling a routine that may close files, open files, select
    different indexes or clobber relations.
   

Examples:

    . USE EXPRESS ALIAS XDOC VIA FOXCDX INDEX EXPRESS
    . SET TAG TO COMMAND
    . SAVE DATA TO aWorkArea
    . CLOSE ALL
    . RESTORE DATA FROM aWorkArea
   

Source/Library:

  DCSTD.CH

See Also:

   dc_datasave()
   RESTORE DATA



SAVE SET

Save the SET environment to a file

Syntax:

    SAVE SET TO < cFileName >
   

Arguments:

   < cFileName > is the name of the file to create.  If no extension
   is given then the extension .DCA will be added.
   

Description:

    SAVE SET is used to save the values of all Xbase++ and
    eXPress++ environment variables to a file to be later restored
    by RESTORE SET or DC_SetRest().
   
    The SET environment is the complete set of standard Xbase++
    SETs such as SET EPOCH, SET DEFAULT, etc. and the additional
    eXPress++ SETs such as SET ODIR, SET PROMPT, etc.
   

Examples:

    . SAVE SET TO MYFILE.SET
   

Source/Library:

  DCSTD.CH

See Also:

   dc_setsave()
   dc_setrest()
   RESTORE SET



SAVE VIRTUAL

Save current record to Virtual record

Syntax:

   SAVE VIRTUAL
   

Arguments:

   None
   

Description:

    SAVE VIRTUAL is used to save the contents of the current record
    to a virtual record.  A virtual record is a file with the same
    prefix as the database alias and with the extension .DCV.
    The virtual record can then be used at any time to replace the
    contents of specified records in the same database by using the
    REPLACE WITH VIRTUAL, INSERT VIRTUAL or APPEND VIRTUAL commands.
   

Examples:

    . USE MAILLIST
    . GO 2345
    . SAVE VIRTUAL
    . APPEND BLANK
    . REPLACE WITH VIRTUAL
    . GO 1000
    . INSERT VIRTUAL 10
   

Source/Library:

  DCSTD.CH

See Also:

   APPEND VIRTUAL
   REPLACE VIRTUAL
   DC_VirtSave()



SEARCH

Search all fields in a set of databases for a value

Syntax:

   SEARCH [ < cFileName > ] ;
       [FOR < cText >] ;
       [TOPRINT ] ;
       [TOFILE < dest >]
   

Arguments:

   < cFileName > is the name of the database to search.  If no path
   is given then the current SET DEFAULT directory is assumed.  If
   < cFileName > is "ALL", then all databases that match the
   currently selected RDD will be searched.  If no argument is
   passed then a GUI dialog will be displayed prompting for a
   file name, text and output.
   
   FOR < cText > is the text to search for.  This is a case
   non-sensitive search and the first occurrence of the text in
   each field will be listed.  If no argument is passed then a
   GUI dialog will be displayed prompting for a file name, text
   and output.
   
   TOPRINT will send the report to the printer.  TOFILE < dest >
   will send the report to the file < dest >.
   

Description:

    SEARCH is used to search all fields of specified work
    areas for matching text and list all occurences of found text.
   
    The output can be sent to the screen, printer or a file and all
    occurrences where the text is found will be listed as follows:
   
    File        Record  Field        Text
    ----------- ------  ------------ ---------------------------
    CUSTOMER       123  PHONE        714-555-1212
    MAILLIST     23567  PHONE_NUM    (619)555-1212
   

Examples:

    // search CUSTOMER.DBF for occurrences of "O'BRIEN"
    // and display results on screen
    . SET RDD TO DBFNTX
    . SEARCH CUSTOMER FOR "O'BRIEN"
   
    // search CUSTOMER.DBF for occurrences of "O'BRIEN"
    // and copy results to file OBRIEN.TXT
    . SET RDD TO DBFNTX
    . SEARCH CUSTOMER FOR "O'BRIEN" TO FILE OBRIEN.TXT
   
    // search all .DBF's for occurences of "CLIPPER"
    . SET RDD TO DBFNTX
    . SEARCH ALL FOR CLIPPER
   

Source/Library:

  DCSTD.CH

See Also:

   dc_search()



SEEK

Seek a record in a set of Scoped Records

Syntax:

    SEEK < xValue >
   

Arguments:

   < xValue > is any value of the same type as the index key for
   the selected order.  If no argument is passed then a GUI dialog
   will be displayed for entering a value.  See FIND and DC_Find()
   for a description of this GUI dialog.
   

Description:

    SEEK is used to SEEK a record in a group of "scoped"
    records.  Scopes are set via the DC_SetScope() function.  This
    functions identical to the Xbase++ dbSeek() function except if
    the record is not found or is outside the range of the scope,
    it behaves as follows:
   
    1. If the record is not found the record pointer is placed at
       Eof() and a .FALSE. is returned.
   
    2. If the record is found but the indexkey() value is less
       than the top scope, the record pointer is placed at the
       beginning record of the scope and a .FALSE. is returned.
   
    3. If the record is found but the indexkey() value is greater
       than the bottom scope, the record pointer is placed at the
       last record of the scope and a .FALSE. is returned.
   
    4. If the record is found and the indexkey() value is within
       the range of the top and bottom scope, the record pointer
       is placed at the found record and a .TRUE. is returned.
   
    If no scope is set, then SEEK simply calls dbSeek().
   

Examples:

    . USE EXPRESS VIA FOXCDX INDEX EXPRESS
    . SET SCOPE TOP TO 'DC_F'
    . SET SCOPE BOTTOM TO 'DC_H'
    . SEEK 'DC_G'
    . ? Eof()
   .F.
   

Source/Library:

  DCSTD.CH

See Also:

   dc_dbseek()
   dc_find()
   HUNT
   FIND



SELECT

Select a database from a picklist of open files

Syntax:

    SELECT
   

Arguments:

    None.
   

Description:

    SELECT will pop-up a picklist of all work areas and
    display the alias and database file name open in each work
    area.  It will also allow the user to select an unused work
    area to open a new database.
   
    If arguments are passed, then SELECT functions identical to the
    Xbase++ SELECT command.  If no arguments are passed, SELECT
    uses the DC_DbfSel() function to select or open a new database.
   

Examples:

    . SELECT
   

Source/Library:

  DCSTD.CH

See Also:

   SELECT



SET

Pop up an editing screen for all SET environment variables

Syntax:

    SET [ < cSetName > ]
   

Arguments:

   < cSetName > is the name of the SET environment variable to
   edit.  If this parameter is not passed, then a picklist of all
   environment variables will be displayed for editing.
   

Description:

    SET is used to invoke a GUI editor for observing or
    modifying the value of any SET value in the environment.
   
    The SET environment is the complete set of standard Xbase++
    SETs such as SET EPOCH, SET DEFAULT, etc. and the additional
    eXPress++ SETs such as SET ODIR, SET PROMPT, etc.
   

Examples:

    . SET
    . SET DEFAULT
    . SET ODIR
   

Source/Library:

  DCSTD.CH

See Also:

   dc_setedit()



SET

Set and/or view an environment variable

Syntax:

    SET [ < cSetName > ] [TO < xValue >]
   

Arguments:

   < cSetName > is the name of the SET environment variable to
   edit.  If this parameter is not passed, then a picklist of all
   environment variables will be displayed for editing.
   
   If this is an Xbase++ name such as EPOCH, DATEFORMATE, PATH,
   DEFAULT etc. the value will be processed by the Xbase++ Set()
   function.
   
   If it is a eXPress++ name such as ODIR, EDITOR, etc, the
   value will be processed by the DC_Sett() function.
   
   TO < xValue > is the value to set.
   

Description:

    SET is used to set or read an Xbase++ or eXPress++ environment
    variable.
   
    SET with no parameters will invoke a GUI editor for observing
    or modifying the value of any SET value in the environment.
   
    The SET environment is the complete set of standard Xbase++
    SETs such as SET EPOCH, SET DEFAULT, etc. and the additional
    eXPress++ SETs such as SET ODIR, SET PROMPT, etc.
   

Examples:

    . SET
    . SET DEFAULT
    . SET ODIR
    . SET DEFAULT TO ..\XDOC
    . SET EDITOR TO \MEW\MEW32.EXE
   

Source/Library:

  DCSTD.CH

See Also:

   dc_setedit()



SET AUTOLOCK

Toggle automatic File/Record locking

Syntax:

   SET AUTOLOCK ON | OFF | < lToggle >
   

Arguments:

   ON will automatically lock and unlock the current record or
   file whenever a dot-prompt command is issued that requires a
   lock. (DEFAULT).
   
   OFF will disable the automatic record-locking feature.
   
   < lToggle > if .T. is equivalent to ON, if .F. is equivalent to
   OFF.
   

Description:

    SET AUTOLOCK is used to enable or disable the automatic record-
    locking feature of eXPress++ when using certain dot prompt
    commands.  Many Xbase++ commands will require a record lock
    whenever the command modifies data in the current work area.
    If AUTOLOCK is ON, then the record lock is issued automatically.
    If AUTOLOCK is OFF, then the DBRLOCK() function or LOCK command
    must be issued at the dot-prompt otherwise a "lock required"
    error may be displayed.
   
    SET AUTOLOCK will not affect any application code or any eXPress++
    menus, only commands issued at the dot prompt.
   

Examples:

    . USE SALES SHARED
    . SET AUTOLOCK OFF
    . DELETE
    Lock Required  DBFNTX[1022]
    . SET AUTOLOCK ON
    . DELETE
    . RECALL
   

Source/Library:

  DCSTD.CH

SET BATCH

Create a command to run a batch file

Syntax:

   SET BATCH TO < cCommandVerb >, < xcBatchFile >
   

Arguments:

   < cCommandVerb > is the name of the command you wish to use at
   the dot prompt execute the batch file.
   
   < xcBatchFile > is the name of the batch file to run when the
   < cCommand Verb > is entered at the dot prompt.  If no extension
   is given, then .DCB is assumed.
   

Description:

    SET BATCH adds command verbs to a table of commands for
    processing batch (.DCB) files from a single verb command.  This
    is a handy method of creating quick commands to run batch
    files.
   

Examples:

    // Batch file MYMOVE.DCB contains the following commands:
    //   COPY FILE %1 %2
    //   ERASE %1
   
    . SET BATCH TO MOVE, MYMOVE.DCB
    . MOVE \DCLIP\MYFILE.TXT \JUNK
   

Source/Library:

  DCSTD.CH

See Also:

   SET COMMAND
   SET PROCEDURE



SET COMMAND

Create a command to run an executable program

Syntax:

    SET COMMAND TO < cCommandVerb >, < executable program >
   

Arguments:

   < cCommandVerb > is the name of the command you wish to use at
   the dot prompt execute the procedure.
   
   < executable program > is the name of the .EXE to run.
   

Description:

    SET COMMAND adds a command verb to a table of commands for
    running other programs from a single verb command.  This is a
    handy method of creating quick commands to run executable
    programs.
   

Examples:

    . SET COMMAND TO ME, C:\MEW\MEW32.EXE
    . ME
   

Source/Library:

  DCSTD.CH

See Also:

   SET BATCH
   SET PROCEDURE



SET DBE | RDD

Select a database driver

Syntax:

    SET DBE | RDD [TO < cDbe >]
   

Arguments:

   TO < cDbe > is the database driver to select.
   

Description:

    SET DBE | RDD is used to select a database driver (DBE) from a
    picklist of available drivers.
   

Examples:

    . SET RDD TO DBFNTX  // set DBFNTX as the default driver
    . SET RDD // display a list of drivers to select
   

Source/Library:

  DCSTD.CH

See Also:

   dc_rddsel()



SET DOSKEY

Set Dot-Prompt command stack to DOS-Key emulation

Syntax:

   SET DOSKEY on | OFF
   

Description:

    SET DOSKEY is used to set the behavior of the dot-prompt
    command stack navigator to emulate that of DOS command
    stack navigators like Dos-Key or OS/2.
   
    The normal behavior allows commands to be reissued in
    sequence and expedite processes that are used again and
    again.  Dos-Key emulation automatically copies the selected
    command to the bottom of the stack after execution and
    creates a blank command line for input.
   

Examples:

    . SET DOSKEY ON
   

Source/Library:

  DCSTD.CH

SET DOTSTACK

Set the size of the Dot-prompt command stack

Syntax:

    SET DOTSTACK TO < nSize >
   

Arguments:

   < nSize > is a number from 100 to 4000.
   

Description:

    SET DOTSTACK is used to increase the length of the Dot-Prompt
    command stack array to a value greater than the default value
    of 100 commands.  This is desirable in the event that it is
    necessary to save and restore more than the last 100 commands
    with the HISTORY=<þfileþ> command in your DCLIP.SYS.
   

Examples:

    SET DOTSTACK TO 500
   

Source/Library:

  DCSTD.CH

See Also:

   SET DOSKEY



SET EDITOR

Establish the default source code editor

Syntax:

    SET EDITOR TO < cFileName >
   

Arguments:

   < cFileName > is the name of the editor .COM, .BAT or .EXE
   file to run when using the EDIT command.
   

Description:

    SET EDITOR is used to define the name and path of the default
    editor you wish to use when using the IDE features of eXPress++,
    such as the EDIT FILE command and re-editing after compiler
    errors.
   

Examples:

    . SET EDITOR TO C:\EXPRESS\UTIL\ME2.BAT
   

Source/Library:

  DCSTD.CH

See Also:

   SET PDIR



SET FLDKEY

Establish the hot key for popping up a field list

Syntax:

    SET FLDKEY TO < nInkey >
   

Arguments:

   < nInkey > is the same as the INKEY() value for the desired key
   to press to invoke the field pick-list.
   

Description:

    The ALT-F key is the default key to invoke the Field List
    window for selecting a field from the currently selected
    database and/or relational databases.  If you wish to reassign
    this key to prevent conflict with other hot-keys, then use this
    command.
   

Examples:

    // Define ALT-P as the field list key
    . SET FLDKEY TO 281
   

Source/Library:

  DCSTD.CH

SET GUI

Set the Dialogue mode to GUI or TEXT

Syntax:

    SET GUI ON | OFF
   

Arguments:

   SET GUI ON will cause eXPress++ to process Dual-Mode functions as
   a GUI dialogue.  SET GUI OFF will cause eXPress++ to process all
   Dual-Mode functions as a TEXT dialogue.
   

Description:

    SET GUI or GUI is used to set Text or Gui mode for Dual-Mode
    Functions.  The eXPress++ library contains a variety of
    functions which operate in "Dual-Mode".  When GUI mode is
    ON, the function uses a GUI dialogue based on Xbase Parts.  When
    the GUI mode is OFF the function works in standard text-mode.
   

Examples:

    . SET GUI ON
    . DC_PopCalc()  // pop up a GUI based calculator
    . SET GUI OFF
    . DC_PopCalc()  // pop up a Text based calculator
   

Source/Library:

  DCSTD.CH

See Also:

   dc_gui()



SET ODIR

Establish the working directory for .OBJ files

Syntax:

   SET ODIR TO < cObjDirectory >
   

Arguments:

   < cObjDirectory > is the directory name to place .OBJ files.
   

Description:

    SET ODIR is used to define the drive and directory to place
    .OBJ files when compiling .PRGs with the COMPILE | XPP
    command.
   

Examples:

    . SET PDIR TO \MYAPPS\PRG
    . SET ODIR TO \MYAPPS\OBJ
    . XPP MYMENU
    . XPP MYPROCS
   

Source/Library:

  DCSTD.CH

See Also:

   SET PDIR
   WHERE PUBLIC



SET ODPERCENT

Set percentage update of progress odometer

Syntax:

    SET ODPERCENT TO < nPercent >
   

Arguments:

   < nPercent > is a numeric value for the percentage of update
   you want on the progress odometer.  If you have very large
   files and want to see progress more often, then it is
   recommended you lower this number from the default of 5
   percent.
   

Description:

    SET ODPERCENT sets how often to update the progress indicator
    odometer when using DC_ODOMETER() or DC_ODBLOCK().
   

Examples:

    . SET ODPERCENT TO  1  // 1 percent
    . index on cust_nmbr to custnmbr
   

Source/Library:

  DCSTD.CH

See Also:

   dc_odometer()
   dc_odblock()



SET PDIR

Establish the working directory for .PRG files

Syntax:

    SET PDIR TO < cPrgDirectory >
   

Arguments:

   < cPrgDirectory > is the directory containing the source .PRG
   files.
   

Description:

    SET PDIR is used to define the drive and directory to search
    for .PRG files when searching for source code using such
    commands as EDIT FILE, COMPILE, etc.
   

Examples:

    . SET PDIR TO \MYAPPS\PRG
    . SET ODIR TO \MYAPPS\OBJ
    . XPP MYMENU
    . XPP MYPROCS
   

Source/Library:

  DCSTD.CH

See Also:

   SET ODIR
   EDIT FILE
   dc_editprg()



SET PROCEDURE

Create a command to run a function or procedure

Syntax:

    SET PROCEDURE TO < cCommandVerb >, < idExpression >
   

Arguments:

   < cCommandVerb > is the name of the command you wish to use at
   the dot prompt execute the procedure.
   
   < idExpression > is the name of the procedure or function to
   execute when the < cCommandVerb > is entered at the dot prompt.
   

Description:

    SET PROCEDURE adds command verbs to a table of commands for
    evaluating expressions from a single verb command.  This is a
    handy method of creating quick commands to run functions or
    code blocks.
   

Examples:

    . SET PROCEDURE TO CALLHOME, DIALOUT("714-555-1212")
    . CALLHOME
    . SET PROCEDURE TO HELLO, Eval({||MsgBox('Hello'),MsgBox('World')})
    . HELLO
   

Source/Library:

  DCSTD.CH

See Also:

   SET BATCH
   SET COMMAND



SET PROMPT

Establish the type of prompt for the Dot-prompt

Syntax:

    DEFAULT will display the current setting of the SET DEFAULT
    directory.  This is the directory selected by the
    SET DEFAULT command or DC_SETT('DEFA') function.  Use this
    option if you  wish to see the default directory in which
    databases, indexes, form files, etc. will be opened and
    created.  If SET DEFAULT is empty, i.e, SET DEFAULT TO, then
    databases will be created in the current DOS directory.
   
    DOS will display the current selected DOS directory.   This
    is the directory selected by the CD command or DC_CHDIR()
    function.  Low-level file functions such as FOPEN(),
    DC_TXTOPEN() etc. will look in the DOS directory for files
    if no path is included in the file name.
   
    < expression > is any expression that returns any value.
   

Description:

    SET PROMPT is used to enable or disable the display of the
    directory prompt that is displayed before the dot on the
    command line or to establish a custom prompt.
   

Source/Library:

  DCSTD.CH

See Also:

   dc_dot()



SET RELATION

Set a relation with a child scope

Syntax:

    SET RELATION                                  ;
        TO < key1 > ;
        INTO < alias1 > ;
        [SCOPED]          ;
        [, TO < keyN > INTO < (aliasN) > [SCOPED]]    ;
        [ADDITIVE]
   

Arguments:

   < alias1 > through < aliasN > are character string containing the
   alias name for the work area(s) to which a link is defined.
   
   TO < key1 > through < keyN > are expression(s) used to position the
   record pointer in the child work area in order to synchronize it
   with the record pointer in the parent work area.  The return
   value of the relation is passed to DbSeek() to position the
   record pointer in the child work area.
   
   SCOPED will automatically set the scope in the child work area
   to the value of the data in the parent work area whenever the
   parent record pointer is changed.
   
   ADDITIVE will add the relation to existing relations.  If this
   clause is not used then all existing relations will be closed
   first.
   

Description:

   SET RELATION is a front-end to the Xbase++ function
   dbSetRelation() which defines a link between two work areas. The
   dependent or child work area is specified by the argument <þcAliasþ>
   The controlling or parent work area is determined by the alias
   operator. If the alias operator is not used, the current work area
   is the parent work area the child area is synchronized with.
   Existing links in the parent work area are not deleted by
   SET RELATION.
   
   The synchronization of the record pointer in the child work area
   occurs using the return value of <þbRelationþ> . The child work area
   is automatically searched for this value using DbSeek() anytime the
   record pointer in the parent work area changes. If no index is
   active in the child work area, synchronization is done using the
   function DbGoto(). This means that an attempt is made to set the
   record pointer in the child work area using the value returned
   from <þbRelationþ> as a record ID.
   
   The range for navigating the record pointer in the child work area
   can be restricted to a subset of records by specifying .T. (true)
   for the optional parameter SCOPED . In this case, only those
   records are accessible in the child work area where the link
   expression <þbRelationþ> results in the same value for both work
   areas. When attempting to move the record pointer in the child
   work area outside this defined range, either Bof() or Eof() is set
   to .T. (true). In this way, a time consuming filter expression can
   be avoided.
   

Examples:

   . USE INVOICES
   . USE INVITEMS INDEX INVITEMS
   . SELECT INVOICES
   . SET RELATION TO "01122" INTO INVITEMS SCOPED
   

Source/Library:

  DCSTD.CH

See Also:

   dc_setrelation()
   SET SCOPE



SET SCOPE

Set a scoping value for the current work area

Syntax:

    SET SCOPE [TOP | BOTTOM] TO [< xValue1 >] [,< xValue2 >]
   

Arguments:

   If the TOP clause is used then the SCOPE TOP is set to < xValue1 >.
   If the BOTTOM clause is used then the SCOPE BOTTOM is set to < xValue1 >.
   
   If neither the TOP or BOTTOM clause are used then both the < xValue1 >
   (TOP) and < xValue2 > (BOTTOM) arguments are required.
   
   < xValue1 > and < xValue2 > are values to set.  This must be a value
   that matches the current index key.
   

Description:

    SET SCOPE is used to set a SCOPE TOP and SCOPE BOTTOM value
    for establishing a "scoping range" for a work area.  The eXPress++
    browsing and editing systems use SET SCOPE and DC_SETSCOPE() to
    store the scoping range when browsing and editing records.  When
    a scoping range is set, only the records that fall within the
    range will appear in the browse or edit screens.
   

Exported Instance Variables:

   

Methods:

   

Notes:

    With the exception of COMIX and Advantage Server, DC_SETSCOPE()
    does not establish the scoping range at the DBE-layer level, but
    instead stores the scoping information in dbCargo() as an array.
   
    The scoping information is retrieved by record navigation
    functions such as DC_DBGOTOP(), DC_DBGOBOTTOM() and DC_DBSKIP().
   

Examples:

    . USE EXPRESS ALIAS XDOC INDEX EXPRESS.CDX
    . SET ORDER TO 'COMMAND'
    . SET SCOPE TO 'A','C'  // set top to 'A' and bottom to 'B'
    . SET SCOPE TOP TO 'A'  // set top to 'A'
    . SET SCOPE BOTTOM TO 'B'  // set bottom to 'B'
    . SET SCOPE TO // clear top and bottom scopes
    . SET SCOPE TO 'H'  // set top and bottom to 'H'
    . SET SCOPE TOP TO  // clear top scope
    . SET SCOPE BOTTOM TO // clear bottom scope
   

Source/Library:

  DCSTD.CH

See Also:

   dc_setscope()
   dc_clrscope()
   CLEAR SCOPE



SET STATUS

Toggle display of GUI Status Window

Syntax:

   SET STATUS ON | OFF | < lToggle >
   

Arguments:

   ON will enable display of the status line.
   
   OFF will disable the status line.
   
   < lToggle > if .T. is equivalent to ON, if .F. is equivalent to
   OFF.
   

Description:

    SET STATUS is used to enable or disable the display of the GUI
    status window at the top of the display.  The status window
    provides important information about the current work area.
   

Examples:

    . SET STATUS ON
    . SET STATUS OFF
   

Source/Library:

  DCSTD.CH

See Also:

   dc_dot()



SET TALK

Toggle display of pre-processed output

Syntax:

   SET TALK ON | OFF | < lToggle >
   

Arguments:

   ON will enable the echoing of preprocessed output to the
   console.
   
   OFF will disable echoing of preprocessed output (default).
   
   < lToggle > if .T. is equivalent to ON, if .F. is equivalent to
   OFF.
   

Description:

    SET TALK is used to enable or disable the echoing of the pre-
    processed output to the console.  All commands entered at the
    dot- prompt are passed through the pre-processor and converted
    to a function or set of functions to be evaluated in sequence.
   
    When debugging #command, #translate or #define statements in
    .CH files previously loaded with the #include <þmycommandsþ>
    in your DCCUSTOM.CH file.  SET TALK ON will show the results
    of the translation.
   

Examples:

    . #TRANSLATE PHONE  => DIALOUT(<(number)>)
    . #DEFINE HOME 714-555-1212
    . SET TALK ON
    . PHONE HOME
   
    DIALOUT("714-555-1212")
   

Source/Library:

  DCSTD.CH

SET USEEXCLDATA

Force Exclusive use of application databases

Syntax:

   SET USEEXCLDATA on | OFF
   

Arguments:

   ON will force databases that are opened by the eXPress++ USE
   command, DC_UseArea() function, DC_WorkRestore(), DC_Dbfile(),
   or any other eXPress++ function or command that opens databases
   to be opened EXCLUSIVE regardless of how parameters are
   passed to these functions or the setting of the SET EXCLUSIVE
   system flag.
   
   OFF will insure that databases are opened by the default
   method for each function.
   

Description:

    SET USEEXCLDATA is used to override any default settings for
    opening databases and insure that they are always opened in
    EXCLUSIVE mode only.  This flag should be used when using
    eXPress++ in "design" mode.   Design mode means that the user or
    programmer is designing Browse and Data-Entry screens and/or
    Field Definitions.  When adding or changing database fields
    or packing files, they must be opened in "Exclusive" mode.
   

Notes:

    When designing a system it is recommended that you place the
    following commands in your DCLIP.SYS file:
   
    USEEXCLDATA=ON
    USEEXCLDICT=OFF
   
    or type the following commands at the dot prompt:
   
    SET USEEXCLDATA ON
    SET USEEXCLDICT OFF
   

Source/Library:

  DCSTD.CH

SET XPPOPT

Set the default Compiler switches

Syntax:

   SET XPPOPT TO < compiler options >
   

Arguments:

   < compiler options > is a list of options you want to pass to the
   Xpp.exe compiler.
   

Description:

    SET XPPOPT TO is used to establish a set of default options to
    be used by the XPP.EXE compiler when the COMPILE or XPP command
    is used at the dot-prompt to compile programs.
   

Examples:

    . SET XPPOPT TO /i\ALASKA\XPPW32\INCLUDE /n /w /b /dDEBUGMODE
    . XPP MYAPP
   

Source/Library:

  DCSTD.CH

See Also:

   SET ODIR
   SET PDIR
   SET XPPPATH



SET XPPPATH

Set the directory when the Compiler resides

Syntax:

   SET XPPPATH TO < directory >
   

Arguments:

   < directory > is the name of the directory in which the XPP.EXE
   compiler exists.  If XPP.EXE is already in your operating
   system environment path, then SET XPPPATH is not necessary.
   

Description:

    SET XPPPATH is used to define the directory in which the
    XPP.EXE compiler resides for eXPress++ compiler operations.
   

Examples:

    . SET XPPPATH TO \ALASKA\XPPW32\BIN
    . XPP MYAPP
   

Source/Library:

  DCSTD.CH

See Also:

   SET ODIR
   SET PDIR
   SET XPPOPT



SKIP

Skip records in a set of Scoped Records

Syntax:

    SKIP [ < nRecords > ] [ALIAS < alias >]
   

Arguments:

   < nRecords > is the number of records to skip.  Default is 1.
   
   ALIAS < cAlias > is the alias of the workarea to skip.
   

Description:

    SKIP is used to SKIP <þnþ> records in a group of "scoped" records.
    Scopes are set via the DC_SetScope() function.
   
    If a scope is not set, then SKIP simply calls dbSkip().
   

Examples:

    . USE EXPRESS INDEX EXPRESS.CDX
    . SET ORDER TO 'COMMAND'
    . SET SCOPE TOP TO 'C'
    . SET SCOPE BOTTOM TO 'E'
    . GO TOP
    . SKIP
   

Source/Library:

  DCSTD.CH

See Also:

   dc_dbskip()



STACK

Display the callstack and optionally edit the source

Syntax:

    STACK
   

Arguments:

    None.
   

Description:

    STACK is used to display a GUI dialog listing the current call
    stack and line numbers.
   
    Clicking on an item in the list will scan the list of .OBJs
    in the ODIR path to find the source of the function.  If
    the same named function exists in more than one .OBJ, then
    all .OBJs will be listed.  Clicking on the selected .OBJ will
    call the default editor and pass the name and line number of
    the selected source file to editor for editing.
   

Examples:

    . STACK
   

Source/Library:

  DCSTD.CH

See Also:

   dc_callstack()



SUM

Sum numeric fields in selected database

Syntax:

    SUM [ < args > ]
   

Arguments:

    See the Xbase++ documentation for details about < args >.
   

Description:

    SUM is used to sum numeric fields in the currently selected
    database based on a set of conditions. This command functions
    identical to the Xbase++ SUM command with the exception that
    a progress bar is displayed during the summing and the number
    of records actually summed is displayed.
   
    If no arguments are given, then SUM uses the DC_Sum() function
    to display a GUI dialog for selecting fields and options.
   

Examples:

    . USE COLLECT
    . SUM orig_price TO nPrice
    . SUM
   

Source/Library:

  DCSTD.CH

See Also:

   dc_sum()



TAG

Build or add to a Record Tag Array

Syntax:

    TAG [TO < aTags >] ;
        [CLEAR] ;
        [ FOR < for > ] ;
        [ WHILE < while > ] ;
        [ NEXT < n > ] ;
        [ ALL ] ;
        [ REST ] ;
        [ RECORD < rec > ]
   

Arguments:

   CLEAR will remove record numbers from the tag array that
   meet the specified conditions, otherwise records will be
   added.
   
   TO < aTags > is an existing array of record numbers which will
   display the TAG marker in the browse display.  If no
   argument is given then the public DCTAGS array will be
   used.
   
   The following clauses follow the conventions for database commands
   documented in the Xbase++ help file:
   
   FOR < for >
   WHILE < while >
   NEXT < n >
   ALL
   REST
   RECORD < rec >
   

Returns:

    A pointer to an array of tagged numbers.
   

Description:

    TAG is used to add or remove record numbers from an array of
    record numbers that can be used with all database commands for
    performing database operations on records that are "tagged".
   
    TAG will first check for a logical field in the database named
    "TAG" and will operate on this field.  If this field does not
    exist, it will operate on a PUBLIC array named DCTAGS.
   
    A manifest symbol named TAGGED may be used in any expression
    at the dot-prompt.  This symbol is automatically translated
    to DC_TAGGED() which is the function used to test whether or
    not a record has been tagged.  This allows for simple use of
    the tagging system by easy-to-enter commands.
   

Notes:

    CAUTION: The eXPress++ tagging system is designed for ad-hoc
    tagging of records using simple menu selection and database
    commands.  You will notice a gradual speed detioration as you
    add more records to the tag array when browsing.  This is
    because the DC_TAGGED() function must scan more records in the
    array.  It is recommend that you refrain from tagging more than
    1000 records or you may experience unacceptable slowness
    during browsing.
   
    If you need a tagging system that will support a much larger
    number of records, it is recommended that you add a TAG
    (logical) field to your database.
   

Examples:

     . select customer
     . TAG CLEAR ALL
     . go 113
     . ? TAGGED
    .F.
     . TAG
     . ? TAGGED
    .T.
     . TAG CLEAR
     . ? TAGGED
    .F.
     . TAG FOR balance>0
     . TAG FOR zip='92001'
     . TAG CLEAR FOR balance<1000
     . count for TAGGED
     . label form customer for TAGGED to print
   

Source/Library:

  DCSTD.CH

See Also:

   dc_rectag()
   TAG CLEAR



TAG CLEAR

Clear the Record Tag Array

Syntax:

    TAG CLEAR [ALL]
   

Arguments:

   ALL will clear all tags.  If this clause is not used, only
   the tag for the current record will be cleared.
   

Description:

    TAG CLEAR will clear the current record or all tags in the
    public DCTAGS array for the current work area.
   

Notes:

    CAUTION: The eXPress++ tagging system is designed for ad-hoc
    tagging of records using simple menu selection and database
    commands.  You will notice a gradual speed detioration as you
    add more records to the tag array when browsing.  This is
    because the DC_TAGGED() function must scan more records in the
    array.  It is recommend that you refrain from tagging more than
    1000 records or you may experience unacceptable slowness
    during browsing.
   
    If you need a tagging system that will support a much larger
    number of records, it is recommended that you add a TAG
    (logical) field to your database.
   

Examples:

    . use customer
    . GO 10
    . TAG
    . GO 20
    . TAG
    . TAG CLEAR ALL
   

Source/Library:

  DCSTD.CH

See Also:

   dc_rectagclear()
   dc_rectag()
   TAG



UNLOCK

Unlock the current record

Syntax:

    UNLOCK
   

Arguments:

    None.
   

Description:

    UNLOCK is used to unlock a record after it has been locked
    with LOCK, DC_RecLock(), Rlock() or dbrLock().
   

Examples:

    . USE COLLECT
    . GO 5
    . LOCK
    . COLLECT->condition := 'P'
    . UNLOCK
   

Source/Library:

  DCSTD.CH

See Also:

   LOCK



USE

Open a database file in a work area

Syntax:

    USE < db > ;
        [FOX >] ;
        [VIA < cDbe >] ;
        [ALIAS < cAlias >] ;
        [NEW] ;
        [EXCLUSIVE] ;
        [SHARED] ;
        [READONLY] ;
        [INDEX < list,... >] ;
        [ALTERNATE < cAltDbe >]
   

Arguments:

   NEW will open the database in a new work area. If this clause
   is not used current work area will be used.
   
   VIA < cDbe > is the DBE to use.  If no argument is passed, then
   the < cAltDbe > will be used followed by the current DBE.
   
   FOX is an alternative to the VIA < cDbe > clause.  This clause will
   set FOXCDX as the dbe.
   
   < cDatabase > is the name of the file to open.  If no drive and
   directory is included then the file must exist in the SET
   DEFAULT directory or SET PATH directory.
   
   SHARED will open the database in SHARED mode, otherwise it will
   be opened in EXCLUSIVE mode.
   
   READONLY will open the database for Read operations only.
   
   < cAlias > is the ALIAS to assign to the work area.  If no
   argument is passed then the prefix of the database name will
   be used as the alias.
   
   INDEX < list > is a list of associated indexes to open.
   
   ALTERNATE < cAltDbe > is an alternate DBE to use if the database
   cannot be opened by the primary < cDbe > driver.
   

Description:

    USE is similar to the Xbase++ USE command and can be used as a
    replacement for opening databases.  This command tests the
    validity of a database and it's associated memo file (if it
    exists) before attempting to open it to prevent common errors.
    Working with different database drivers can make it difficult
    to determine the cause of an open error. This command is
    designed to test a database to make sure it is a proper type.
    Parameters passed to USE are identical to the Xbase++ USE
    command so this command can be used as a replacement.
   

Examples:

    . USE EXPRESS FOX INDEX EXPRESS.CDX
   

Source/Library:

  DCSTD.CH

See Also:

   dc_usearea()



USER EDIT

Maintain the DCUSERS.DBF User Database

Syntax:

    USER EDIT [ < cUserID > ]
   

Arguments:

   If the < cUserID > argument is passed, then the record that
   contains the USR_ID matching < cUserID > will be edited,
   otherwise all records will be available for browsing and
   editing.
   

Description:

    USER EDIT is used to maintain the DCUSER.DBF database
    for establishing User ID's, Names, Passwords, Access Keys,
    etc.
   

Examples:

    . USER EDIT
   

Source/Library:

  DCSTD.CH

See Also:

   dc_usermaint()



UTIL

A menu of database utilities

Syntax:

    UTIL
   

Description:

    UTIL provides a set of general-purpose database utilities
    to perform menu-driven, complex database operations on the
    currently selected work area.
   
    Menu Selections
    ---------------------
    Create Database
    Display Structure
    Modify Structure
    Copy Structure
    Append Records
    Copy Records
    Import a Data File
    Replace Data
    Copy Fields
    Delete Records
    Recall Records
    Sort Database
    Join with Database
    Count Records
    Sum Data Fields
    Average Data Fields
    Disk Directory
    Insert Blank Record(s)
    Pack DataBase
    Zap Database
    Import/eXport Memos
    Purge Duplicate Records
   

Examples:

    . USE COLLECT
    . UTIL
   

Source/Library:

  DCSTD.CH

See Also:

   DC_Util()



WHERE PUBLIC

List .OBJ(s) that contain public function

Syntax:

    WHERE PUBLIC [ < cProc > ]
   

Arguments:

   < cProc > is the name of the procedure/function to find.
   If this argument is empty, a GUI dialog will be displayed to
   prompt the user for a procedure name.
   

Description:

    WHERE PUBLIC is used to scan a set of .OBJ files and list
    the names of all .OBJs that contain a PUBLIC declaration of
    a specified function.
   
    A file named DCPUBLIC.TXT will be created using the Xbase++
    XPPFILT.EXE utility program.  This file will contain a listing
    of all public functions in all .OBJs.
   

Notes:

    All .OBJs in the search directory(s) established by the
    SET ODIR (eXPress++) environment variable.  If this environment
    variable is empty, then the search path is established by the
    operating system SET OBJ environment variable.
   

Examples:

    . SET ODIR TO C:\TEST;F:\TEST
    . WHERE PUBLIC TEST
   

Source/Library:

  DCSTD.CH

See Also:

   dc_objpublic()
   SET ODIR



WHERE SOURCE

Display a list of .OBJ/.PRG files containing PUBLIC proc

Syntax:

    WHERE SOURCE < cProc >
   

Arguments:

   < cProc > is the name of the PUBLIC procedure to find.
   

Description:

    WHERE SOURCE is used to display a list of .OBJ files and the
    location of the original source that contain a specified
    PUBLIC procedure.
   

Notes:

    This function assumes that the source file has the same name
    as the obj file except with the .PRG extension.  This function
    is needed when it is not known which directory the source
    resides.
   

Examples:

    . WHERE SOURCE MAIN
   

Source/Library:

  DCSTD.CH

See Also:

   dc_objsourcelist()
   WHERE PUBLIC



ZAP

Zap the database

Syntax:

    ZAP
   

Arguments:

    None.
   

Description:

    ZAP is a front end to the Xbase++ dbZap() function that
    tests if a file is open exclusive and then prompts the user
    to reopen it exclusive before Zapping the file.  In either
    case, the user is given the option of cancelling the operation.
   

Examples:

    . USE COLLECT
    . ZAP
   

Source/Library:

  DCSTD.CH

See Also:

   dc_zap()



USER-DEFINED COMMANDS

Create a User-Defined object for displaying with GUI reader

Syntax:

   @ < nRow >,< nCol > MYCOMMAND < bCustom > ;
       [SIZE < nWidth > [,< nHeight >]] ;
       [VAR < uVar >] ;
       [PARENT < oParent >] ;
       [CAPTION < cCaption >] ;
       [PRESENTATION < aPres >] ;
       [TYPE < nType >] ;
       [OBJECT < oCustom >] ;
       [COLOR < ncFgC > [,< ncBgC >] ] ;
       [OPTIONS < aOptions >] ;
       [DATALINK < bLink >] ;
       [FONT < cFont >] ;
       [MESSAGE < cMsg > [INTO < oMsgBox >]] ;
       [HIDE < bHide >] ;
       [WHEN < bWhen >] ;
       [EDITPROTECT < bProtect >] ;
       [VALID < bValid >] ;
       [HELPCODE < cHelpCode >] ;
       [TOOLTIP < cToolTip >] ;
       [ACTION < bAction >] ;
       [CURSOR < nCursor >] ;
       [CARGO < xCargo >] ;
       [EVAL < bEval] ;
       [PIXEL] ;
       [RELATIVE < oRel >] ;
       [ID < cId >] ;
       [TITLE < cTitle >] ;
       [ACCELKEY < nKey >] ;
       [GOTFOCUS < bGotFocus >] ;
       [LOSTFOCUS < bLostFocus >] ;
       [TABSTOP] ;
       [NOTABSTOP] ;
       [TABGROUP < nTabGroup >] ;
       [VISIBLE] ;
       [INVISIBLE] ;
       [GROUP < cGroup >]
   

Arguments:

   < nRow >, < nCol > are the coordinates on the screen.
   Coordinates are always relative to position 0,0 ie. Top,Left
   of the parent object, unless the RELATIVE < oRel > argument is
   used.  If no parent is assigned, then the parent is the Dialog
   box.  IF the PIXEL option is set to .TRUE. in DCGETOPTIONS,
   then the numbers are in pixels otherwise they are in standard
   text-based coordinates.  You can also force the pixel mode by
   including PIXEL as a command argument.
   < nRow > is stored in element nGETLIST_STARTROW.
   < nCol > is stored in element nGETLIST_STARTCOL.
   
   < bCustom > is a required code block.  This is the code block
   that is evaluated to create the custom object.  It requires
   the following form:
   
    { | < a > | < MyFunc >( < a > ) }
   
    < a > is an array of information that is passed to the custom
    function.
   
   
    Element  Type Description
    -------  ---- ------------------------------------------------
   
      [1]     A   The GetList array
   
      [2]     N   The GetList pointer (the element containing this
                  object).
   
      [3]     O   The Parent object
   
      [4]     A   A two element array containing the start column
                  and start row.  The values will be converted to
                  pixel coordinates.
   
      [5]     A   A two element array containing the width and
                  height of the object.  The values will be
                  converted to pixels.
   
      [6]     A   Optional Presentation Parameters
   
      [7]     L   A .TRUE. if the object is VISIBLE.
   
   RELATIVE < oRel > is an optional object in the Getlist which
   determines the start coordinates of this object.  If this
   option is used, then the < nSrow >, < nSCol > coordinates are
   relative to the starting coordinates of < oRel > rather than
   the parent object.
   
   SIZE < nWidth >, < nHeight > defines the size of the object.
   IF the PIXEL option is set to .TRUE. in DCGETOPTIONS, then
   the numbers are in pixels otherwise they are in standard
   text-based coordinates.  You can also force the pixel mode by
   including PIXEL in the command.
   < nWidth > is stored in element nGETLIST_WIDTH
   < nHeight > is stored in element nGETLIST_HEIGHT
   
   VAR < uVar > is an optional memory variable that is used with
   this object.  It is converted to a code block using the
   function DC_GetAnchorCB() and stored in element bGETLIST_VAR.
   This code block is usually attached to the :dataLink instance
   var of an Xbase Parts object.
   
   PARENT < oParent > is the name of the variable that was assigned to
   the parent object for this object.  Only use this clause if you
   are placing this object onto another dialogue object.  If this
   clause is not used, then the object will be displayed in the
   top-level dialogue screen. This is converted to a code-block by
   the function DC_GetAnchorCB() and is stored in element
   oGETLIST_PARENT.
   
   < oGroup > is the name of the variable to assign as a storage
   place for this object.  It is converted to a code-block by
   the function DC_GetAnchorCB() and is stored in element
   oGETLIST_GROUP.
   
   CAPTION < cCaption > is the caption to use with the object
   and is stored in element cGETLIST_CAPTION.
   
   PRESENTATION < aPres > is a two-dimensional array. If specified,
   this contains presentation parameters for the object.
   The first column of the array must contain #define constants
   from the XBP.CH file starting with the prefix XBP_PP_. These
   constants define the presentation parameters that can be set
   for the object and include colors and fonts. The second column
   of the array in < aPres > contains the value for each setting.
   These are also generally set using #define constants from the
   GRA.CH file.  The array is stored in element
   aGETLIST_PRESENTATION.
   
   TYPE < nType > defines the "type" of the object and is stored
   in element nGETLIST_TYPE.
   
   OBJECT < oObject > is a local variable to store a reference to
   this object.  It is converted to a code-block by the function
   DC_GetAnchorCB() and is stored in element oGETLIST_OBJECT.
   
   COLOR < cColor > is a text-based color string for the object
   that is stored in element cGETLIST_COLOR.
   
   OPTIONS < xOptions > can be any type of variable.  It is stored
   in element xGETLIST_OPTIONS.
   
   DATALINK is an optional code block that is attached to the
   < uVar > via the function DC_GetAnchorCB().  This code block is
   evaluated when the :dataLink var is evaluated by an Xbase
   Parts object.
   
   FONT < cFont > is a font to use with this object and is stored
   in element cGETLIST_FONT.
   
   MESSAGE < cMsg > is the message you want to display in the
   message area of the dialogue screen defined by the DCMESSAGEBOX
   command when the object is in focus.  Optionally, INTO < oMsgBox >
   will designate which message box to display the message into.
   If the INTO clause is not used, then the last message box in the
   GetList is the default.
   
   PICTURE < cPict > is a character string specifying formatting
   options for the value of < uVar > during display and editing.
   It is stored in element cGETLIST_PICTURE.
   
   WHEN < bWhen > is a code block that is evaluated in the event loop.
   This code block must return a logical value.  If the value
   returned is .FALSE. then the object will be disabled and grayed.
   If the value returned is .TRUE. then the object will be enabled.
   The code block is stored in element bGETLIST_WHEN.
   
   HIDE < bHide > is a code block that is evaluated in the event loop.
   This code block must return a logical value.  If the value
   returned is .TRUE. then the object will be hidden from view.  If
   the value returned is .FALSE. then the object will be displayed.
   
   EDITPROTECT < bProtect > is an optional condition tested during the
   execution of the GUI gets by the DCREAD GUI command, before the
   object receives input focus (before it is activated). When the
   condition returns the value .T. (true), the object receives the
   input focus.  Otherwise, it is skipped. < bProtect > is a code
   block that must return a logical value when evaluated. The object
   is passed to the code block prior to the object receiving input
   focus. This clause behaves similar to the WHEN clause with the
   exception that the object is not disabled (grayed out).  The
   code block is stored in bGETLIST_PROTECT.
   
   VALID < bValid > is an optional condition tested during the
   navigation through the dialog objects when an object loses
   focus (before it is deactivated).  If the condition returns the
   value .T. (true), the object loses the input focus, otherwise,
   it remains active. < bValid > is a code block that must return a
   logical value when it is evaluated.  The object is passed to the
   code block prior to the object losing input focus.  The
   code block is stored in element bGETLIST_VALID.
   
   HELPCODE < cHelp > is a character string that is passed to the
   DC_HelpF1() function if F1 is pressed or the HELP button
   is clicked when this object has focus.  This HELPCODE allows
   the Help system to override the passing of the Procedure and
   Varname for more specific context-help.  The help code is
   stored in element cGETLIST_HELPCODE.
   
   TOOLTIP < cToolTip > is a character string which will display
   as a "Tool Tip" next to the object when the cursor is passed
   over the object.  The tooltip is stored in element
   cGETLIST_TOOLTIP.
   
   CURSOR < nCursor > is an optional mouse pointer to use for this
   object.  System mouse pointers start with XBPWINDOW_POINTERTYPE_
   and are defined in XPB.CH.  The default pointer is
   XBPWINDOW_POINTERTYPE_POINTER.  < nCursor > may also be a resource
   ID that points to a Bit-Map that has been compiled with the
   resource compiler and linked to the .EXE.  The cursor is stored
   in element nGETLIST_CURSOR.
   
   CARGO < xCargo > is any kind of data you wish to to add to the
   :cargo container for this object.  The cargo may be accessed
   at any time via the :cargo exported variable, however it will not
   be stored in the same manner it is entered.  The :cargo container
   of DCDIALOG objects is an array of at least three elements:
   
    [1] - A numeric value that is a pointer to the Getlist array
          for this object.
   
    [2] - A pointer to the GetList array.
   
    [3] - The value of < xCargo >.
   
    [4] and up - optional values added by the GUI reader.
   
   < xCargo > is stored in element xGETLIST_CARGO.
   
   ACTION < bAction > is a code-block to be used with objects
   that execute an action, like push-buttons.  This code block
   is stored in element bGETLIST_ACTION.
   
   COLOR < ncFGc >, < ncBGc > are foreground and background colors.
   They may be character strings representing valid text-based
   colors supported by SetColor() or they may be numeric constants
   which begin with either the prefix GRA_CLR_ or the prefix
   XBPSYSCLR_ as defined in GRA.CH or XBP.CH.
   
   ID < cId > is a unique identifier for this object.  This ID is used
   with functions like DC_GETORIGUPDATED() to determine the status
   of a get object.
   
   TITLE < cTitle > is a title to assign to this object.  The title
   is not displayed on the screen but is simply a description of the
   get object which is saved in the GetList.
   
   ACCELKEY < nKey > is a numeric "hot-key" assignment that will set
   focus to the custom object when the hot-key is pressed.  The key
   must be a valid key with the prefix xbeK_*.  These keys are
   defined in APPEVENT.CH.
   
   GOTFOCUS < bGotFocus > is a code block that is evaluated when this
   object receives input focus.
   
   LOSTFOCUS < bLostFocus > is a code block that is evaluated when this
   object loses input focus.
   
   TABSTOP will cause the object (Xbase Part) to be set when using
   the Tab key.  Note: When logical groups are defined in a dialog
   using TABGROUP < nTabGroup >, TABSTOP is usually set to .T. (true)
   for the first dialog element in the group.  This allows the first
   dialog element of a group to be activated using the Tab key.
   
   NOTABSTOP will cause the object (Xbase Part) to be ignored when
   using the Tab key. This clause is needed only to override any
   default setting of TabStop by the DCGETOPTIONS [TABSTOP] command.
   
   TABGROUP < nTabGroup > allows objects (Xbase Parts) that are created
   immediately after one another in the GetList to be combined into
   logical groups. This allows the user to navigate within a dialog
   from group to group by pressing the Tab key.  Within a group of
   dialog elements navigation is performed using the cursor keys.
   
   Only constants defined in the XBP.CH file can be used as values
   for this instance variable.  The following table lists the
   available constants:
   
   #define constants for < nTabGroup >:
   
    Constant             Description
   
    XBP_NO_GROUP     *)  Dialog element does not belong to a group
    XBP_BEGIN_GROUP      Dialog element is the first in a group
                         (this begins the definition of the group)
    XBP_WITHIN_GROUP     Dialog element is within a group
    XBP_END_GROUP        Dialog element is the last in a group
                         (this ends the definition of the group)
   
   *) Default value
   
   GROUP < cGroup > is a "group" name (case-sensitive) to assign to
   this GetList object.  Assignment to a group makes it possible to
   perform operations only on GetList items which are members of a
   specified group, using functions such as DC_GetRefresh() or
   DC_ReadGui().
   
   VISIBLE determines whether the object is visible immediately after
   the call to the method :create() . By default the object follows
   the VISIBLE clause of the DCGETOPTIONS command.  Use the
   INVISIBLE clause to override the VISIBLE clause of DCGETOPTIONS
   
   EVAL < bEval > is a code block to evaluate after the object is
   created.  The object is passed to the code block as a parameter.
   

Description:

    User-Defined Commands are similar to the @ DCCUSTOM command with
    the exception that the programmer can create his/her own syntax
    for the command.  The Syntax and Arguments listed below are a
    "suggestion" only.  The only requirement is that the command
    arguments are properly parsed into the GetList array.  This is
    accomplished by creating a custom command similar to the
    "template" provided in DCUDC.CH.
   
    A User-Defined command must add a GetList item of the type
    GETLIST_USER (defined in DCDIALOG.CH) plus any numeric offset
    from 0 to 1000.  This allows for up to 1000 user-defined commands
    in an application.
   

Examples:

   /*
   In this example, a custom command named @..FILEEDIT can be used
   to edit an ASCII file.  The command is used with DCREAD GUI and
   can be mixed with any other UDC commands or DC* commands.
   */
   
   #define MYGETLIST_FILEEDIT      GETLIST_USER + 1
   
   #command  @ , FILEEDIT <(cFile)>    ;
                   [SIZE  [,]]    ;
                   [PARENT ]              ;
                   [PRESENTATION ]          ;
                   [OBJECT ]              ;
                   [COLOR  [,] ]     ;
                   [FONT ]                  ;
                   [MESSAGE ]            ;
                   [HELPCODE ]          ;
                   [TOOLTIP ]            ;
                   []                     ;
                   [TITLE ]                ;
                   [RELATIVE ]               ;
                   [ID ]                      ;
                   [ACCELKEY ]             ;
                   []                 ;
     =>                                            ;
      AADD( GetList,                                       ;
       { MYGETLIST_FILEEDIT,   /* nGETLIST_TYPE         */ ;
         nil,                  /* nGETLIST_SUBTYPE      */ ;
         nil,                  /* cGETLIST_CAPTION      */ ;
         nil,                  /* bGETLIST_VAR          */ ;
         ,               /* nGETLIST_STARTROW     */ ;
         ,               /* nGETLIST_STARTCOL     */ ;
         nil,                  /* nGETLIST_ENDROW       */ ;
         nil,                  /* nGETLIST_ENDCOL       */ ;
         ,             /* nGETLIST_WIDTH        */ ;
         ,            /* nGETLIST_HEIGHT       */ ;
         ,              /* cGETLIST_FONT         */ ;
         nil,                  /* cGETLIST_PICTURE      */ ;
         nil,                  /* bGETLIST_WHEN         */ ;
         nil,                  /* bGETLIST_VALID        */ ;
         ,           /* cGETLIST_TOOLTIP      */ ;
         nil,                  /* xGETLIST_CARGO        */ ;
         ,              /* aGETLIST_PRESENTATION */ ;
         nil,                  /* bGETLIST_ACTION       */ ;
         nil,                  /* oGETLIST_OBJECT       */ ;
         nil,                  /* xGETLIST_ORIGVALUE    */ ;
         <.ro.>,               /* xGETLIST_OPTIONS      */ ;
         [{,}],  /* aGETLIST_COLOR        */ ;
         ,           /* cGETLIST_MESSAGE      */ ;
         ,          /* cGETLIST_HELPCODE     */ ;
         nil,                  /* cGETLIST_VARNAME      */ ;
         nil,                  /* bGETLIST_READVAR      */ ;
         nil,                  /* bGETLIST_DELIMVAR     */ ;
         [{DC_GetAnchorCB(@,'O'),                 ;
           <(oCustom)>,'O'}],  /* bGETLIST_GROUP        */ ;
         nil,                  /* nGETLIST_POINTER      */ ;
         [{DC_GetAnchorCB(@,'O'),                 ;
            <(oParent)>,'O'}], /* bGETLIST_PARENT       */ ;
         {|a|MyFileEditor(a)}, /* bGETLIST_REFVAR       */ ;
         nil,                  /* lGETLIST_READONLY     */ ;
         <.p.>,                /* lGETLIST_PIXEL        */ ;
         nil,                  /* nGETLIST_CURSOR       */ ;
         nil,                  /* bGETLIST_EVAL         */ ;
         [{DC_GetAnchorCb(@,'O'),                    ;
            <(oRel)>,'O'}],    /* bGETLIST_RELATIVE     */ ;
         <(cFile)>,            /* xGETLIST_OPTIONS2     */ ;
         nil,                  /* xGETLIST_OPTIONS3     */ ;
         nil,                  /* xGETLIST_OPTIONS4     */ ;
         nil,                  /* xGETLIST_OPTIONS5     */ ;
         nil,                  /* xGETLIST_OPTIONS6     */ ;
         nil,                  /* xGETLIST_OPTIONS7     */ ;
         nil,                  /* xGETLIST_OPTIONS8     */ ;
         nil,                  /* xGETLIST_OPTIONS9     */ ;
         nil,                  /* cGETLIST_LEVEL        */ ;
         ,             /* cGETLIST_TITLE        */ ;
         nil,                  /* cGETLIST_ACCESS       */ ;
         nil,                  /* bGETLIST_COMPILE      */ ;
         ,                /* cGETLIST_ID           */ ;
         nil,                  /* dGETLIST_REVDATE      */ ;
         nil,                  /* cGETLIST_REVTIME      */ ;
         nil,                  /* cGETLIST_REVUSER      */ ;
         nil,                  /* bGETLIST_HIDE         */ ;
         ,             /* nGETLIST_ACCELKEY     */ ;
       } )
   
   
   LOCAL GetList := {}
   
   @ 1,0 DCSAY "This is my README.TXT file"
   
   @ 3,0 FILEEDIT C:\express\readme.txt SIZE 60,10
   
   DCREAD GUI ;
      FIT ;
      BUTTONS DCGUI_BUTTON_OK + DCGUI_BUTTON_CANCEL
   
   RETURN nil
   
   /* ----------------------- */
   
   STATIC FUNCTION MyFileEditor ( aParams )
   
   LOCAL oXbp, aGetList, nPointer, oParent, aPos, aSize, aPres, lVisible, ;
         cFileName, cMemo, bAnchor
   
   aGetList    := aParams[1]
   nPointer    := aParams[2]
   oParent     := aParams[3]
   aPos        := aParams[4]
   aSize       := aParams[5]
   aPres       := aParams[6]
   lVisible    := aParams[7]
   
   oXbp      := XbpMLE():new( oParent, , aPos, aSize, aPres, lVisible )
   
   cFileName := aGetList[nPointer,xGETLIST_OPTIONS2]
   oXbp:editable := !aGetList[nPointer,xGETLIST_OPTIONS]
   
   IF Valtype(cFileName) = 'C' .AND. File(cFileName)
     cMemo := MemoRead(cFilename)
     aGetList[nPointer,xGETLIST_CARGO] := cMemo
   ELSE
     cMemo := 'File: ' + cFileName + ' not found.'
     oXbp:editable := .f.
   ENDIF
   
   bAnchor := AnchorCb(@cMemo)
   
   IF Valtype(aGetList[nPointer,cGETLIST_FONT])='C'
     oXbp:SetFontCompoundName(aGetList[nPointer,cGETLIST_FONT])
   ENDIF
   
   oXbp:clipSiblings := .T.
   oXbp:datalink := bAnchor
   oXbp:create()
   oXbp:SetData()
   IF oXbp:editable
     oXbp:killInputFocus := ;
          {|a,b,o|o:GetData(),MemoWrit(cFileName,cMemo)}
   ENDIF
   
   RETURN oXbp
   *
   

Source/Library:

  DCUDC.CH

See Also:

   @ DCCUSTOM
   DCUDC.CH



DBU

A Gui Database Management Utility

Syntax:

   DBU [ < args > ]
   

Arguments:

   < args >
   < arg1 > thru < arg15 > may be any of the following arguments:
   
   /an - Load ADSDBE driver (.NTX/.DBT support)
   /ac - Load ADSDBE driver (.CDX/.IDX/.FPT support)
   /dbe:< default dbe name >
   /tbl:< database name >
   /ind:< index list (separated by commas)
   /odbc - Load ODBC driver
   /dsn:< data source name > - ODBC (use a + for each space in name)
   /uid:< user id > - ODBC
   /pwd:< password > - ODBC
   /dbq:< database name > - ODBC
   /dll:< dllname > - Load a dynamic link library
   /srv:< server name or drive letter > - ADSDBE
   /obj:< objfilename > - Load an .OBJ file
   /proc:< procedure > - Run a procedure ( with parameters)
   

Description:

   DBU is a database management utility that can be used to
   edit databases using any DBE including ADSDBE and ODBCDBE.
   DBU is an MDI-based dialog that contains a status window at
   the top of the dialog.  This status window displays information
   about the currently selected work area and also contain some
   pushbuttons to popup further status windows.
   
   A menu at the top of the dialog provides a complete set of
   database utilities, searching features and printing features.
   It also allows for an MDI child browse/edit window to be created
   for each open work area.  When a browse/edit window is given
   focus with the mouse, the work area of that window is selected
   and the status of the selected work area is displayed at the
   top of the dialog window.
   
   All MDI child windows are opened in the same thread as the
   parent window.
   

Examples:

   DBU /odbc, /dsn:dBASE+Files, /adsntx
   

Source/Library:

  DCSTD.CH

See Also:

   dc_dot()
   dc_dbu()



DCAPICK

A dialogue for choosing a item from an array pick list.

Syntax:

   @ [ < nTop >, < nLeft > ] DCAPICK < aMenuItems >          ;
              [SIZE < nWidth >, < nHeight >]             ;
              [HEADER < acHeader >]                    ;
              [COLWIDTH < anColWidth >]                ;
              [TITLE < cTitle >]                       ;
              [TAG < anTag > [COLOR < aTagColor >] ]     ;
              [HANDLER < bHandler >]                   ;
              [START < nStart >]                       ;
              [FONT < cFontName >]                     ;
              [PARENT < oParent >]                     ;
              [OWNER < oOwner >]                       ;
              [CENTER >]                              ;
              [MENU >]                                ;
              [TO < nChoice >]                         ;
              [NOVSCROLL]                           ;
              [NOHSCROLL]                           ;
              [PRESENTATION < aPres >]                                      ;
   

Arguments:

   < nTop >, < nLeft > are the starting coordinates.  These are text-
   base coordinates.  These parameters are not required if the
   < lCenter > parameter is used.
   
   < aMenuItems > is an array of character strings to include
   in the pick-list.  This may be a single-dimension array or a
   multi-dimension array.
   
   SIZE < nWidth > and < nHeight > are the width and height of the
   window in text-based coordinates.
   
   HEADER < acHeader > is the heading to place above each column.  If
   < aMenuItems > is a single-dimension array, then there is only 1
   header, so < acHeader > is a character string.  If < aMenuItems >
   is a multi-dimension array, then < acHeader > is an array of
   character strings, 1 for each column.
   
   COLWIDTH < anColWidth > is the width of the column(s).  If
   aMenuItems > is a single-dimension array, then there is only 1
   width, so < anWidth > is a numeric value.  If < aMenuItems > is a
   multi-dimension array, then < anWidth > is an array of numeric
   values, 1 for each column.
   
   TITLE < cTitle > is the title to place at the top of the window.
   
   TAG < anTag > is an array of logical elements or a single numeric
   value.  If < anTag > is an array, it must be the same length as
   the array being browsed and must contain logical values.  When
   the user double-clicks a browse row, the corresponding element
   of < anTag > will be toggled.  If < anTag > is a numeric value, then
   it is a pointer to the column of < aMenuItems > that contains
   logical tags.
   
   COLOR < aTagColor > is used in conjunction with < anTag > to select
   the color for the rows that are tagged.  This is a 2-element
   array consisting of a foreground and background color.  The
   default is { GRA_CLR_WHITE, GRA_CLR_BLUE }.
   
   HANDLER < bHandler > is a SPARE.
   
   START < nStart > is a SPARE.
   
   FONT < cFontName > is the font to use for the browse.
   
   PARENT < oParent > is the parent object to create the browse.  If
   no parameter is passed, a dialog window will be created.
   
   OWNER < oOwner > is the owner object of the browse.  If no
   parameter is passed, the owner will be the same as the parent.
   
   CENTER will center the browse dialog on the desktop.
   
   MENU will enable "menu mode".  This allows the operator to press
   keyboard keys that match the first letter of each array item to
   select the item.
   
   NOVSCROLL will suppress the vertical scroll bar.
   
   NOHSCROLL will suppress the horizontal scroll bar.
   
   PRESENTATION < aPres > is a presentation array that conforms to
   the presentation parameters required for the XbpBrowse() class.
   
   TO < nChoice > is the name of a variable to store the choice
   selected by the user.
   

Description:

   DCAPICK is used to display a browse-style picklist of an
   array.
   

Examples:

   FUNCTION XTest()
   
   LOCAL aDir := Directory(), i, aHeaders, aWidths
   
   FOR i := 1 TO Len(aDir)
     ASize(aDir[i],5)
     aDir[i,5] := .f.
   NEXT
   
   aHeaders := { 'File Name', 'File Size', 'File Date', 'File Time' }
   
   aWidths := { 10,10,10,10 }
   
   DCAPICK aDir ;
      SIZE 50,10 ;
      HEADER aHeaders ;
      COLWIDTH aWidths ;
      TAG 5 COLOR { GRA_CLR_WHITE, GRA_CLR_RED } ;
      FONT '8.Terminal'
      TITLE "Disk Directory" ;
      CENTER ;
      TO nChoice
   
   RETURN nChoice
   

Source/Library:

  DCDIALOG.CH

See Also:

   dc_apick()
   dc_achoice()



DCREPORT FORM

A Windows compatible replacement for REPORT FORM

Syntax:

   DCREPORT FORM < frm > ;
            [HEADING < heading >]  ;                                            ;
            [PLAIN] ;
            [NOEJECT] ;
            [SUMMARY] ;
            [NOCONSOLE] ;
            [TO PRINTER] ;                                            ;
            [TO FILE < (toFile) >] ;                                            ;
            [FOR < for >] ;                                                     ;
            [WHILE < while >] ;                                                 ;
            [NEXT < next >] ;                                                   ;
            [RECORD < rec >] ;                                                  ;
            [REST] ;                                                   ;
            [ALL] ;                                                           ;
            [XBP]  ;                                                    ;
            [TITLEFONT < titlefont >] ;                                        ;
            [HEADFONT < headfont >] ;                                           ;
            [SIZE < nRows >,< nCols >] ;
   ;
            [FONT < font >] ;                                                   ;
            [PREVIEW] ;
            [PRINTER @< oPrinter >]
   
                                                                             ;
   

Arguments:

   < xcReport > is the name of the report form (.frm) file that contains
   the definition of the REPORT.  If an extension is not specified, (.frm)
   is assumed.  < xcReport > can be specified as a literal string or as a
   character expression enclosed in parentheses.
   
   TO PRINTER echoes output to the printer.
   
   TO FILE < xcFile > echoes output, without formfeed characters (ASCII
   12), to a file.  If a file extension is not specified, a (.txt) is
   added.  You can specify < xcFile > as a literal string or as a
   character expression enclosed in parentheses.
   
   NOCONSOLE suppresses all REPORT FORM output to the console.  If not
   specified, output automatically displays to the console unless SET
   CONSOLE is OFF.
   
   < scope > is the portion of the current database file to report.  The
   default scope is ALL.
   
   WHILE < while > specifies the set of records meeting the
   condition from the current record until the condition fails.
   
   FOR < for > specifies the conditional set of records to report
   within the given scope.
   
   NEXT < next > is the number of records to print.
   
   REST will print the remaining records to the end of file.
   
   ALL will print all records.
   
   RECORD < rec > will print only record number < rec >.
   
   PLAIN suppresses the display of the date and page number, and
   causes the report to print without page breaks.  In addition, the
   report title and column headings display only at the top of the
   report.
   
   HEADING places the result of < cHeading > on the first line of each
   page.  < cHeading > is evaluated only once at the beginning of the
   report, before the record pointer is moved.  If both PLAIN and
   HEADING are specified, PLAIN takes precedence.
   
   NOEJECT suppresses the initial page eject when the TO PRINTER
   clause is used.
   
   SUMMARY causes the REPORT FORM to display only group, subgroup,
   and grand total lines.  Detail lines are suppressed.
   
   XBP causes the form to be printed using the XbpPrinter() class
   rather than the standard LPTx device.  If option is not specified
   then the remaining arguments are ignored and the printed output
   follows path established by standard text-based commands like
   SET PRINTER TO < cPath >.  If XBP is specified, then a printer dialog
   will be displayed which gives the user the option of directing the
   printed output to a Windows device.
   
   FONT < cFont > is the font to use for the body of the report.
   
   TITLEFONT < cTitleFont > is the font to use for the title of the
   report.
   
   HEADFONT < cHeadFont > is the font to use for the column headings.
   
   SIZE < nRows, nCols > is the number of rows and columns on the
   printed page.  This does not override the settings in the .FRM
   file but instead is used to determine establish a pixel resolution
   for the page.  For example, if the report uses 132-character
   columns, it is recommended that you also use 132 columns as the
   size.  If a large number is used, the report will be more
   compressed.
   
   PREVIEW will display the report within a window and allow the
   user to preview the output on the screen rather than sending it
   to the printer.
   
   PRINTER @< oPrinter > is a printer object created with the DCPRINT ON
   command.  If this clause is not used or < oPrinter > is initalized
   to a NIL then a new printer object will be created an stored in
   < oPrinter >.
   

Description:

   DCREPORT FORM provides the same functionality as the Clipper
   REPORT FORM command, in that it uses .FRM files, except that it
   allows for printing to any Windows print device like local and
   network printers or fax.  It also provides the option of
   "previewing" the printed output.
   

Examples:

   #include "dcprint.ch"
   
   PROCEDURE XTest( lPreview )
   
   lPreview := IIF( Valtype(lPreview)='L',lPreview,.t.)
   
   USE collect NEW
   GO TOP
   
   IF lPreview
     DCREPORT FORM collect XBP FONT '10.Courier' ;
           TITLEFONT '10.Helv.Bold' HEADFONT '10.Courier.Bold' PREVIEW
   ELSE
     DCREPORT FORM collect XBP FONT '10.Courier' ;
           TITLEFONT '10.Helv.Bold' HEADFONT '10.Courier.Bold'
   ENDIF
   
   RETURN
   

Source/Library:

  DCPRINT.CH

See Also:

   DCPRINT ON