Harbour All Functions – H

HardCR

HBClass()

HB_ANSITOOEM()

hb_At

hb_cdpSelect

HB_ColorIndex

HB_DiskSpace

HB_EOL

HB_FEof

hb_FLock

hb_FUnlock

hb_gcAll
hb_gcAlloc
hb_gcCollectAll
hb_gcFree
hb_gcItemRef

hb_GetEnv

hb_HAllocate

hb_Hash
hb_HAutoAdd
hb_HBinary
hb_HCaseMatch
hb_HClone
hb_HCopy
hb_HDefault
hb_HDel
hb_HDelAt
hb_HEval
hb_HFill
hb_HGet
hb_HGetDef
hb_HHasKey
hb_HKeyAt
hb_HKeys
hb_HMerge
hb_HPairAt
hb_HPos
hb_HScan
hb_HSet

hb_HSetAutoAdd()
hb_HSetBinary() 
hb_HSetCaseMatch()

hb_HSort
hb_HValueAt
hb_HValues

hb_idleAdd
hb_idleDel
hb_idleState

hb_inetAddress
hb_inetCleanup
hb_inetClearError
hb_inetClearPeriodCallback
hb_inetClearTimeLimit
hb_inetClearTimeout
hb_inetClose
hb_inetConnect
hb_inetConnectIP
hb_inetCount
hb_inetCreate
hb_inetCRLF
hb_inetDataReady
hb_inetDGram
hb_inetDGramBind
hb_inetDGramRecv
hb_inetDGramSend
hb_inetErrorCode
hb_inetErrorDesc
hb_inetFD
hb_inetGetAlias
hb_inetGetHosts
hb_inetGetRcvBufSize
hb_inetGetSndBufSize
hb_inetInit
hb_inetIsSocket
hb_inetPeriodCallback
hb_inetPort
hb_inetRecv
hb_inetRecvAll
hb_inetRecvEndblock
hb_inetRecvLine
hb_inetSend
hb_inetSendAll
hb_inetServer
hb_inetSetRcvBufSize
hb_inetSetSndBufSize
hb_inetstatus
hb_inetTimeLimit
hb_inetTimeout

HB_IsByRef()

hb_keyPut

hb_langErrMsg
hb_langMessage
hb_langName
hb_langSelect

hb_mathErBlock
hb_mathErMode
hb_mathGetErrMode
hb_mathGetHandler
hb_mathGetLastError
hb_mathIsMathErr
hb_mathResetError
hb_mathSetErrMode
hb_mathSetHandler

hb_MemoRead
hb_MemoWrit

hb_RAt

hb_PIsByRef

hb_PValue

hb_SetKeyCheck
hb_SetKeyGet
hb_SetKeySave

hb_setListenerAdd

hb_setListenerNotify
hb_setListenerRemove

hb_SetMacro

hb_Translate

hb_ValToStr

Header

HexaToDec

SetKey()

SetKey()

Assign an action block to a key

Syntax

      SetKey( <anKey> [,  <bAction> [,  <bCondition> ] ] )

Arguments

<anKey> is either a numeric key value, or an array of such values

<bAction> is an optional code-block to be assigned

<bCondition> is an optional condition code-block

Returns

Current assigned action-block

Description

The SetKey() function returns the current code-block assigned to a key when called with only the key value. If the action block (and optionally the condition block) are passed, the current block is returned, and the new code block and condition block are stored. A group of keys may be assigned the same code block/condition block by using an array of key values in place on the first parameter.

Examples

      LOCAL bOldF10 := SetKey( K_F10,  {|| Yahoo() } )
      ... // some other processing
      SetKey( K_F10,  bOldF10 )
      ... // some other processing
      bBlock := SetKey( K_SPACE )
      IF bBlock != NIL ...

      // make F10 exit current get,  but only if in a get - ignores other
      // wait-states such as menus,  achoices,  etc...
      SetKey( K_F10,  {|| GetActive():State := GE_WRITE }, ;
       {|| GetActive() != NIL } )

Compliance

SetKey() is mostly CA-Cl*pper compliant. The only difference is the addition of the condition code-block parameter, allowing set-keys to be conditionally turned off or on. This condition-block cannot be returned once set – see SetKeyGet()

Files

Library is core

Seealso

hb_SetKeySave()

SET KEY

SET KEY

Assign an action block to a key

Syntax

      SET KEY   <anKey> to p<bAction>] [when  <bCondition> ]  )

Arguments

<anKey> is either a numeric key value, or an array of such values

<bAction> is an optional code-block to be assigned

<bCondition> is an optional condition code-block

Description

The Set Key Command function is translated to the SetKey() function witch returns the current code-block assigned to a key when called with only the key value. If the action block (and optionally the condition block) are passed, the current block is returned, and the new code block and condition block are stored. A group of keys may be assigned the same code block/condition block by using an array of key values in place on the first parameter.

Examples

      LOCAL bOldF10 := SetKey( K_F10,  {|| Yahoo() } )
      ... // some other processing
      SET KEY K_F10 TO bOldF10
      ... // some other processing
      bBlock := SetKey( K_SPACE )
      IF bBlock != NIL ...

         // make F10 exit current get,  but only if in a get - ignores other
         // wait-states such as menus,  achoices,  etc...
         SetKey( K_F10,  {|| GetActive():State := GE_WRITE },  ;
            {|| GetActive() != NIL } )

Compliance

SET KEY is mostly CA-Cl*pper compliant. The only difference is the addition of the condition code-block parameter, allowing set-keys to be conditionally turned off or on. This condition-block cannot be returned once set – see SetKeyGet()

Seealso

hb_SetKeySave()

hb_SetKeyGet()

HB_SetKeyGet()

Determine a set-key code block and condition-block

Syntax

      HB_SETKEYGET( <nKey> [, <bConditionByRef> ] )

Arguments

<anKey> is an numeric key value

<bConditionByRef> is an optional return-parameter

Returns

Current assigned action-block

Description

The HB_SetKeyGet() function returns the current code-block assigned to a key, and optionally assigns the condition-block to the return-parameter

Examples

      LOCAL bOldF10, bOldF10Cond
      bOldF10 := HB_SetKeyGet( K_F10, @bOldF10Cond )
      ... // some other processing
      SetKey( K_F10, bOldF10, bOldF10Cond )

Tests

      See test code above

Compliance

Harbour

Files

Library is rtl

Seealso

SETKEY(), HB_SETKEYSAVE(), HB_SETKEYCHECK()

hb_SetKeyCheck()

HB_SetKeyCheck()

Implements common hot-key activation code

Syntax

      HB_SetKeyCheck( <nKey> [, <p1> ][, <p2> ][, <p3> ] )

Arguments

<nKey> is a numeric key value to be tested code-block, if executed

<p1>..<p3> are optional parameters that will be passed to the code-block

Returns

True if there is a hot-key associated with <nKey> and it was executed; otherwise False If there is a hot-key association (before checking any condition): – if there is a condition-block, it is passed one parameter – <nKey> – when the hot-key code-block is called, it is passed 1 to 4 parameters, depending on the parameters passed to HB_SetKeyCheck(). Any parameters so passed are directly passed to the code-block, with an additional parameter being <nKey>

Description

HB_SetKeyCheck() is intended as a common interface to the SetKey() functionality for such functions as ACHOICE(), DBEDIT(), MEMOEDIT(), ACCEPT, INPUT, READ, and WAIT

Examples

      // within ReadModal()
      IF HB_SetKeyCheck( K_ALT_X, GetActive() )
         ... // some other processing
      ENDIF
      // within TBrowse handler
      CASE HB_SetKeyCheck( nInkey, oTBrowse )
         RETURN
      CASE nInKey == K_ESC
         ... // some other processing

Tests

      None definable

Compliance

Harbour

Files

Library is rtl

Seealso

SETKEY(), HB_SETKEYSAVE()