records in a set of Scoped Records
dc_dbstru()..........Display the structure of the selected database
dc_dbstruct()........Get the structure of a database in various formats
dc_dbstruw().........Display the structure of the selected database (wide format)
dc_dbu().............A Gui Database Management Utility
dc_debuglogfile()....Set the name of the Debug Log file.
dc_debuglogout().....Send debug information to a debugging log file
dc_debugqout().......Send debug information to a debugging CRT window
dc_debugqoutappendblock()Send debug information to a debugging CRT window
dc_dec2hex().........Returns a hexidecimal number from a numeric value
dc_delete()..........Mark record(s) for deletion
dc_dir().............Display a directory of files or databases
dc_dispbegin().......Begin buffering screen output
dc_dispclear().......Clear the screen output buffers
dc_dispend().........End buffering screen output
dc_dispmem().........Display the contents of a memory file or current memory
dc_dlllist().........List all loaded dynamic .DLLs
dc_dllload().........Load a dynamic .DLL
dc_dllunload().......UnLoad a dynamic .DLL
dc_do()..............A handy method of creating a late-binding call to a function
dc_docase()..........Evaluate a list of expressions based on a CASE condition
dc_dot().............A Dot-Prompt Interpreter
dc_dotdoskey().......Set DC_Dot() command stack operation to Dos-Key emulation
dc_dothotkey().......Set the Dot-Prompt hot key
dc_dotsize().........Set the size of the Dot-Prompt command stack
dc_dowhile().........Evaluate a list of expressions based on a CASE condition
dc_drag()............Drag window coordinates and return a coordinate array
dc_editconfig()......Edit a source file
dc_editprg().........Edit a source file
dc_envirrest().......Restore the environment from an array or file
dc_envirsave().......Save the entire environment to an array or file
dc_eof().............Is the record pointer at the end of the file?
dc_erase()...........Delete a file
dc_errormsg()........Display an array of error messages in a window
dc_expl()............Explode a Text or GUI dialogue window
dc_explmode()........Enable/Disable exploding windows
dc_explode().........Explode a window
dc_fancybuttonmode().Enable or disable FANCY pushbuttons
dc_fielddel()........Delete a field group from the field group dictionary
dc_fieldedit().......Field Dictionary Editor
dc_fieldload().......Load a field Group Array from the Field Dictionary
dc_fieldpick().......Choose a field group or browse the field group dictionary
dc_fieldsave().......Save a Field Group Array to the Field Dictionary
dc_fieldvalidate()...Validate a value in a field during data entry
dc_fieldwblock().....A replacement for FieldWBlock() for debugging
dc_fieldwdebug().....Enable debug window for Get/Set field code blocks
dc_filearray().......Capture work area(s) to a file definition array
dc_filedel().........Delete a file group from the DCFILES.DBF dictionary
dc_fileedit()........A Database File / Work area Definition editor
dc_fileimp().........Import File Group(s) from the Import File Dictionary
dc_fileload()........Load a file group array from the file dictionary
dc_filepik().........Pick a file (work-area) group from the file dictionary
dc_filerest()........Restore work areas, indexes, relations, from dictionary
dc_filesave()........Save Work area definition array to dictionary
dc_filock()..........Lock the current file
dc_find()............GUI dialog for finding a record using an index
dc_findbrowse()......A browse-window find utility that uses AutoSeek
dc_findbrowsesort()..Set Sort Header options for DC_FindBrowse()
dc_fontcompoundname()Return the Font Compound name from a font object
dc_fontconfigure()...Configure a Font object from a Compound Name
dc_fornext().........Evaluate a list of expressions in a FOR..NEXT loop
dc_getactive().......Return the currently active GET object
dc_getactiveinfo()...Return the currently active GET object
dc_getanchorcb().....Create a codeblock to anchor local variables to the GetList
dc_getbitmap().......Create a bitmap object from any source
dc_getbrowarray()....Get or Store an array pointer from/to Array Browse
dc_getcargo()........Get and/or set the cargo of an object
dc_getcolarray().....Get Column array information from a DCBROWSE array browse
dc_getcombomode()....Set mouse mode for @..DCGET..COMBO
dc_getdestroy()......Destroy all objects in the Dialog Getlist
dc_getdevout().......A Replacement for DevPos()/DevOut() when writing @SAY..GETS
dc_getdisplay()......Display a GET on the screen if it falls in scroll region
dc_gethelpcode().....Return the Help Code of an object
dc_gethotkeylist()...Retrieve a list of hotkeys that have been set
dc_getlisttype().....Return the "define" name of a Get Object from it's type
dc_getlistvalidate().Validate all objects in GetList
dc_getobject().......Return a pointer to an object from an ID name
dc_getoptdefault()...Set the Default options for the GUI Reader
dc_getorigset()......Set the original values of the Dialog items in the Getlist
dc_getorigupdated()..Test the original values of the Dialog items in the Getlist
dc_getpopupcaption().Set the default caption for the POPUP pushbutton
dc_getpopupprotecthide()A Get-Set function for hiding protected POPUP buttons
dc_getprogress().....Update a Progress bar object
dc_getproperty().....Return the value of a Getlist property from an object
dc_getrefresh()......Refresh the display of all objects in the Get List
dc_getvalidate().....Run validation logic in the GetList
dc_getvalidblock()...A Get-Set function for posting a default validation block
dc_getwhen().........Refresh the WHEN/HIDE status of object(s) in the GetList
dc_getworkarea().....Get the actual working area of the Desktop
dc_gotoget().........Go directly to a desired GET
dc_gra2color().......Convert GUI compatible color to a color string
dc_graquerytextbox().Get the width and height of a text string based on a font
dc_gui().............Set the Dialogue mode to GUI or TEXT
dc_guiabrowse()......Browse a multi-dimensional array using Tree-View
dc_guiachoice()......A GUI replacement for ACHOICE()
dc_guialert()........A GUI replacement for ALERT()
dc_guialertcolor()...Preset the foreground/background color of DC_GuiAlert()
dc_guigrumpbrow()....An emulation of Greg Lief's GrumpBrow()
dc_guipopcalc()......A popup, full-function calculator
dc_helphandler().....Event handler for processing Help Requests
dc_helpoptions().....Set Options for Help Window
dc_hunt()............Hunt for a record by search all indexes
dc_icondefault().....Set Default Icon for Dialog Windows
dc_ifelse()..........Evaluate a list of expressions based on a condition
dc_impl()............Implode a dialogue window created by dc_expl()
dc_implode().........Implode a window created by dc_explode()
dc_indexfilt().......Return the Conditional Index Expression
dc_indexkey()........Return the current index key expression
dc_iniload().........Load an array from a *.INI (initialization) file
dc_iniread().........Read a parameter from a *.INI (initialization) file
dc_inisave().........Save an array to a *.INI (initialization) file
dc_iniwrite()........Write a parameter to a *.INI (initialization) file
dc_inkey()...........Moused replacement for INKEY()
dc_inkeydsp()........Display Inkey() and AppEvent() values for pressed keys
dc_inkeyeval().......Post a code block for evaluation by DC_INKEY()
dc_inkeyrelease()....Require mouse to be released or positioned in specified area
dc_inspectobject()...An Xbase Parts Object Inspector
dc_interpret().......Interpret a command string
dc_isanum()..........Is a character alphanumeric?
dc_isanychr()........Is any Character in A string also in B string
dc_isapprunning()....Test if an application is running
dc_isblank().........Test to determine if all the fields in a record are empty
dc_isdescend().......Is the current index a Descending index?
dc_ispath()..........Is a directory listed in an Environment string?
dc_isshared()........Is a work area opened in Shared mode?
dc_isstru()..........Verify the structure of a database
dc_isunique()........Is the current index a Unique index?
dc_jazzagekey()......A Get-Set function for posting the JazzAge Key
dc_keycount()........Return the number of "active" records
dc_keyno()...........Return the ordinal position of the current record
dc_keystat().........Enable or disable scoping
dc_keytran().........Translate AppEvent() keyboard value to Inkey() value
dc_langblock().......Post a code-block for language translator
dc_langmsg().........Translate a message by language
dc_langset().........Set the default language for eXPress++ messages
dc_lockmaint().......Maintain the "Lock" definition database
dc_log().............Write system status to a log file
dc_memoedit()........A Dual-Mode replacement for MemoEdit()
dc_menu_p()..........A nested, moused pull-down menu-system
dc_menu_to().........A moused replacement for MENU TO (__menuto())
dc_menuaccel().......Process a menu Accelerator key
dc_menuarray().......Create an array of mouse buttons for a single-line menu bar
dc_menubar().........Paint a menu bar with key characters highlighted
dc_menucompile().....Compile a Menu Array
dc_menuedit()........A Complex Pull-Down Menu Editor
dc_menuload()........Load a menu from the Menu Dictionary
dc_menulock()........Lock all Menu items
dc_menumain()........An "integrated" menu system with a bar and pull-downs
dc_menupick()........Pop up a Pick list of all menus in the Menu Dictionary
dc_menupull()........A nested, moused pull-down menu-system
dc_menurun().........Run a menu
dc_menuto()..........A Moused replacement for MENU TO
dc_mergeblocks().....Merge two code blocks for later evaluation
dc_mergegetlists()...Merge two GetLists into one
dc_modstru().........Modify the structure of a database
dc_moubutton().......Test the status of the mouse buttons
dc_mouclick()........Set the mouse button double-click delay
dc_moucol()..........Get current screen column of mouse cursor
dc_moudisable()......Disable the mouse functions
dc_mouenable().......Enable the mouse functions
dc_mougetevent().....Get a mouse event from the Mouse Click buffer
dc_mougetpos().......Get the current row and column of the mouse
dc_mouhide().........Hide the mouse cursor
dc_mouinitialize()...Initialize the mouse functions
dc_moupresent()......Is a mouse present?
dc_mourow()..........Get current screen row of mouse cursor
dc_mousebutton().....Paint a mouse button on the screen
dc_mousekey()........Scan array of mouse buttons and stuff keyboard or evaluate
dc_mousetpos().......Set the current row and column of the mouse
dc_moushow().........Show the mouse at it's current screen position
dc_moustart()........Enable automatic keyboard stuffing on a Mouse Click
dc_moustop().........Turn off the Mouse Event driver
dc_mouvisible()......Is the mouse cursor visible?
dc_moveobject()......Move or resize an Xbase Parts object with the mouse
dc_msgbox()..........Display an array of messages in a window
dc_msgboxgui().......Force DC_MsgBox() to always display a GUI dialog
dc_msgboxtitle().....Set the default title for DC_MsgBox()
dc_num2bin().........Converts a Decimal number to a Binary String
dc_num2word()........Convert an integer number to a 2-byte word
dc_numincr().........Increment a numeric value within a string
dc_objload().........Dynamically load an Xbase++ compiled .OBJ for execution
dc_objpublic().......List .OBJ(s) that contain public function
dc_objsource().......Get the source code name from an .OBJ file
dc_objsourcelist()...Display a list of .OBJ/.PRG files containing PUBLIC proc
dc_odblock().........Get a Progress indicator code block to pass to dbeval()
dc_odometer()........Display a progress indicator for database/index operations
dc_odpercent().......Set numeric value for progress indicator percentage of update
dc_openindex().......Open a set of index files
dc_pack()............Pack the current database
dc_parent()..........Get the Alias name of the Parent database
dc_parentval().......Get the Alias name of the Parent database
dc_path()............Return the path or file name from a file specification string
dc_pathfound().......Return the directory name in which a file is found
dc_pause()...........Pause program execution for a specified amount of time
dc_pickcase()........A function that replaces CASE..ENDCASE statements
dc_pointerarrow()....Set the mouse pointer to an arrow
dc_pointerwait().....Set the mouse pointer to an hourglass
dc_popcalc().........A popup, full-function calculator
dc_popcolor()........A pop-up dialog for selecting Colors
dc_popdate().........A pop-up calendar for selecting a date
dc_popdatestart()....Select Monday or Sunday as start of week
dc_popdir()..........A dialog for choosing a directory
dc_popfile().........A dialog for choosing a file
dc_popfont().........A pop-up dialog for selecting a Font name
dc_poppresalign()....A popup dialog for selection Presentation Alignment
dc_poppresborder()...A popup dialog for selection Presentation Border
dc_poppreslayout()...A popup dialog for selection Presentation Layout
dc_poppressep()......A popup dialog for selection Presentation Separator
dc_popscrn().........Restore a screen area from the screen stack
dc_presadd().........Add Presentation Parameters to a PP Array
dc_presedit()........A GUI Editor for a Presentation Parameters Array
dc_printclipboard()..Print the contents of the ClipBoard (BitMap Only)
dc_printercol()......Returns the current Printer Column position
dc_printerdialog()...A Printer Dialog for setting up printing options
dc_printerobject()...Return a reference to the static printer object
dc_printeroff()......Destroy a printer object
dc_printerok().......Test whether or not the user aborted the Print process
dc_printeron().......Create a printer class object for @..SAY style printing
dc_printerrow()......Returns the current Printer Row position
dc_printfile().......Print an ASCII file using Windows Print Driver
dc_printpreviewacrobat()A print previewer that uses the Acrobat Reader
dc_printpreviewacrobatopt()Sets the options for the Acrobat previewer
dc_progload()........Load a Program from the Program Dictionary to an Array
dc_progmaint().......Maintain the DCPROG.DBF Program Dictionary File
dc_program().........Run a Program from the Program Dictionary
dc_progress()........Display a Progress bar
dc_purge()...........Purge duplicate records from a database
dc_putkey()..........Stuff any keyboard value into Keyboard Buffer
dc_qout()............Send data to the default CRT window
dc_qoutwindow()......Establish or Create a CRT window for debugging GUI apps
dc_random()..........Return a random number between 0 and 255
dc_rddsel()..........Select a database driver
dc_readalt().........Establish alternate usage of Ctrl-END in table of Gets
dc_readapick().......Pops up array pick-list if GET not valid or double-clicked
dc_readbox().........Create a modal dialog box and Mouse Buttons for DC_ReadModal()
dc_readcapfirst()....Capitalize all first letters of all words in all GETs
dc_readclick().......Evaluate code-block if mouse is double-clicked in a GET
dc_readcolor().......A function for validating color strings in a GET
dc_readcua().........Set CUA-Compliance for Navigating Gets
dc_readcut().........Establish the keys to use for cutting and pasting Gets
dc_readdpick().......Pops up database or array pick-list in a GET
dc_readempty().......Validate that a GET is not empty or display message
dc_reader()..........A Replacement for GetReader() that works with mouse
dc_readgets()........Process the Getlist array with the Text or GUI reader
dc_readgui().........Process the Getlist array with the GUI reader
dc_readguidebug()....Enable/Disable DEBUG mode in the GUI reader
dc_readguieval().....Post a code block for later evaluating in DC_ReadGui()
dc_readguievent()....Create an event to control the GUI reader
dc_readguieventloop()Start up an event loop that is compatible with GetList
dc_readguihandler()..Post a "default" event handler for DC_ReadGui()
dc_readguilastkey()..Process the Getlist array with the GUI reader
dc_readguimenuaccess()Assign a set of keys to open menu or tree locks
dc_readguitypeahead()Enable Keyboard typeahead buffer in GUI dialogs
dc_readhelp()........Post a code-block for F1 help when using DC_ReadGets()
dc_readhtml()........Read the DIALOG GetList with the HTML reader
dc_readincr()........A "VALID" function for incrementing a GET value with the mous
dc_readkill()........Return, and/or set, whether current READ should be exited
dc_readmodal().......A moused and robust replacement for ReadModal()
dc_readmodalsize()...Set the size of the static array for DC_ReadModal()
dc_readnav().........Enable an alternative navigation method for GETS
dc_readvar().........Update a check box or Radio Button GET
dc_readwindow()......Establish scroll-region for DC_ReadModal() GETS
dc_recall()..........Recall record(s) that were previously marked for deletion
dc_reclock().........Lock the current record
dc_rectag()..........Build or add to a Record Tag Array
dc_rectagclear().....Clear the Record Tag Array
dc_regquery()........Read a parameter from the Windows Registry
dc_regwrite()........Write a parameter to the Windows Registry
dc_replace().........Assign new values to field variables using GUI dialog
dc_restset().........Restore all SETs from an array
dc_reuseexclusive()..Re-Use a database Exclusive
dc_saveset().........Save all SETs to an array
dc_say().............Perform @..SAYs relative to coordinates in dc_expl() window
dc_saycenter().......Write a string in the center of an area of the screen
dc_scopeexpress......Use eXPress++ scoping system in lieu of Xbase++
dc_scrldata()........Display a database vertical scroll bar
dc_scrldmou()........Return a record pointer from database scroll-bar mouse-click
dc_scrldthumb()......Enable display of database vertical scroll bar thumb
dc_scrlhbar()........Display a horizontal scroll bar
dc_scrlhmou()........Return an array pointer from horizontal scroll-bar mouse-click
dc_scrlvbar()........Display a vertical scroll bar
dc_scrlvmou()........Return an array pointer from vertical scroll-bar mouse-click
dc_scrn2clipboard()..Capture current dialog screen to the ClipBoard
dc_search()..........Search all fields in a set of databases for a value
dc_setappfocus().....Set Focus to a specified object
dc_setdclip()........Set the directory to use for dCLIP data-dictionary files
dc_setdefault()......Set the DEFAULT directory the right way
dc_setedit().........Pop up an editing screen for all SET environment variables
dc_setkeyactive()....Force DCREAD GUI dialogs to evaluate SET KEY code blocks
dc_setpointertree()..Set the mouse pointer on all objects in a tree
dc_setpopkey().......Set or the return the value of the POPUP hot key
dc_setproperty().....Set the property of a Getlist item associated with an object
dc_setrelation().....Set a relation with a child scope
dc_setrest().........Restore the SET environment from a file
dc_setsave().........Save the SET environment to a file
dc_setscope()........Set a scoping value for the current work area
dc_status()..........Display System status window
dc_str2ar()..........Convert a string to a multidimensional array
dc_struupdate()......Modify the structure of a database
dc_strwrap().........Convert a string to a text array and specify line length
dc_sum().............Sum numeric fields in selected database
dc_tabactivate().....Activate a Tab Page
dc_tagallcreate()....Create index tags for all fields in a database
dc_tagdelete().......Delete a tag from a combined index
dc_tbinkey().........A special version of INKEY() for adding mouse to Tbrowse system
dc_testbof().........Test if record pointer is at top of file
dc_testeof().........Test if record pointer is at bottom of file
dc_token()...........Extract a token from a string
dc_tokenarray()......Parse all tokens in a string to an Array
dc_tokenjustify()....Perform text-justfication of tokens in a string
dc_tokennum()........Determine the number of tokens in a string
dc_translate().......Translate a command line to an array of Functions
dc_txtclose()........Close text file
dc_txtcount()........Return the number of lines in an open text file
dc_txteof()..........Is file pointer at end of text file?
dc_txtfind().........Fast text search for a string within a text file
dc_txtgoto().........Goto a specified line in a text file
dc_txtline().........Read the current line of a text file
dc_txtlno()..........Report the current line pointer of an open text file
dc_txtopen().........Open a text file for use with Text file functions
dc_txtsize().........Return the size in bytes of an open text file
dc_txtskip().........Skip a specified number of lines in a text file
dc_txtword().........Return value of a word in a String by specifying position
dc_updated().........Determine whether a GET changed during a READ
dc_usearea().........Open a database file in a work area
dc_usedbfprotect()...A Get/Set function for establishing data protection mode
dc_useraccess()......Determine if Logged-On user has access to a lock
dc_userfree()........Free the lock on the the User file to allow user access
dc_userinfo()........Get or Set information about Logged-On User
dc_userlock()........Lock or attempt to lock all users out of the system
dc_userlogin().......Login to application to establish user rights
dc_usermaint().......Maintain the DCUSERS.DBF User Database
dc_userset().........stablish the Logged-On user from the User Database
dc_util()............A menu of database utilities
dc_validateblock()...Validate a code block string
dc_valtype().........Validate input parameters and set default values
dc_varfromlistbox()..Store List box choices into memory variable array
dc_vartolistbox()....Store memory variable array into ListBox
dc_versionexpress()..Returns the current eXPress++ version
dc_virtcapt()........Capture the current record to a Virtual record array
dc_virtrepl()........Replace the current record contents with Virtual record arra
dc_virtrest()........Restore the virtual record contents to an array
dc_virtsave()........Save the current record to the virtual record file
dc_wait()............3 Dual-Mode replacement for the WAIT command
dc_waiton()..........A Dual-Mode dialog for "Work in Progress"
dc_webserverdomainname()Set the Web Server domain name for web applications
dc_wildcardmatch()...Test if a string matches a wildcard
dc_winalert()........Popup a GUI alert box
dc_winmenudestroymode()A Get-Set function for setting AUTOWINMENU destroy mode
dc_word2num()........Convert a 2-byte word to an integer number
dc_working().........Display a "Working in Progress" bar
dc_xbptohtmlcolor()..Convert XBP colors to HTML colors
dc_xcarray().........Return an Array Template for X2CLIP interface
dc_xccall()..........Send a message to X2CLIP to perform an operation
dc_xcclose().........Close an X2CLIP session
dc_xcopen()..........Open an X2CLIP session for database operations
dc_xcreturn()........Return data from the X2CLIP program
dc_xcupdate()........Update pointers in the X2CLIP program
dc_xorbits().........A logical EXCLUSIVE OR of two numbers
dc_xpftoarray()......Load the contents of an .XPF memory file to an array
dc_xtoc()............Converts any variable type to a String
dc_zap().............Zap the database
OVERVIEW_DUAL_FUNC
Dual-Mode Functions
Description:
DUAL-Mode functions 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.).
Functions in the DCLIPX.DLL dynamic-link library all start
with the prefix DC_. The DCLIPX.DLL file is one of the
libraries that are included with the dCLIP++ Application
Development System, and your eXPress++ system is fully
compatible with dCLIP++ in the event that at some time you
wish to upgrade and utilize the dCLIP++ design tools.
OVERVIEW_GENERAL
General Functions
Description:
General functions are those which have been designed to work
identically in either TEXT mode or GUI mode. These functions
do not create any output to the screen in either mode,
therefore they can be used freely without regard to the
screen mode, DC_GUI().
Functions in the DCLIPX.DLL dynamic-link library all start
with the prefix DC_. The DCLIPX.DLL file is one of the
libraries that are included with the dCLIP++ Application
Development System, and your eXPress++ system is fully
compatible with dCLIP++ in the event that at some time you
wish to upgrade and utilize the dCLIP++ design tools.
OVERVIEW_GUI_FUNC
GUI Functions/Classes
Description:
GUI functions are designed to work only in GUI mode. When any of
these functions are used they ignore the setting of the DC_Gui()
flag.
OVERVIEW_TEXT_FUNC
Text Mode Functions/Classes
Description:
Text-Mode functions are designed to work only in TEXT mode.
When any of these functions are used they ignore the setting of
the DC_Gui() flag and require that the SetAppWindow() be a CRT
window (XbpCrt Class).
dc_abigelem()
Return element of longest string in an array
Syntax:
DC_ABigElem ( < aArray >, ;
[@< nLength >] ) - > nElement
Arguments:
< aArray > is the name of any single-dimensional array that is
fill with character strings.
@< nLength > is the name of a variable to place the length
of the item returned.
Returns:
A number equivalent to the element of the array with the
longest string.
Description:
DC_ABIGELEM() will return the element number of the longest
string in a single-dimensional array.
Examples:
. nLength := 0
. aTest := { 'abc','abcdef','abcde','abcd' }
. ? DC_ABIGELEM( aTest, @nLength )
2
. ? nLength
6
Source/Library:
_DCARRAY.PRG, DCLIP1.DLL
dc_achoice()
A Dual-Mode replacement for ACHOICE()
Syntax:
DC_AChoice ( < nTop >, < nLeft >, < nBottom >, < nRight >, ;
< aMenuItems >, ;
[< aSelItems >], ;
[< cUserFunc > | < bUserFunc >], ;
[< nInitialItem >], ;
[< nWindowRow >], ;
[< aButtons >], ;
[< aOptions >], ;
[< aHelpCodes >], ;
[< aMenu >], ;
[< lAttachMenu >] ) - > nPosition
Arguments:
< nTop >, < nLeft >, < nBottom >, < nRight > are the screen
coordinates.
< aMenuItems > is an array of character strings to include
in the pick-list.
< aSelItems > is an array of logical values. There is one
element in this optional array for each element in
< aMenuItems >. Each element in < aSelItems > that is a
.TRUE. will make the item in the window a "selectable"
item, otherwise it will be a non-selectable item and will
be displayed in "grayed" form.
< cUserFunc > | < bUserFunc > is the name of an optional User-Defined
function to call on exception keystrokes. See the Clipper
documentation of ACHOICE() for more information on how to use
a UDF. If the parameter is passed as a character string then
the function must be a PUBLIC, not STATIC function.
< nInitialItem > is the item to high-light in the window on
startup.
< nWindowRow > is the item to display as the first item in
the pick-list.
< aButtons > is an array of mouse-keys that conforms to the
specification for DC_MOUSEKEY(). See DC_MOUSEKEY() for
more information.
< aOptions > is a multi-dimensional array of the following
options:
Element Type Description
------- ---- ----------------------------------------------
[1] L If .TRUE. will display a scrollbar and box
around the menu items.
[2] A A sub-array of colors to use if element [1] is
.FALSE. If passed as a NIL then the Clipper
default colors will be used.
Element Type Description
------- ---- ----------------------------
[1] C Menu items color
[2] C Select bar color
[3] C Frame/scrollbar color
[4] C Spare
[5] C Unselectable items color
[3] C Title on top of box. Default is none.
[4] L If .TRUE. then the operator will be allowed to
drag the box with the mouse. Default is .FALSE.
[5] L If .TRUE. then the display will be restored
upon exit, otherwise it will remain.
[6] L If .TRUE. then the frame, scroll-bar and title
will be painted, otherwise only the items will
be painted.
[7] L If .TRUE. then after painting the scroll-bar,
items and frame, DC_ACHOICE() will exit without
waiting for a key or mouse-click.
< aHelpCodes > is an array of character string HELP CODES.
There is one element in this optional array for each element in
< aMenuItems >. The HELP CODE will be passed on to the
DC_HelpF1() function for context-specific help if the operator
presses F1 on a selected item.
< aMenu > is an array defining a Top-Bar/Pull-Down menu. This
array must conform to the specification for the array passed
to the DC_MENUMAIN() function. This Top-Bar menu will be
painted at the screen coordinates defined in the menu if
< lAttachMenu > is .FALSE. or directly attached to the top of
the pick-list window if < lAttachMenu > is .FALSE. (default).
The menu will be energized if the operator presses a key
matching one of the hightlighted characters in the menu, or
if the mouse is clicked on one of the top-bar menu items.
The menu array must contain code-blocks for each menu item
to execute functions based on the menu selection. See
DC_MENUMAIN() for more information.
Description:
DC_ACHOICE() is a Dual-mode replacement for AChoice(). When
the GUI flag is ON, DC_ACHOICE() functions similiar to
AChoice() except that it is displayed in GUI mode. When the
GUI flag is OFF, DC_ACHOICE() functions identical to ACHOICE()
except it is also activated by a mouse. The left button of the
mouse is used to select the item in the window. The right button
or double-clicking works identical to the ENTER key.
In TEXT mode, Hot keys can be activated by passing an array of
screen coordinates (mouse-buttons) and key definitions.
In TEXT mode, an options array is used to define scroll-bars,
colors, exit options, title, drag options, etc.
An optional array of Help-Codes may be passed for context-
specific help on any selected item with the F1 key.
Examples:
local nChoice
local aButtons := { { 17,13,17,18,'C'},;
{ 18,13,18,18,'D'},;
{ 19,13,19,18,'M'} }
local aDir := directory()
set key asc('C') to myfunc
set key asc('D') to myfunc
set key asc('M') to myfunc
cls
@5,10 to 20,30
@16,11 to 16,29
@17,13 say 'Copy'
@18,13 say 'Delete'
@19,13 say 'Move'
aDir := dc_aconvert( aDir )
nChoice := DC_ACHOICE( 6,11,15,29,aDir[1],,,,,aButtons )
set key asc('C') to
set key asc('D') to
set key asc('M') to
return
function myfunc
@ 22,10 say ''
do case
case lastkey() = asc('C')
?? 'C button pressed'
case lastkey() = asc('D')
?? 'D button pressed'
case lastkey() = asc('M')
?? 'M button pressed'
endcase
return nil
Source/Library:
_DCACHOI.PRG/.OBJ, DCLIPX.LIB
See Also:
dc_dbchoice()
dc_readapick()
dc_apick()
dc_acompare()
Compare two arrays
Syntax:
DC_ACompare ( < aArray1 >, ;
< aArray2 > ) - > lStatus
Arguments:
< aArray1 > and < aArray2 > are the arrays to compare.
Returns:
A logical .TRUE. if the arrays are identical, .FALSE. otherwise.
Description:
DC_ACOMPARE() is used to test the contents of two arrays to
determine if they are identical.
Examples:
PROCEDURE Xtest()
LOCAL aArray1, aArray2, aArray3
aArray1 := { 1,2,3 }
aArray2 := { '1',2,3, }
aArray3 := { 1,2,3 }
DC_Gui(.t.)
DC_MsgBox( { 'Is aArray1 equal to aArray2?', ;
'',;
DC_ACOMPARE(aArray1,aArray2) } )
DC_MsgBox( { 'Is aArray1 equal to aArray3?', ;
'',;
DC_ACOMPARE(aArray1,aArray3) } )
RETURN
Source/Library:
_DCARRAY.PRG/.OBJ, DCLIPX.LIB
dc_aconvert()
Convert a Ragged array to a Parallel array and vice-versa
Syntax:
DC_AConvert ( < aInput > ) - > aOutput
Arguments:
< aInput > is a Parallel Symmetrical array or Ragged Symmetrical
array.
Example of a "Parallel Symmetrical array":
Type Contents
aStru[1] A
aStru[1,1] C CUST_NAME
aStru[1,2] C SHIP_DATE
aStru[1,3] C BALANCE
aStru[1,4] C PRINT_FLAG
aStru[2] A
aStru[2,1] C C
aStru[2,2] C D
aStru[2,3] C N
aStru[2,4] C L
aStru[3] A
aStru[3,1] C 25
aStru[3,2] C 8
aStru[3,3] C 9
aStru[3,4] C 1
aStru[4] A
aStru[4,1] N 0
aStru[4,2] N 0
aStru[4,3] N 2
aStru[4,4] N 0
Example of a "Ragged Symmetrical array":
Type Contents
aStru[1] A
aStru[1,1] C CUST_NAME
aStru[1,2] C C
aStru[1,3] C 25
aStru[1,4] N 0
aStru[2] A
aStru[2,1] C SHIP_DATE
aStru[2,2] C D
aStru[2,3] C 8
aStru[2,4] N 0
aStru[3] A
aStru[3,1] C BALANCE
aStru[3,2] C N
aStru[3,3] C 9
aStru[3,4] N 2
aStru[4] A
aStru[4,1] C PRINT_FLAG
aStru[4,2] C L
aStru[4,3] C 1
aStru[4, ] N 0
Returns:
An array whose elements contain the same information as the
input array but are in "inverted" order.
Description:
DC_ACONVERT() is used to changed the format of a symmetrical
array from "Ragged" to "Parallel" or vice-versa. This function
is handy when information in an array may not be stored in a
required format. For example, it is not easy to perform
"pick-list" operations from "Ragged" arrays or to AEVAL()
"Parallel" arrays.
Examples:
PROCEDURE XTest()
LOCAL aRaggedDir, aParallelDir, nChoice
// Converting a Ragged array to a Parallel array
aRaggedDir := Directory()
aParallelDir := DC_ACONVERT( aRaggedDir )
DC_Gui(.t.)
nChoice := DC_Achoice( 10,10,20,40, aParallelDir[1] )
DC_MsgBox( 'The size of ' + aParallelDir[1,nChoice] + ' is ' + ;
Str( aParallelDir[2,nChoice] ) )
RETURN
Source/Library:
_DCARRAY.PRG/.OBJ, DCLIPX.LIB
See Also:
dc_areverse()
dc_addcargo()
Add cargo to the GetList
Syntax:
DC_AddCargo ( < GetList >, ;
< xCargo > ) - > GetList
Arguments:
< GetList > is the GetList array.
< xCargo > can be one of several numeric values or an array.
xCargo Description
------ ----------------------------------------
101 Force this GET to validate
102 Display Pick-list pointer icon (arrow)
{103,bBlock} Pre-Evaluate Code-Block
{104,bBlock} Post-Evaluate Code-Block
{105,aMsg} Message to display on screen
106 Protect this GET from editing
107 Capitalize first character of each word
{108,aData} SAY prompt and coordinates
Returns:
A pointer to the <þGetListþ> passed to DC_ADDCARGO().
Description:
DC_ADDCARGO() is used to add cargo to the an array that
is contained in the CARGO instance variable of the last
GET in a GetList array.
DC_READMODAL() automatically looks at the information in
CARGO to give added functionality to the GET system.
CARGO is used to store array pointers, screen SAY
information and other GET options.
Examples:
#include "dcget.ch"
LOCAL GetList := {}, aData, i
use
aData := Array(Fcount())
FOR i := 1 TO LEN( aData )
aData[i] := FieldGet(i)
NEXT
DC_ReadWindow( { 10, 10, 20, 60 } )
FOR i := 1 TO LEN(aData)
DC_GetDevOut( i, 12, PadL(Field(i),10), )
SetPos( Row(), Col()+1 )
AAdd( GetList,_GET_(aData[i],"aData[i]",,,) )
DC_GetDisplay( GetList )
/* -- Add array element pointer -- */
GetList := DC_ADDCARGO(GetList,-1*i)
/* -- Add SAY Prompt and location -- */
GetList := ;
DC_ADDCARGO(GetList,{ 108, { i, 12, PadL(Field(i),10) }})
/* -- Add CAPFIRST flag -- */
GetList := DC_ADDCARGO(GetList,107)
NEXT
DC_ReadModal( GetList,,aReadArea )
RETURN nil
Source/Library:
_DCGETSY.PRG/.OBJ, DCLIPX.LIB
See Also:
dc_readmodal()
dc_readbox()
dc_addrec()
Append a new record and lock the record
Syntax:
DC_AddRec ( [< nWaitTime >], ;
[< lDisplayError >], ;
[< nAppendMode >] ) - > lStatus
Arguments:
< nWaitTime > is the number of seconds to wait for the system to
return a lock before returning the status or the error message.
(0 = wait forever).
< lDisplayError > if .true. will display an operator error
message if the record cannot be locked. (default) or if .false.
will not display an error message to the operator.
< nAppendMode > is a number from 0 to 2 (0 is the default) to
establish the mode for reusing deleted or blank records, if
they exist, or appending a new record. See DC_APPENDMODE().
Returns:
A logical .TRUE. if the record is successfully locked.
Description:
The function of DC_ADDREC() is dependent on the APPEND MODE of
operation that was previously selected by the DC_APPENDMODE()
function.
If the Append Mode is 0 (default), then DC_ADDREC() will always
append a Blank record.
If the Append Mode is 1, then DC_ADDREC() will first try to
locate any existing Blank record in the database. If a Blank
record is found, the record pointer will be set to the found
record and the record will be locked. This mode functions
differently based on whether or not the current work area
has an index selected. If an index is selected, then it is
assumed that blank records will always appear at the TOP of
the database so only the first record is tested, otherwise
the entire database will be search for a blank record.
If the Append Mode is 2, then DC_ADDREC() will first try to
locate any existing record that is marked for deletion. If
a deleted record is found, the record pointer will be set
to the found record, the record will be recalled (undeleted),
all fields will be blanked, and the record will be locked.
Examples:
dc_appendmode(1) // reuse blank records
use sales
if DC_ADDREC()
replace date with date()
else
break
endif
Source/Library:
_DCLOCK.PRG, DCLIP1.DLL
See Also:
dc_reclock()
dc_filock()
dc_appendmode()
APPEND
LOCK
UNLOCK
dc_addsetkeys()
Convert all SET KEYS to DCHOTKEY commands
Syntax:
DC_AddSetKeys( < aGetList > ) - > aGetList
Arguments:
< aGetList > is the GetList array that will be passed to DC_ReadGUI().
Returns:
A GetList array with all hotkeys added.
Description:
DC_ADDSETKEYS is used to read the current SET KEYS and add them
to the GetList as DCHOTKEY commands.
Examples:
FUNCTION XTest()
LOCAL GetList := {}, dDate := Date(), nNumber := 0
SET KEY -2 TO DC_PopDate()
SET KEY -3 TO DC_PopCalc()
@ 1,1 DCSAY ' Enter a Date' GET dDate
@ 3,1 DCSAY 'Enter a Number' Get nNumber
@ 5,1 DCSAY 'Press F3 for a Calendar' SAYSIZE 30
@ 6,1 DCSAY 'Press F4 for a Calculator' SAYSIZE 30
DC_ADDSETKEYS(GetList)
DCREAD GUI FIT ADDBUTTONS
RETURN nil
Source/Library:
_DCFUNCT.PRG/.OBJ, DCLIPX.LIB
See Also:
dc_readgui()
DCHOTKEY
dc_alert()
A Dual-Mode replacement for Clipper's ALERT() function
Syntax:
DC_Alert ( < cText >, ;
< aMenuItems >, ;
[< cColorString >], ;
[< lJustify >], ;
[< aMenuId >], ;
[< cMenuName >], ;
[< nChoice >], ;
[< aFonts >] ) - > nChoice
Arguments:
< cText > is the message to place in the alert box. Use
semicolons in the text to separate lines of text.
< aMenuItems > is an array of menu choices. The character
following the '~' character will be highlighted.
< cColorString > is an optional color string containing
exactly 4 colors separated by commas:
(1) box and message.
(2) unselected menu items.
(3) hot-key character of each unselected menu item
(4) selected menu item
< lJustify > if .TRUE. will left-justify the message items.
Default is .FALSE.
< aMenuId > - An optional array of unique Menu ID codes (up to 8
characters) for each menu item in < aItems >. This array is
needed to enable the PERSISTENT MENU SELECTION feature. See
DC_MenuPull() for more information.
< cMenuName > - An optional parameter with a "unique" name for
this menu. This name is needed to enable the PERSISTENT MENU
SELECTION feature. See DC_MenuPull() for more information.
< nChoice > is the default menu selection.
< aFonts > is a 2-element array containing the Font Compound Name
for the buttons and the text. Element 1 is the button font and
element 2 is the text font. This parameter is used in GUI mode
only.
Returns:
A number equal to the menu choice. Returns 0 if user
presses ESCape.
Description:
DC_ALERT() is a Dual-mode replacement for Alert(). When
the GUI flag is ON, DC_ALERT() functions similiar to
Alert() except that it is displayed in GUI mode. When the
GUI flag is OFF, DC_ALERT() functions identical to Alert()
except it is also activated by a mouse. The left button of the
mouse is used to select the item in the window.
Notes:
The foreground and background color of the GUI alert box is
preset by the function DC_AlertColor().
Examples:
PROCEDURE XTest()
LOCAL nChoice
DC_Gui(.t.)
nChoice := DC_ALERT( "The printer is not ready",;
{ 'Retry','Abort','Output to a file' } )
DC_MsgBox( 'You chose ' + Str(nChoice) )
RETURN
Source/Library:
_DCMENU2.PRG/.OBJ, DCLIPX.LIB
See Also:
dc_msgbox()
dc_guialert()
dc_andbits()
A logical AND of two bytes
Syntax:
DC_AndBits( < nNum1 >, ;
< nNum2 > ) - >nResult
Arguments:
< nNum1 > and < nNum2 > are numeric values from 0 to 255.
Returns:
A numeric value from 0 - 255
Description:
DC_ANDBITS() will produce the result of logically ANDing two bytes.
Source/Library:
_DCAND.PRG/.OBJ, DCLIPX.LIB
See Also:
dc_bittest()
dc_xorbits()
dc_apick()
A dialogue for choosing a item from an array pick list.
Syntax:
DC_APick ( [< nTop >], [< nLeft >], < nWidth >, < nHeight >, ;
< aMenuItems >, ;
[< acHeader >], ;
[< anWidth >], ;
[< cTitle >], ;
[< anTag >], ;
[< aTagColor >], ;
[< bHandler >], ;
[< nStart >], ;
[< cFontName >], ;
[< oParent >], ;
[< oOwner >], ;
[< lCenter >], ;
[< lMenu >], ;
[< lNoVScroll >], ;
[< lNoHScroll >], ;
[< aPres >] ) - > nChoice
Arguments:
< nTop >, < nLeft > are the starting coordinates. These are text-
base coordinates. These parameters are not required if the
< lCenter > parameter is used.
< nWidth > and < nHeight > are the width and height of the window
in text-based coordinates.
< 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.
< 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.
< anWidth > 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.
< cTitle > is the title to place at the top of the window.
< 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.
< 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 }.
< bHandler > is a SPARE.
< nStart > is the starting element in the browse.
< cFontName > is the font to use for the browse.
< oParent > is the parent object to create the browse. If no
parameter is passed, a dialog window will be created.
< oOwner > is the owner object of the browse. If no parameter is
passed, the owner will be the same as the parent.
< lCenter > if .TRUE. will center the browse dialog on the desktop.
< lMenu > if .TRUE. 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.
< lNoVScroll > if .TRUE. will suppress the vertical scroll bar.
The default is .FALSE.
< lNoHScroll > if .TRUE. will suppress the horizontal scroll bar.
The default is .FALSE.
< aPres > is an array of presentation parameters that must conform
to the presParam specifications for the XbpBrowse() class.
Returns:
A Numeric Value equivalent to the selected row.
Description:
DC_APick() 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 }
nChoice := DC_APick ( , , 50, 10, aDir, ;
aHeaders, aWidths, 'Disk Directory', 5, ;
{ GRA_CLR_WHITE, GRA_CLR_RED }, ;
nil, nil, '8.Terminal', nil, nil, .t. )
RETURN nChoice
Source/Library:
_DCACHOI.PRG/.OBJ, DCLIPX.LIB
See Also:
DCAPICK
dc_achoice()
dc_appendmode()
Set the default mode of operation for DC_AddRec()
Syntax:
DC_AppendMode ( < nMode > ) - > nOldMode
Arguments:
< nMode > is a number designating the desired append mode.
If the Append Mode is 0 (default), then DC_ADDREC() will always
append a Blank record.
If the Append Mode is 1, then DC_ADDREC() will first try to
locate any existing Blank record in the database. If a Blank
record is found, the record pointer will be set to the found
record and the record will be locked. This mode functions
differently based on whether or not the current work area
has an index selected. If an index is selected, then it is
assumed that blank records will always appear at the TOP of
the database so only the first record is tested, otherwise
the entire database will be search for a blank record.
If the Append Mode is 2, then DC_ADDREC() will first try to
locate any existing record that is marked for deletion. If
a deleted record is found, the record pointer will be set
to the found record, the record will be recalled (undeleted),
all fields will be blanked, and the record will be locked.
Returns:
A numeric value representing the current append mode.
Description:
DC_APPENDMODE() is used to establish the default operation of
the DC_ADDREC() function. Depending on the mode selected
DC_ADDREC() will attempt to reuse blank records or deleted
before appending a new, blank record.
Examples:
use sales
set index to month
DC_APPENDMODE(1) // re-use blank records
if dc_addrec()
replace date with date()
else
break
endif
Source/Library:
_DCLOCK.PRG, DCLIP1.DLL
See Also:
dc_addrec()
dc_appevent()
Post an Event Loop
Syntax:
DC_AppEvent( @< lOk >, ;
< nExitEvent >, ;
< nDelay > ) - > nLastEvent
Arguments:
@< lOk > is an optional logical value (passed by reference).
DC_AppEvent() will exit and return when this value is set to
.FALSE.
< nExitEvent > is an optional numeric value. DC_AppEvent() will
exit and return when the next event in the event queue is
equal to this value. < nExitEvent > defaults to 0, meaning that
the loop will exit when no more events are in the event queue.
< nDelay > is the amount of delay to use when DC_AppEvent() calls
the AppEvent() function. This defaults to 0, meaning that
event loop will not exit until an event occurs. If < nDelay >
is any value greater than 0, then this is amount of delay before
the AppEvent() function exits. < nDelay > should usually be set
to a value of .01 when using DC_AppEvent() to process events
while still processing other code. See the example.
Returns:
A numeric value equal to the last event processed in the loop.
Description:
DC_APPEVENT() is a handy function that creates an event loop for
processing events. Unlike the Xbase++ AppEvent() function,
DC_APPEVENT() contains a DO..WHILE loop that processes events as
a single function call.
Examples:
/*
This example uses DC_APPEVENT() to abort a COPY TO process.
*/
#include 'dcdialog.ch'
FUNCTION XTest()
LOCAL Getlist := {}, oProgress, oDialog, lOk := .t., oButton, ;
nEvent, mp1, mp2, oXbp
USE COLLECT VIA DBFNTX NEW SHARED
@ 2,5 DCSAY 'Exporting Data to JUNK.DBF'
@ 4,5 DCPROGRESS oProgress ;
SIZE 55,1.5 ;
MAXCOUNT RecCount() COLOR GRA_CLR_BLUE
@ 4,65 DCPUSHBUTTON CAPTION '&Cancel' ;
ACTION {||lOk:=.f.} OBJECT oButton ;
SIZE 8,1.5
DCREAD GUI TITLE 'My Test Dialog' ;
PARENT @oDialog ;
FIT ;
EXIT
oDialog:show()
COPY TO junk WHILE _Progress( oProgress, @lOk )
oButton:SetCaption('&Ok')
DC_APPEVENT( @lOk )
oDialog:Destroy()
CLOSE ALL
RETURN nil
/* ----------------- */
STATIC FUNCTION _Progress ( oProgress, lOk )
DC_GetProgress( oProgress, COLLECT->(RecNo()) )
DC_Pause(.3)
DC_APPEVENT( @lOk, 0, .01 )
RETURN lOk
Source/Library:
_DCGETBX.PRG/.OBJ, DCLIPX.LIB
dc_appeventdefine()
Translate AppEvent() value to DEFINE value
Syntax:
DC_AppEventDefine( < nEvent > ) - > cDefinition
Arguments:
< nEvent > is the AppEvent() to translate.
Returns:
A Character string.
Description:
DC_APPEVENTDEFINE() returns a character string that contains
the DEFINITION name for the AppEvent() value. These defines are
contained in APPEVENT.CH.
This is a handy debugging function that can be used in event
loops to display events as they are occurring like so:
DO WHILE nEvent # xbeP_None
nEvent := AppEvent( @mp1, @mp2, @oXbp )
? DC_APPEVENTDEFINE( nEvent )
oXbp:HandleEvent( nEvent, mp1, mp2 )
ENDDO
Examples:
#include 'appevent.ch'
PROCEDURE XTest()
DC_Gui(.t.)
DC_MsgBox( { DC_APPEVENTDEFINE( xbeP_Close ), ;
DC_APPEVENTDEFINE( xbeP_Resize ), ;
DC_APPEVENTDEFINE( xbeP_Activate ) } )
RETURN
Source/Library:
_DCPUTK.PRG/.OBJ, DCLIPX.LIB
See Also:
dc_keytran()
dc_appkeydefine()
dc_appkeydefine()
Translate AppEvent() keyboard value to DEFINE value
Syntax:
DC_AppKeyDefine( < nKey > ) - > cDefinition
Arguments:
< nKey > is the AppEvent() value of the key to translate.
Returns:
A Character string.
Description:
DC_APPKEYDEFINE() returns a character string that contains the
DEFINITION name for the AppEvent() a keyboard value. These
defines are contained in APPEVENT.CH.
This is a handy debugging function that can be used in event
loops to display events as they are occurring like so:
DO WHILE nEvent # xbeP_None
nEvent := AppEvent( @mp1, @mp2, @oXbp )
IF nEvent = xbeP_Keyboard
? DC_APPKEYDEFINE( mp1 )
ENDIF
oXbp:HandleEvent( nEvent, mp1, mp2 )
ENDDO
Examples:
#include 'appevent.ch'
PROCEDURE XTest()
DC_Gui(.t.)
DC_MsgBox( { DC_APPKEYDEFINE( xbeK_ALT_M ), ;
DC_APPKEYDEFINE( xbeK_ENTER ), ;
DC_APPKEYDEFINE( xbeK_INS ) } )
RETURN
Source/Library:
_DCPUTK.PRG/.OBJ, DCLIPX.LIB
See Also:
dc_keytran()
dc_appeventdefine()
dc_ar2str()
Convert a multidimensional array to a string
Syntax:
DC_Ar2Str ( < aArray > ) - > cString
Arguments:
< aArray > is any multidimenstional array.
Returns:
A character string.
Description:
DC_Ar2Str() will convert the contents of any multi-dimensional
array to a string for later restoring with DC_Str2Ar(). The
string may then be saved to a file or to a character or memo
type database field. This set of functions is an alternative
to using the Xbase++ functions Var2Bin() and Bin2Var() because
they will create a runtime error if the array contains code
blocks with non-persistent data.
If the array contains code blocks, the code blocks will be
saved and restored provide that they contain persistent data.
Any code block that contains non-persistent data will be
saved as a NIL.
If the array contains pointers to objects, they pointers will
be saved as a NIL.
Examples:
PROCEDURE XTest()
LOCAL aDir
aDir := Directory()
USE dirs
APPEND BLANK
REPL DIRS->array WITH DC_Ar2Str(aDir)
aDir := DC_Str2Ar(DIRS->array)
DC_ArrayView(aDir)
RETURN
Source/Library:
_DCASAVE.PRG/.OBJ, DCLIPX.LIB
See Also:
dc_str2ar()
dc_asave()
dc_arestore()
Restore a multidimensional array from a binary file
Syntax:
DC_ARestore ( < cFileName > ) - > aArray
Arguments:
< cFileName > is the name of the binary file that was previously
created with DC_ASAVE().
Returns:
A multidimensional array if the array file was a valid file,
otherwise returns a NIL.
Description:
DC_ARESTORE() will create an multidimensional array from the
contents of a binary file that was created with DC_ASAVE().
If the array contains code blocks, the code blocks will be
saved and restored provide that they contain persistent data.
Any code block that contains non-persistent data will be
restored as a NIL.
If the array contains pointers to objects, they pointers will
be restored as a NIL.
Examples:
PROCEDURE XTest()
LOCAL aDir1, aDir2
DC_Gui(.t.)
aDir1 := Directory()
dc_asave( aDir1, 'ADIR.ARX' )
aDir2 := DC_ARESTORE( 'ADIR.ARX' )
DC_Achoice( 5,10,20,30, DC_AConvert( aDir2 )[1] )
RETURN
Source/Library:
_DCASAVE.PRG/.OBJ, DCLIPX.LIB
See Also:
dc_asave()
RESTORE ARRAY
dc_areverse()
Reverse all elements in an array
Syntax:
DC_AReverse ( < aArray > ) - > aNewArray
Arguments:
< aArray > is the name of the array to reverse.
Returns:
An array of the same length as the original array.
Description:
DC_AREVERSE() is used to sort all the elements of an array
in reverse order from the original array.
Examples:
myArray := { 1, 2, 'test', .t. }
outArray := DC_AREVERSE( myArray )
// contents of outArray : { .t., 'test', 2, 1 }
Source/Library:
_DCARRAY.PRG, DCLIP1.DLL
See Also:
dc_aconvert()
dc_array_r()
Create a multi-dimensional array from an array text file
Syntax:
DC_Array_Read ( < cArrayFile > ) - > aArray
Arguments:
< cArrayFile > is the name of the array text file to read.
Returns:
A multi-dimensional array built from the contents of <þcArrayFileþ>.
Description:
DC_ARRAY_R() is used to create a multi-dimensional array
from the contents of an array text file. Only elements of the
type L (logical), N (numeric), C (character), D (date), A
(array) can be saved and restored.
Examples:
PROCEDURE XTest()
LOCAL aDir1, aDir2, cScrn
DC_Gui(.t.)
cScrn := DC_WaitOn()
aDir1 := directory()
dc_array_w( aDir1, "DIR.AR" )
aDir2 := DC_ARRAY_R( "DIR.AR" )
DC_Impl(cScrn)
DC_Achoice( 5,10,20,30, DC_AConvert( aDir2 )[1] )
RETURN
Source/Library:
_DCARRAY.PRG/.OBJ, DCLIPX.LIB
See Also:
RESTORE ARRAY
dc_array_w()
dc_array_w()
Write contents of a multi-dimensional array to file
Syntax:
DC_Array_Write ( < aArray >, ;
< cArrayFile > ) - > lStatus
Arguments:
< aArray > is the name of the multi-dimensional array to save.
< cArrayFile > is the name of the array text file to write.
Returns:
.TRUE. if the array file was created, .FALSE. otherwise.
Description:
DC_ARRAY_W() is used to save a multi-dimensional array to
an array text file for later restoring with the DC_ARRAY_R()
function for RESTORE ARRAY command. Only elements of the type
L (logical), N (numeric), C (character), D (date), A (array)
can be saved and restored.
Examples:
PROCEDURE XTest()
LOCAL aDir1, aDir2, cScrn
DC_Gui(.t.)
cScrn := DC_WaitOn()
aDir1 := directory()
DC_ARRAY_W( aDir1, "DIR.AR" )
aDir2 := dc_array_r( "DIR.AR" )
DC_Impl(cScrn)
DC_Achoice( 5,10,20,30, DC_AConvert( aDir2 )[1] )
RETURN
Source/Library:
_DCARRAY.PRG/.OBJ, DCLIPX.LIB
See Also:
dc_array_r()
dc_array2prg()
Save the contents of a multidimensional array to source code
Syntax:
DC_Array2Prg ( < aArray >, ;
< cFileName >, ;
[< cFunction >], ;
[< cComments >], ;
[< cCode >] ) - > lStatus
Arguments:
< aArray > is the name of the array to write.
< cFileName > is the name of the file to create.
< cFunction > is the name of the function to call that will
return the array contents. If this parameter is not passed
then the function will be given the same name as the file.
< cComments > is any comment heading to place at the top of
the file.
< cCode > is any source code that should be executed at the
beginning of the function before returning the array
contents.
Returns:
A logical .t. if the file was created.
Description:
DC_ARRAY2PRG() is used to create a .PRG file from the contents
of a multi-dimensional array. This allows the programmer
to capture the contents of any array to a source code file
that can be compiled and run to rebuild the array.
Notes:
If the file being created already exists, then the user
will be prompted to Append, Overwrite or Abort the
operation.
Examples:
-- Example 1 --
. aMyArray := directory()
. DC_ARRAY2PRG( aMyArray, "MYDIR" )
. clip mydir // compile mydir.prg
. obj mydir // load mydir.obj
. aNewArray := MYDIR()
-- Example 2 --
. use all like cust*
. browse tile // configure browse windows
. DC_ARRAY2PRG( DCBROWSE, 'MYBROWSE' )
. clip mybrowse // compile mbrowse.prg
. obj mybrowse // load mybrowse.obj
. release dcbrowse // kill old browse array
. dcbrowse := MYBROWSE()
Source/Library:
_DCARRAY.PRG, DCLIP1.DLL
See Also:
dc_asave()
dc_arrayview()
A Tree style array/object browser
Syntax:
DC_ArrayView( < aArray > | < oObject >, ;
[< lExpand >] ) - > nil
Arguments:
< aArray > is any type of array.
< oObject > is any type of object.
< lExpand > if .TRUE. will expand the tree. The default is .FALSE.
Returns:
NIL.
Description:
DC_ARRAYVIEW() 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:
PROCEDURE XTest()
LOCAL aDir
aDir := directory()
DC_ArrayView( aDir )
RETURN
Source/Library:
_DCARRAY.PRG/.OBJ, DCLIPX.LIB
See Also:
dc_inspectobject()
dc_asave()
Save a multidimensional array to a binary file
Syntax:
DC_ASave ( < aArray >, ;
< cFileName > ) - > lStatus
Arguments:
< aArray > is any multidimenstional array.
< cFileName > is the name of the binary file to create with
the array contents.
Returns:
A logical .TRUE. if the array file was created, .FALSE.
otherwise.
Description:
DC_ASAVE() will save the contents of any multi-dimensional
array to a binary file for later restoring with DC_ARESTORE().
If the array contains code blocks, the code blocks will be
saved and restored provide that they contain persistent data.
Any code block that contains non-persistent data will be
saved as a NIL.
If the array contains pointers to objects, they pointers will
be saved as a NIL.
Examples:
PROCEDURE XTest()
LOCAL aDir1, aDir2
DC_Gui(.t.)
aDir1 := Directory()
DC_ASAVE( aDir1, 'ADIR.ARX' )
aDir2 := DC_Arestore( 'ADIR.ARX' )
DC_Achoice( 5,10,20,30, DC_AConvert( aDir2 )[1] )
RETURN
Source/Library:
_DCASAVE.PRG/.OBJ, DCLIPX.LIB
See Also:
dc_arestore()
SAVE ARRAY
dc_at_clear()
Clear all prompts added by DC_At_Prompt()
Syntax:
DC_At_Clear() - > nil
Arguments:
None
Returns:
NIL
Description:
DC_AT_CLEAR() is used to clear the array that holds the
menu prompts created with DC_AT_PROMPT(). This array
is automatically cleared after calling DC_MENU_TO() so
it is not necessary to call this function unless you
wish to simply display menu prompts and not call the
DC_MENU_TO() function to get a user selection.
Examples:
dc_at_prompt( 10, 10, "Open a File", "Use a new database" )
DC_AT_CLEAR() // changed my mind
Source/Library:
_DCMENU2.PRG/.OBJ, DCLIPX.LIB
See Also:
dc_at_prompt()
dc_menu_to()
dc_at_prompt()
A moused replacement for AT..PROMPT
Syntax:
DC_At_Prompt( < nRow >, ;
< nCol >, ;
< cPrompt >, ;
[< cMessage >] ) - > nil
Arguments:
< nRow > is the screen row to display the prompt.
< nCol > is the screen column to display the prompt.
< cPrompt > is the prompt to display on the screen.
< cMessage > is an optional message to display at the coordinates
defined by the SET MESSAGE environment variable or by the
message coordinates passed to DC_MENU_TO().
Returns:
NIL
Description:
DC_AT_PROMPT() is used with DC_MENU_TO() to replace Clipper
@..PROMPT / MENU TO commands with a "mouseable" menu prompt
system. The prompts and menu will behave exactly like the
Clipper MENU TO system except the left button of the mouse will
high-light the selected prompt, and the right button performs
the same function as the <þENTERþ> key.
Examples:
// display prompts
DC_AT_PROMPT( 10, 10, "Open a File", "Use a new database" )
DC_AT_PROMPT( 12, 10, "Open an Index", "Use an Index file" )
DC_AT_PROMPT( 14, 10, "Edit database", "Browse all records" )
// get a user selection and display message at row 20, col 25
nChoice := dc_menu_to( 1, 20, 25 )
Source/Library:
_DCMENU2.PRG/.OBJ, DCLIPX.LIB
See Also:
dc_at_clear()
dc_menu_to()
dc_atnext()
Find the next occurrence of a string in another string
Syntax:
DC_AtNext ( < cCharacter >, ;
< cString >, ;
< nOccurrence > ) - > nPosition
Arguments:
< cCharacter > is the character or substring to search.
< cString > is the string to search.
< nOccurrence > is the occurrence of < cCharacter > in < cString > to
find.
Returns:
The numeric location of the <þnOccurenceþ> of <þcCharacterþ> in
<þcStringþ>. If not found then 0 is returned.
Description:
DC_ATNEXT() is used to return the location of the nth occurence
of a substring within a string.
Examples:
PROCEDURE XTest()
LOCAL cString
DC_Gui(.t.)
cString := 'this is a test'
DC_MsgBox( { cString, ;
DC_ATNEXT( 'is', cString, 1 ), ;
DC_ATNEXT( 'is', cString, 2 ) } )
RETURN
Source/Library:
_DCATNXT.PRG/.OBJ, DCLIPX.LIB
dc_atoattr()
Convert a Clipper color string to a screen color attribute
Syntax:
DC_AtoAttr ( < cColorString > ) - > nColor
Arguments:
< cColorString > is a valid Clipper color string.
Returns:
A character string.
Description:
DC_ATOATTR() is used to convert a Clipper color string to
a numeric screen attribute. Screen attributes are represented
as a number from 0 to 255 for a total of 256 colors. Clipper
functions require that a color string be used for setting
colors rather than a number.
Examples:
PROCEDURE XTest()
DC_Gui(.t.)
DC_MsgBox( { DC_ATOATTR( 'R/GR' ), ;
DC_ATOATTR( 'N/N' ), ;
DC_ATOATTR( 'W+*/W' ) } )
RETURN
Source/Library:
_DCCOLOR.PRG/.OBJ, DCLIPX.LIB
See Also:
dc_attrtoa()
dc_attrtoa()
Convert a screen color attribute to a color string
Syntax:
DC_AttrtoA ( < nColor > ) - > cColorString
Arguments:
< nColor > is a number from 0 to 256.
Returns:
A character string.
Description:
DC_ATTRTOA() is used to convert a screen attribute to a
color string. Screen attributes are represented as a
number from 0 to 255 for a total of 256 colors. Clipper
functions require that a color string be used for setting
colors rather than a number.
Examples:
PROCEDURE XTest()
DC_Gui(.t.)
DC_MsgBox( { DC_ATOATTR( 'R/GR' ), ;
DC_ATOATTR( 'N/N' ), ;
DC_ATOATTR( 'W+*/W' ) } )
RETURN
Source/Library:
_DCCOLOR.PRG/.OBJ, DCLIPX.LIB
See Also:
dc_atoattr()
dc_autoresize()
Resize all objects to fit on the resized parent
Syntax:
DC_AutoReSize( < aOldSize >, ;
< aNewSize >, ;
< oParent >, ;
< aGetList >, ;
< lToolBars > ) - > nil
Arguments:
< aOldSize > is a 2 element array containing the width and height
in pixels of the dialog window before resize.
< aNewSize > is a 2 element array containing the widht and height
in pixels of the dialog window after resize.
< oParent > is the parent object.
< aGetList > is the GetList array that was passed to DC_ReadGui().
< lToolBars > if .FALSE. will not resize DCTOOLBAR or XbpPushButton
objects. These objects, if using bitmaps can truncate the image
when resized. The position of the ToolBar or PushButton will
change accordingly but the size will not change. The default
is .TRUE. (resize all toolbars and pushbuttons).
Returns:
NIL.
Description:
DC_AutoReSize() is used to automatically resize and reposition
all child objects so they use the real estate of the parent in
the same proportions as the child objects before the parent was
resized.
DC_AutoReSize() is designed to be placed in a code block that is
attached to the :resize callback slot of the parent object.
The complete childlist tree is resized.
Notes:
DC_AutoReSize() will not resize or reposition anything on a
dialog that was painted with a Gra*() function or a DCGRA*
command.
Due to a bug in Xbase++ 1.3 make sure to add o:hide() and o:show()
to your resize code block or the screen may leave some undesirable
side effects after resizing objects.
Examples:
FUNCTION XTest()
LOCAL GetList := {}, oDesc, oBrowse
USE COLLECT VIA DBFNTX
@ 12,0 DCSAY COLLECT->descrip SAYSIZE 50 ;
SAYOBJECT oDesc COLOR GRA_CLR_BLUE FONT '12.Courier Bold'
@ .5,.5 DCBROWSE oBrowse ALIAS 'COLLECT' SIZE 49,9 ;
EVAL {|o|o:itemMarked := {||oDesc:setCaption(COLLECT->descrip)} } ;
HEADLINES 2 DELIMITER CHR(13)+CHR(10)
DCBROWSECOL FIELD COLLECT->descrip HEADER "Description"+CHR(13)+CHR(10)+"Line
2" ;
PARENT oBrowse WIDTH 50
DCREAD GUI FIT ADDBUTTONS ;
EVAL {|o| o:resize := ;
{|a,b,o|DC_AUTORESIZE(a,b,o,GetList),o:hide(),o:show()} }
RETURN nil
Source/Library:
_DCFUNCT.PRG, DCLIPX.DLL
See Also:
DCGETOPTIONS
dc_average()
Average numeric fields in selected database
Syntax:
DC_Average() - > lStatus
Arguments:
None.
Returns:
A logical .TRUE. if the average was not aborted.
Description:
DC_Average() is used to average numeric fields from the currently
selected database based on a set of conditions. As GUI dialog
window is displayed for the user to select the conditions.
Examples:
. USE COLLECT
. DC_Average()
Source/Library:
_DCSUM.PRG, DCLIP2.DLL
See Also:
SUM
dc_batch()
Process a Batch file with Dot-Prompt commands
Syntax:
dc_batch ( < cFileName >, ;
[< c1 >], ;
[< c2 >], ;
[< c3 >], ;
[< c4 >], ;
[< c5 >] ) - > nil
Arguments:
< cFileName > is the name of the batch file to run. If the
extension is not given then .DCB is assumed.
< c1 > , < c2 >, < c3 >, < c4 >, < c5 > are optional parameters that are
subsituted by %1 - %5 respectively in the batch file commands.
Returns:
Nil.
Description:
DC_Batch() will 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.DC_BATCH() is used to open and
execute a .DCB batch file. A
"batch" file can contain any commands that can be interpreted
at the dot prompt, including commands in .CH files which
have been loaded with the INCLUDE command or DC_PREINCLUDE()
function.
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:
DC_BATCH('test.dcb') // run TEST.DCB file
Source/Library:
_dcbatch.prg, DCLIP1.DLL
See Also:
BATCH
INTERPRET
dc_batchnewthread()
dc_batchnewthread()
Process a Batch file in a new thread
Syntax:
DC_BatchNewThread ( < cFileName >, ;
[< c1 >], ;
[< c2 >], ;
[< c3 >], ;
[< c4 >], ;
[< c5 >] ) - > nil
Arguments:
< cFileName > is the name of the batch file to run. If the
extension is not given then .DCB is assumed.
< c1 > , < c2 >, < c3 >, < c4 >, < c5 > are optional parameters that are
subsituted by %1 - %5 respectively in the batch file commands.
Returns:
Nil.
Description:
DC_BatchNewThread() functions identically to DC_Batch() except
it will execute in a new thread.
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:
. DC_BatchNewThread('test.dcb') // run TEST.DCB file
Source/Library:
_dcbatch.prg, DCLIP1.DLL
See Also:
BATCH
INTERPRET
dc_batch()
dc_bin2num()
Converts a Binary String to a Number
Syntax:
DC_Bin2Num( < cBinary > ) - > nDecimal
Arguments:
< cBinary > is a string of up to eight 1's and 0's.
Returns:
A numeric value from 0 - 255
Description:
DC_BIN2NUM() will convert a binary string to a numeric value.
Source/Library:
_DCAND.PRG/.OBJ, DCLIPX.LIB
See Also:
dc_bittest()
dc_xorbits()
dc_bitmapdraw()
Redraw a Bitmap Object on a GUI dialog screen
Syntax:
DC_BitMapDraw ( < oParent >, ;
< ncbResource > ) - > nil
Arguments:
< oParent > is the Static object that contains the presentation
space for the bitmap.
< ncbResource > is either the number of a resource that has been
linked to the .EXE, a character string with the name of a
*.BMP file, or a code block which, when evaluated, returns
a number or character string.
Returns:
Nil.
Description:
DC_BITMAPDRAW() is used to redraw a Bitmap object that was created
with the DCBITMAP command and painted on a dialog screen with
DC_READGUI().
This function is used to load a new *.BMP file into the
presentation space previously created from the DCBITMAP object
in the GetList.
Examples:
#include 'dcdialog.ch'
PROCEDURE XTest()
LOCAL GetList := {}, cBitMap1, cBitMap2, oPhoto1, oPhoto2
USE COLLECT NEW SHARED
SKIP 2
cBitMap1 := COLLECT->bitmap1
cBitMap2 := COLLECT->bitmap2
@ 2,2 DCSTATIC XBPSTATIC_TYPE_RAISEDBOX SIZE 33,10 ;
OBJECT oPhoto1
@ 2,37 DCSTATIC XBPSTATIC_TYPE_RAISEDBOX SIZE 33,10 ;
OBJECT oPhoto2
DCBITMAP cBitMap1 PARENT oPhoto1 AUTOSCALE
DCBITMAP cBitMap2 PARENT oPhoto2 AUTOSCALE
@ 1,3 DCSAY 'Photo 1' GET cBitMap1 ;
SAYRIGHT SAYSIZE 10 ;
DATALINK {||DC_BitMapDraw(oPhoto1,cBitMap1)}
@ 1,38 DCSAY 'Photo 2' GET cBitMap2 ;
SAYRIGHT SAYSIZE 10 ;
DATALINK {||DC_BitMapDraw(oPhoto2,cBitMap2)}
DCREAD GUI ;
FIT ;
ADDBUTTONS
RETURN
Source/Library:
_DCFUNCT.PRG/.OBJ, DCLIPX.LIB
See Also:
DCBITMAP
dc_readgui()
DIALOG GETLIST
dc_bitmaptransparentcolor()
Set RGB transparent color for pushbutton bitmaps
Syntax:
DC_BitmapTransparentColor( [< anColor >] ) - > nOldColor
Arguments:
< anColor > is a 3-element array containing numeric RGB values or
an numeric equivalent of an RGB color.
Returns:
A numeric value.
Description:
DC_BitmapTransparentColor() is a Get-Set function that is used
to set the RGB value of the transparent color used with Bitmaps
that are placed on DCPUSHBUTTON objects.
Examples:
// set the transparent color to medium gray (the background
// color of the bitmaps)
aColor := { 192, 192, 192 }
DC_BitmapTransparentColor( aColor )
@ 0,0 DCPUSHBUTTON CAPTION DCBITMAP_FIND_1 SIZE 10,2
DCREAD GUI FIT
Source/Library:
_DCGETBX.PRG, DCLIPX.DLL
See Also:
@ DCPUSHBUTTON
dc_getbitmap()
dc_bittest()
Tests if a bit is set to 1 or 0 in a number
Syntax:
DC_BitTest( < nDecimal >, ;
< nBit > ) - > lStatus
Arguments:
< nDecimal > is a numeric value from 0 to 255.
< nBit > is the bit to test. This is a value from 1 to 8.
Returns:
A logical .TRUE. if the bit is a 1 and a logical .FALSE. if
the bit is a 0.
Description:
DC_BITTEST() will test for a specified bit in a number.
Source/Library:
_DCAND.PRG/.OBJ, DCLIPX.LIB
See Also:
dc_andbits()
dc_blank()
Blank all fields in the current record
Syntax:
DC_Blank( [< lCommit >] ) - > lStatus
Arguments:
< lCommit > if .TRUE. (default) will commit the changes to disk.
Returns:
A logical .TRUE. if the record was blanked.
Description:
DC_BLANK() is used to blank the contents of all fields in the
current record of the current work area. It is not necessary
to lock the record because DC_BLANK() will also lock and unlock
the record before blanking the contents.
Examples:
. USE COLLECT
. GO 5
. DC_Blank()
Source/Library:
_dcblank.prg, DCLIP1.DLL
See Also:
BLANK
dc_isblank()
dc_bof()
Is the record pointer at the beginning of the file?
Syntax:
DC_Bof() - > lStatus
Arguments:
None.
Returns:
A logical value.
Description:
DC_BOF() is used to test whether or not DC_DbSkip() attempted
to move the record pointer past the top record in a "scoped"
set of records when using a negative skip value. If no scope
is set or the ADSDBE is being used as the data driver for the
current work area this function simply calls Bof() therefore
it can be used as a replacement for Bof().
Notes:
Examples:
DC_SetScope(0,'12001')
DC_SetScope(1,'12001')
DC_DbGoBottom()
DO WHILE !DC_Bof()
DC_DbSkip(-1)
ENDDO
Source/Library:
_DCSCOPE.PRG/.OBJ, DCLIPX.LIB
See Also:
dc_setscope()
dc_eof()
dc_dbskip()
dc_dbgotop()
dc_dbgobottom()
dc_browcelledit()
Edit Cells of a Browse Object
Syntax:
DC_BrowCellEdit( < oBrowse >, ;
[< nRow >], ;
[< nCol >], ;
[< nEditMode >], ;
[< lArray >], ;
[< abDefault >], ;
[< bEval >] ) - > nil
Arguments:
< oBrowse > is the browse object to edit, insert or delete. This
must be an object of the XbpBrowse class.
< nRow > is the starting row. If this argument is not passed,
then the currently selected row is the default. < nRow > must
be a numeric value within the currently visible number of rows.
< nCol > is the starting column. If this argument is not passed,
then the currently selected column is the default. < nCol > must
be a numeric value between 1 and the total number of columns in
the browse object.
< nEditMode > is the editing and/or navigation mode.
< nEditMode > Description
----------- ---------------------------------------
DCGUI_BROWSE_EDITEXIT Edit - Exit cell editing after ENTER key
DCGUI_BROWSE_EDITACROSS Edit - Move to next column after ENTER key
DCGUI_BROWSE_EDITDOWN Edit - Move to next row after ENTER key
DCGUI_BROWSE_INSERT Insert an element or a record
DCGUI_BROWSE_DELETE Delete current element or record
< lArray > is a logical value determining if the browsed data is an
array or a database. If .TRUE., then it is an array. If this
argument is not passed and the browse object was created via the
DCBROWSE command then this is determined automatically. If an
array is being browsed, then the :cargo iVar of the browse object
must contain an array of at least 5 elements. Element 5 is a
pointer to the array being browsed. Element 4 is a numeric
value containing a pointer to the currently selected array
element.
< abDefault > is used only when inserting an array element, ie
< nMode > is DCGUI_BROWSE_INSERT. This parameter contains either
an array or a code block which returns an array. The array
contains the default data for the inserted element. Note: array
browsers always browse multi-dimensional, symmetrical arrays, so
this array must contain the same number of sub-elements as each
array element.
< bEval > is an optional code block to evaluate before inserting,
deleting, or editing a cell row.
Description:
DC_BrowCellEdit() is used to edit the cells of any browse object.
Navigation modes allow for moving up and down within the browse
via the UP, DOWN keys or automatically moving DOWN or ACROSS
with the ENTER key.
DC_BrowCellEdit() supports WHEN code blocks for each column to
prevent the editing of a cell and VALID code blocks for each
column to validate user input.
DC_BrowCellEdit() also is used to delete an element from the
array being browsed or to insert and edit a new element.
Notes:
The :dataLink iVar of each XbpColumn object in the XbpBrowse
object is used to store the GET/SET code block for editing the
cell. If the XbpColumn objects were created by the DCBROWSECOL
command using the FIELD <þcFieldþ> clause, then it will automatically
be created as a GET/SET code block.
The :cargo iVar of each XbpColumn object in the XbpBrowse object
may be used to store WHEN clause and VALID clause information.
If the column objects were created by the DCBROWSECOL command