2011-08-24 17:21 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)

* contrib/hbcuied/cu_object.prg
  * contrib/hbcuied/cu_utlty.prg
  * contrib/hbcuied/hbcuied.ch
    + Implemented: K_PGUP/K_PGDN to navigate vertically.
                   K_ALT_Z to undo last action.
                   K_ALT_G to re-order GETS.
    * Improved: help screens adding highlights and additopnal text.
    ! Fixed: many misbehaving artifacts.
 
      NOTE: Harbour Screen Designer is almost at production level.
            I am awaiting groups response as to what else they need.

      To Viktor: is it possible that it be included in Harbour's bin 
                 folder. I wish to embed this into hbIDE.
This commit is contained in:
Pritpal Bedi
2011-08-25 00:29:05 +00:00
parent 14e19a775b
commit fa05ad5c1b
4 changed files with 492 additions and 396 deletions

View File

@@ -16,6 +16,22 @@
The license applies to all entries newer than 2009-04-28.
*/
2011-08-24 17:21 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbcuied/cu_object.prg
* contrib/hbcuied/cu_utlty.prg
* contrib/hbcuied/hbcuied.ch
+ Implemented: K_PGUP/K_PGDN to navigate vertically.
K_ALT_Z to undo last action.
K_ALT_G to re-order GETS.
* Improved: help screens adding highlights and additopnal text.
! Fixed: many misbehaving artifacts.
NOTE: Harbour Screen Designer is almost at production level.
I am awaiting groups response as to what else they need.
To Viktor: is it possible that it be included in Harbour's bin
folder. I wish to embed this into hbIDE.
2011-08-23 22:40 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbcuied/cu_object.prg
* contrib/hbcuied/cu_utlty.prg

View File

@@ -87,6 +87,9 @@ CLASS hbCUIEditor
DATA scn_
DATA rpt_ INIT { { "", 0, "" } }
DATA aUndo INIT {}
DATA aRedo INIT {}
DATA sectors_ INIT {}
DATA nDesign INIT 1
DATA nTop INIT 1
@@ -158,7 +161,6 @@ CLASS hbCUIEditor
METHOD scrObjCopy()
METHOD scrObjPas()
METHOD scrObjDel( nObj )
METHOD scrObject()
METHOD scrOnLastCol( nObj )
METHOD scrOnFirstCol( nObj, type_ )
METHOD scrGetChar( nRow, nCol )
@@ -173,13 +175,10 @@ CLASS hbCUIEditor
METHOD scrAddBox( nObj )
METHOD scrAddFld( nObj )
METHOD scrAddTxt( nMode )
METHOD scrProperty()
METHOD scrMsg( msg )
METHOD scrInKey( key_ )
METHOD scrConfig()
METHOD scrReConfig()
METHOD scrSectors()
METHOD scrAddPrp( sct_ )
METHOD scrObjBlank()
METHOD scrVrbBlank( nType )
METHOD scrObj2Vv( o_ )
@@ -197,6 +196,9 @@ CLASS hbCUIEditor
METHOD scrBuildSource( prg_, nIndent )
METHOD scrBuildFunction( prg_ )
METHOD scrBuildFromBuffer( cBuffer, cScreen )
METHOD scrOrdGets()
METHOD scrUpdateUndo()
METHOD scrUndo()
ENDCLASS
@@ -284,6 +286,7 @@ METHOD hbCUIEditor:scrLoad( lAsk )
::scrBuildFromBuffer( cBuffer, ::cScreen )
::xRefresh := OBJ_REFRESH_ALL
::lEdited := .f.
::aUndo := {}
ENDIF
::cScreen := iif( empty( ::cScreen ), "", ::cScreen )
@@ -535,6 +538,8 @@ METHOD hbCUIEditor:scrSave( lAsk )
::cScreen := cScreen
ENDIF
::scrOrdObj()
nLenSay := nLenPic := nLenClr := nLenWhn := nLenVld := nLenGet := 0
aeval( ::obj_, {|e_| iif( e_[ OBJ_TYPE ] == OBJ_O_FIELD, nLenGet := max( len( e_[ OBJ_ID ] ), nLenGet ), ;
@@ -684,7 +689,7 @@ METHOD hbCUIEditor:scrUpdateSource( prg_ )
hb_memowrit( ::cSource, s )
::lEdited := .f.
RETURN Self
/*----------------------------------------------------------------------*/
@@ -780,19 +785,24 @@ METHOD hbCUIEditor:scrReConfig()
//----------------------------------------------------------------------//
METHOD hbCUIEditor:scrSectors()
METHOD hbCUIEditor:scrUpdateUndo()
aadd( ::sectors_, { 1, "Screen", "R ", 100, "W+/BG", "", .f., .f. } )
RETURN 100
//----------------------------------------------------------------------//
METHOD hbCUIEditor:scrAddPrp( sct_ )
aadd( ::sectors_, { sct_[1], sct_[2], sct_[3], sct_[4], sct_[5], sct_[6], sct_[7], sct_[8] } )
RETURN NIL
aadd( ::aUndo, aclone( ::obj_ ) )
RETURN Self
/*----------------------------------------------------------------------*/
METHOD hbCUIEditor:scrUndo()
LOCAL nLast
IF ! empty( nLast := len( ::aUndo ) )
::obj_:= aclone( ::aUndo[ nLast ] )
hb_adel( ::aUndo, nLast, .t. )
::xRefresh := OBJ_REFRESH_ALL
ENDIF
RETURN Self
//----------------------------------------------------------------------//
@@ -852,6 +862,10 @@ METHOD hbCUIEditor:operate()
::scrLoad( .t. )
CASE ::nLastKey == K_ALT_S
::scrSave( .t. )
CASE ::nLastKey == K_ALT_G
::scrOrdGets()
CASE ::nLastKey == K_ALT_Z
::scrUndo()
CASE ::nLastKey == K_RIGHT
::scrMovRgt()
@@ -887,14 +901,17 @@ METHOD hbCUIEditor:operate()
ENDIF
::xRefresh := OBJ_REFRESH_ALL
CASE ::nLastKey == K_PGUP
// scrMovPgUp(scn_)
::nRowRep := 1
::nRowCur := ::nTop
::nRowDis := ::nTop - 1
nOff := min( ::nRowRep - 1, ::nBottom - ::nTop + 1 )
FOR i := 1 TO nOff
::scrMovUp()
NEXT
::xRefresh := OBJ_REFRESH_ALL
CASE ::nLastKey == K_PGDN
// ::nRowRep := ::nRowsMax
// ::nRowCur := ::nBottom
nOff := min( ::nRowsMax - ::nRowRep, ::nBottom - ::nTop + 1 )
FOR i := 1 TO nOff
::scrMovDn()
NEXT
::xRefresh := OBJ_REFRESH_ALL
CASE ::nLastKey == K_INS
readInsert( !readInsert() )
@@ -902,8 +919,6 @@ METHOD hbCUIEditor:operate()
CASE ::nLastKey == K_ENTER
IF ::nMode == OBJ_MODE_SELECT .AND. ::nObjSelected > 0
::obj_[ ::nObjSelected, OBJ_SECTION ] := 1
::nColsMax := max( ::nColsMax, ::obj_[ ::nObjSelected, OBJ_TO_COL ] + 1 )
::nMode := OBJ_MODE_IDLE
::xRefresh := OBJ_REFRESH_LINE
::nObjSelected := 0
@@ -915,8 +930,6 @@ METHOD hbCUIEditor:operate()
CASE ::nLastKey == K_F1 // Help
help()
CASE ::nLastKey == K_F3 // OBJECT
::scrObject()
CASE ::nLastKey == K_F7 // Copy
::scrObjCopy()
CASE ::nLastKey == K_F8 // Paste
@@ -927,26 +940,28 @@ METHOD hbCUIEditor:operate()
::scrAddFld()
CASE ::nLastKey == K_DEL
IF ! empty( ::aTextBlock )
::scrTextDel()
::scrOrdObj()
::nMode := 0
::nObjSelected := 0
::nObjHilite := 0
::xRefresh := OBJ_REFRESH_ALL
ELSEIF ::scrIsTxt()
::scrAddTxt( 2 )
ELSEIF ::nMode == OBJ_MODE_SELECT
IF ::nMode == OBJ_MODE_SELECT .AND. ::nObjSelected > 0
::scrObjDel( ::nObjSelected )
::nMode := 0
::nObjSelected := 0
ELSEIF ::nObjHilite > 0
::scrObjDel( ::nObjHilite )
::nMode := 0
::nObjSelected := 0
::nObjHilite := 0
::xRefresh := OBJ_REFRESH_ALL
ENDIF
::nMode := 0
::xRefresh := OBJ_REFRESH_ALL
::scrMsg()
ELSE
IF ! empty( ::aTextBlock )
::scrTextDel()
::scrOrdObj()
::nMode := 0
::nObjSelected := 0
::nObjHilite := 0
::xRefresh := OBJ_REFRESH_ALL
ELSEIF ::scrIsTxt()
::scrAddTxt( 2 )
ELSEIF ::nObjHilite > 0
::scrObjDel( ::nObjHilite )
::nMode := 0
::nObjHilite := 0
::xRefresh := OBJ_REFRESH_ALL
ENDIF
ENDIF
CASE ::nLastKey == K_BS
IF ::nMode <> OBJ_MODE_SELECT
IF ::scrMovLft()
@@ -959,12 +974,11 @@ METHOD hbCUIEditor:operate()
CASE ::nLastKey == K_ALT_N
::scrAddLine()
::lEdited := .t.
CASE ::nLastKey == K_ALT_O
::scrDelLine()
::lEdited := .t.
CASE ::nLastKey == K_ALT_W
//::scrRepCol()
CASE ::nLastKey == K_CTRL_F6 // Selection of Block
::scrTextBlock()
CASE ::nLastKey == K_CTRL_F7 // Move, Copy
@@ -1017,17 +1031,21 @@ METHOD hbCUIEditor:operate()
// Is the OBJECT selected
IF nObj > 0 .AND. ::nLastKey == K_F6 .AND. ::objIsBox( nObj )
::scrUpdateUndo()
::nMode := OBJ_MODE_SELECT
::nObjSelected := nObj
::scrOnFirstCol( nObj, { OBJ_O_BOX } )
::scrMsg( "Box is Selected. Use Arrow Keys to Move, Enter to Finish !" )
::scrMsg( "BOX is selected: Arrow-keys to move, ENTER to finished, DEL to delete" )
::lEdited := .t.
ELSEIF nObj > 0 .AND. ::nLastKey == K_F6 .AND. ! ::objIsBox( nObj )
::scrUpdateUndo()
::nMode := OBJ_MODE_SELECT
::nObjSelected := nObj
::scrOnFirstCol( nObj, { OBJ_O_TEXT } )
::scrMsg( "OBJECT is Selected. Use Arrow Keys to Move, Enter to Finished" )
::scrMsg( iif( ::objIsTxt( nObj ), "TEXT", "FIELD" ) + " is selected: Arrow-keys to move, ENTER to finished, DEL to delete" )
::lEdited := .t.
ENDIF
@@ -1103,7 +1121,7 @@ METHOD hbCUIEditor:scrMove()
IF ::objIsBox( i )
cColor := iif( ::nObjSelected == i, ::cClrSelect,;
iif( ::nObjHilite == i, ::cClrHilite,;
'W/B' /* obj_[i,OBJ_COLOR] */ ) )
'W/B' ) )
DO CASE
CASE VouchInArray( ::obj_[ i,OBJ_MDL_F_TYPE ], { 61,62,63,67,68 } )
dispBox( ::obj_[ i,OBJ_ROW ] + ::nRowDis,;
@@ -1127,7 +1145,7 @@ METHOD hbCUIEditor:scrMove()
cText := ::obj_[ i,OBJ_TEXT ]
cColor := iif( ::nObjSelected == i, ::cClrSelect,;
iif( ::nObjHilite == i, ::nObjHilite,;
'W+/W' /* obj_[i,OBJ_COLOR] */ ) )
'W+/W' ) )
IF nOff < 0
cText := substr( ::obj_[ i,OBJ_TEXT ], abs( nOff ) + 1 )
ENDIF
@@ -1138,7 +1156,7 @@ METHOD hbCUIEditor:scrMove()
cText := ::obj_[ i,OBJ_EQN ]
cColor := iif( ::nObjSelected == i, ::cClrSelect,;
iif( empty( ::obj_[ i, OBJ_COLOR ] ), ::cClrText,;
'W/B' /* obj_[i,OBJ_COLOR] */) )
'W/B' ) )
IF nOff < 0
cText := substr( ::obj_[ i, OBJ_EQN ], abs( nOff ) + 1 )
ENDIF
@@ -1166,12 +1184,12 @@ METHOD hbCUIEditor:scrMoveLine()
IF ::nRowPrev == ::nRowCur
dispbegin()
dispBox( ::nRowCur ,;
dispBox( ::nRowCur ,;
::nLeft ,;
::nRowCur ,;
::nRowCur ,;
::nRight ,;
::cDrawFill,;
::cClrPrev )
::cDrawFill ,;
::cClrPrev )
FOR i := 1 TO len( ::obj_ )
nOff := ::obj_[ i, OBJ_COL ] + ::nColDis
@@ -1186,7 +1204,7 @@ METHOD hbCUIEditor:scrMoveLine()
TO ::obj_[ i, OBJ_TO_ROW ] + ::nRowDis,;
::obj_[ i, OBJ_TO_COL ] + ::nColDis ;
COLOR iif( ::nObjHilite == i, ::nObjHilite,;
'W/B' /* obj_[i,OBJ_COLOR] */ )
'W/B' )
ENDCASE
ENDIF
@@ -1195,7 +1213,7 @@ METHOD hbCUIEditor:scrMoveLine()
cText := ::obj_[ i,OBJ_TEXT ]
cColor := iif( ::nObjSelected == i, ::cClrSelect,;
iif( ::nObjHilite == i, ::nObjHilite,;
'W+/W' /* obj_[i,OBJ_COLOR] */ ))
'W+/W' ) )
@ nRow, nCol SAY cText COLOR cColor
ENDIF
@@ -1203,7 +1221,7 @@ METHOD hbCUIEditor:scrMoveLine()
cText := ::obj_[ i, OBJ_EQN ]
cColor := iif( ::nObjSelected == i, ::cClrSelect,;
iif( empty( ::obj_[ i, OBJ_COLOR ] ), ::cClrText,;
'W/B' /* obj_[i,OBJ_COLOR] */))
'W/B' ) )
@ nRow, nCol SAY cText COLOR cColor
ENDIF
ENDIF
@@ -1279,7 +1297,7 @@ METHOD hbCUIEditor:scrStatus()
str( ::nColRep - 1, 3 ) +;
' ³ ' +;
iif( readInsert(), 'Ins', ' ' ) +;
' ³ '
' ³ '
objId := ''
IF ::nObjHilite > 0
@@ -1298,7 +1316,8 @@ METHOD hbCUIEditor:scrStatus()
ENDIF
s += pad( trim( objId ), 10 ) + ' ³ '
s += "U:" + hb_ntos( len( ::aUndo ) )
@ ::nRowStatus, ::nColStatus SAY pad( s, maxcol() + 1 ) COLOR ::cClrStatus
/* Ruler */
@@ -1335,8 +1354,7 @@ METHOD hbCUIEditor:scrMouse()
nmRow := mRow()
nmCol := mCol()
IF nmRow < ::nTop .OR. nmRow > ::nBottom .OR. ;
nmCol < ::nLeft .OR. nmCol > ::nRight
IF nmRow < ::nTop .OR. nmRow > ::nBottom .OR. nmCol < ::nLeft .OR. nmCol > ::nRight
RETURN .f.
ENDIF
@@ -1344,19 +1362,16 @@ METHOD hbCUIEditor:scrMouse()
IF nEvent == K_LDBLCLK
ELSEIF nEvent == K_MMLEFTDOWN /*K_LBUTTONDOWN */ .AND. !( lAnchored )
ELSEIF nEvent == K_MMLEFTDOWN /*K_LBUTTONDOWN */ .AND. ! lAnchored
IF ::scrChkObj() > 0 .AND. ::nMode <> OBJ_MODE_SELECT
nCursor := SetCursor( 0 )
lAnchored := .t.
nCursor := SetCursor( 0 )
lAnchored := .t.
::nLastKey := K_F6
// Wvt_SetMousePos( ::nRowCur, ::nColCur )
ENDIF
ELSEIF nEvent == K_MMLEFTDOWN .AND. lAnchored
ELSEIF nEvent == K_LBUTTONUP .AND. lAnchored
// Wvt_SetMousePos( ::nRowCur, ::nColCur )
SetCursor( nCursor )
lAnchored := .f.
__keyboard( chr( K_ENTER ) )
@@ -1388,19 +1403,89 @@ METHOD hbCUIEditor:scrToMouse( nmRow, nmCol )
//----------------------------------------------------------------------//
METHOD hbCUIEditor:scrOrdObj()
LOCAL a_:={}, d_:={}
METHOD hbCUIEditor:scrOrdGets()
LOCAL a_:={}, d_:={}, t_, n_, h_, n
t_:={}
FOR EACH a_ IN ::obj_
IF a_[ OBJ_TYPE ] == OBJ_O_BOX
aadd( d_, a_ )
aadd( t_, a_ )
ENDIF
NEXT
IF ! empty( t_ )
asort( t_, , , {|e_,f_| e_[ OBJ_ROW ] < f_[ OBJ_ROW ] } )
aeval( t_, {|e_| aadd( d_, e_ ) } )
ENDIF
t_:={}
FOR EACH a_ IN ::obj_
IF a_[ OBJ_TYPE ] == OBJ_O_TEXT
aadd( d_, a_ )
aadd( t_, a_ )
ENDIF
NEXT
IF ! empty( t_ )
asort( t_, , , {|e_,f_| e_[ OBJ_ROW ] < f_[ OBJ_ROW ] } )
aeval( t_, {|e_| aadd( d_, e_ ) } )
ENDIF
// GETS are TO be appended as ordered by the developer
t_:={}
FOR EACH a_ IN ::obj_
IF a_[ OBJ_TYPE ] == OBJ_O_FIELD
aadd( t_, a_ )
ENDIF
NEXT
IF ! empty( t_ )
n_:= array( len( t_ ) )
h_:= array( len( t_ ) )
aeval( t_, {|e_,i| e_:= e_, n_[ i ] := i } )
aeval( t_, {|e_,i| h_[ i ] := e_[ OBJ_ID ] } )
::scrMsg( "ENTER: Next Number if Blank, 0 if Numbered CTRL_ENTER: When Done" )
B_MSG "Order GETS" CHOOSE h_ RESTORE SHADOW CENTER INTO n_ SELECTIONS NUMERIC // NUMBERED n_
::scrMsg()
IF len( n_ ) != len( t_ )
alert( "Must ORDER every field !" )
RETURN Self
ENDIF
FOR EACH n IN n_
aadd( d_, t_[ n ] )
NEXT
ENDIF
::obj_:= d_
RETURN Self
/*----------------------------------------------------------------------*/
METHOD hbCUIEditor:scrOrdObj()
LOCAL a_:={}, d_:={}, t_
t_:={}
FOR EACH a_ IN ::obj_
IF a_[ OBJ_TYPE ] == OBJ_O_BOX
aadd( t_, a_ )
ENDIF
NEXT
IF ! empty( t_ )
asort( t_, , , {|e_,f_| e_[ OBJ_ROW ] < f_[ OBJ_ROW ] } )
aeval( t_, {|e_| aadd( d_, e_ ) } )
ENDIF
t_:={}
FOR EACH a_ IN ::obj_
IF a_[ OBJ_TYPE ] == OBJ_O_TEXT
aadd( t_, a_ )
ENDIF
NEXT
IF ! empty( t_ )
asort( t_, , , {|e_,f_| e_[ OBJ_ROW ] < f_[ OBJ_ROW ] } )
aeval( t_, {|e_| aadd( d_, e_ ) } )
ENDIF
// GETS are TO be appended as ordered by the developer
FOR EACH a_ IN ::obj_
IF a_[ OBJ_TYPE ] == OBJ_O_FIELD
aadd( d_, a_ )
@@ -1534,24 +1619,32 @@ METHOD hbCUIEditor:scrIsTxt()
//----------------------------------------------------------------------//
METHOD hbCUIEditor:scrChkObj()
LOCAL e_
LOCAL a_:={}, e_
FOR EACH e_ IN ::obj_
IF e_[ OBJ_TYPE ] == OBJ_O_BOX
IF ( ::nRowRep == e_[ OBJ_ROW ] .OR. ::nRowRep == e_[ OBJ_TO_ROW ] ) .AND. ;
( ::nColRep >= e_[ OBJ_COL ] .AND. ::nColRep <= e_[ OBJ_TO_COL ] )
RETURN e_:__enumIndex()
aadd( a_, e_:__enumIndex() )
ELSEIF ( ::nColRep == e_[ OBJ_COL ] .OR. ::nColRep == e_[ OBJ_TO_COL ] ) .AND. ;
( ::nRowRep >= e_[ OBJ_ROW ] .AND. ::nRowRep <= e_[ OBJ_TO_ROW ] )
RETURN e_:__enumIndex()
aadd( a_, e_:__enumIndex() )
ENDIF
ELSE
IF ::nRowRep == e_[ OBJ_ROW ] .AND. ( ::nColRep >= e_[ OBJ_COL ] .AND. ::nColRep <= e_[ OBJ_TO_COL ] )
RETURN e_:__enumIndex()
aadd( a_, e_:__enumIndex() )
ENDIF
ENDIF
NEXT
IF !empty( a_ )
IF len( a_ ) >= 2
RETURN a_[ 2 ]
ELSE
RETURN a_[ 1 ]
ENDIF
ENDIF
RETURN 0
//----------------------------------------------------------------------//
@@ -1597,6 +1690,8 @@ METHOD hbCUIEditor:scrRepCol()
METHOD hbCUIEditor:scrAddLine()
::scrUpdateUndo()
aeval( ::obj_, {|e_,i| iif( e_[ OBJ_ROW ] >= ::nRowRep, ::obj_[ i, OBJ_TO_ROW ]++, NIL ) } )
aeval( ::obj_, {|e_,i| iif( e_[ OBJ_ROW ] >= ::nRowRep, ::obj_[ i, OBJ_ROW ]++, NIL ) } )
@@ -1610,6 +1705,8 @@ METHOD hbCUIEditor:scrDelLine()
LOCAL nRow := ::nRowRep
LOCAL n, isLast
::scrUpdateUndo()
isLast := ( nRow == ::nRowsMax )
IF ::nRowsMax < ( ::nBottom - ::nTop + 1 )
@@ -1659,6 +1756,8 @@ METHOD hbCUIEditor:scrObjPas() // Paste Copied OBJECT
LOCAL nObj, o_, oldRow, oldCol, oldRow2, oldcol2
IF ( nObj := ::nObjCopied ) > 0 .AND. ::nObjSelected == 0
::scrUpdateUndo()
o_:= aclone( ::obj_[ nObj ] )
oldRow := o_[ OBJ_ROW ] ; oldCol := o_[ OBJ_COL ]
@@ -1676,14 +1775,13 @@ METHOD hbCUIEditor:scrObjPas() // Paste Copied OBJECT
o_[ OBJ_TO_ROW] := ::nRowRep
o_[ OBJ_TO_COL ] := ::nColRep + ( oldCol2 - oldCol )
ENDIF
o_[ OBJ_SECTION ] := 1
aadd( ::obj_, o_ )
::scrOrdObj()
::nObjSelected := 0
::xRefresh := OBJ_REFRESH_LINE
::nMode := 0
::xRefresh := OBJ_REFRESH_LINE
::nMode := 0
::nObjCopied := 0
ENDIF
RETURN NIL
@@ -1691,86 +1789,17 @@ METHOD hbCUIEditor:scrObjPas() // Paste Copied OBJECT
//----------------------------------------------------------------------//
METHOD hbCUIEditor:scrObjDel( nObj )
LOCAL n
LOCAL nUnique := ::obj_[ nObj, OBJ_OBJ_UNIQUE ]
::scrUpdateUndo()
VouchAShrink( ::obj_, nObj )
IF empty( ::obj_ )
aadd( ::obj_, ::scrObjBlank( ))
ENDIF
::nObjSelected := 0
::xRefresh := OBJ_REFRESH_LINE
::xRefresh := OBJ_REFRESH_LINE
IF nUnique > 0
IF ( n := ascan( ::aFields, {|e_| e_[1] == nUnique } ) ) > 0
VouchAShrink( ::aFields, n )
ENDIF
ENDIF
RETURN Self
//----------------------------------------------------------------------//
METHOD hbCUIEditor:scrObject()
LOCAL nObj
LOCAL mnu_:={'Field Alt_F' ,;
'Boxes Alt_B' ,;
' ' ,;
'Columns Width Alt_W' ,;
'Graphic Characters Alt_F6' ,;
' ' ,;
'Copy OBJECT Alt_C' ,;
'Paste OBJECT Alt_V' ,;
'Selection of Block Ctrl_F6',;
'Copy Selection Ctrl_F7',;
'Cut & Paste Selection Ctrl_F8',;
' ' ,;
'Matrix Alt_M' }
LOCAL sel_:= {.t.,.t.,;
.f.,;
.t.,.t.,.t.,.t.,;
.f.,;
.t.,.t.,.t.,.t.,.t.,;
.f.,;
.t. }
B_MSG CHOOSE mnu_ RESTORE SHADOW CENTER INTO nObj SELECTABLES sel_
@ ::nRowCur, ::nColCur SAY ''
DO CASE
CASE nObj == 1 // Field
::scrAddFld()
CASE nObj == 2 // Box
::scrAddBox()
CASE nObj == 3 // Blank
CASE nObj == 4 // Columns
::scrRepCol()
CASE nObj == 5 // Graphcs
//graphChar()
::lGraphics := ! ::lGraphics
CASE nObj == 6 // Blank
CASE nObj == 7 // Copy
::scrObjCopy()
CASE nObj ==81 // Paste
::scrObjPas()
CASE nObj == 9 // Block Selection
::scrTextBlock()
CASE nObj == 10 // Copy Selectin
::scrTextMove( 1 )
CASE nObj == 11 // Copy & Cut Selection
::scrTextMove( 0 )
CASE nObj == 12 // Blank
CASE nObj == 13 // Matrix
ENDCASE
RETURN nObj
//----------------------------------------------------------------------//
METHOD hbCUIEditor:scrOnLastCol( nObj )
LOCAL nOff, i
@@ -2017,6 +2046,8 @@ METHOD hbCUIEditor:scrTextPost( gst_, nMode )
LOCAL del_:={0},ins_:={},d_:={},ddd_
LOCAL old_:= aclone( ::aTextBlock )
::scrUpdateUndo()
FOR i := gst_[ 1 ] TO gst_[ 3 ]
n := -1
DO WHILE .t.
@@ -2183,9 +2214,6 @@ METHOD hbCUIEditor:scrTextPost( gst_, nMode )
ENDIF
NEXT
::obj_:= aclone( d_ )
IF empty( ::obj_ )
aadd( ::obj_, ::scrObjBlank() )
ENDIF
ENDIF
aeval( ins_, {|e_| aadd( ::obj_, e_ ) } )
@@ -2200,6 +2228,8 @@ METHOD hbCUIEditor:scrTextDel()
LOCAL i,n,n1,s,s1,s3,nCol
LOCAL ins_:={},del_:={},d_:={},old_:={}
::scrUpdateUndo()
old_:= ::aTextBlock
FOR i := old_[1] TO old_[3] // Rows
n := -1
@@ -2287,16 +2317,17 @@ METHOD hbCUIEditor:scrAddTxt( nMode )
LOCAL txt_:={}, n, lClub, i
LOCAL n1,s1,s2,nTxt,nDel
LOCAL nRepCol := ::nColRep, nRepRow := ::nRowRep
LOCAL lOrder := .f.
LOCAL nKey := ::nLastKey
::scrUpdateUndo()
// nMode 1.Add 2.Del 3.BS
// Scan obj_ FOR Text Objects Related WITH Current Report Row
aeval( ::obj_,{|e_| iif( e_[ OBJ_TYPE ] == OBJ_O_TEXT .AND. e_[ OBJ_ROW ] == nRepRow, aadd( txt_,e_ ),'' ) } )
IF nMode == 1 // New Character
IF empty( txt_ ) .OR. ascan( txt_, {|e_| VouchInRange( nRepCol, e_[ OBJ_COL ], e_[ OBJ_TO_COL ] ) } ) == 0
aadd( txt_, ::scrObjBlank() ) ; lOrder := .t.
aadd( txt_, ::scrObjBlank() )
nTxt := len( txt_ )
txt_[ nTxt, OBJ_TYPE ] := OBJ_O_TEXT
txt_[ nTxt, OBJ_F_TYPE ] := 'C'
@@ -2338,8 +2369,7 @@ METHOD hbCUIEditor:scrAddTxt( nMode )
IF len( s2 ) > 0
IF nDel == 0
aadd( txt_, aclone( txt_[ nTxt ] ) )
lOrder := .t.
n1 := len( txt_ )
n1 := len( txt_ )
ELSE
n1 := nDel
ENDIF
@@ -2393,48 +2423,32 @@ METHOD hbCUIEditor:scrAddTxt( nMode )
ENDIF
DO WHILE .t.
IF( n := ascan( ::obj_, {|e_| e_[OBJ_TYPE] == OBJ_O_TEXT .AND. e_[OBJ_ROW ] == ::nRowRep } ) ) > 0
IF( n := ascan( ::obj_, {|e_| e_[ OBJ_TYPE ] == OBJ_O_TEXT .AND. e_[ OBJ_ROW ] == ::nRowRep } ) ) > 0
VouchAShrink( ::obj_,n )
IF empty( ::obj_ )
aadd( ::obj_, ::scrObjBlank() )
ENDIF
ELSE
EXIT
ENDIF
ENDDO
aeval( txt_, {|e_| iif( e_[ OBJ_ROW ] > 0, aadd( ::obj_, e_ ), '' ) } ) // Now attach txt_
aeval( txt_, {|e_| iif( e_[ OBJ_ROW ] > 0, aadd( ::obj_, e_ ), '' ) } )
DO WHILE .t.
IF( n := ascan( ::obj_,{|e_| e_[ OBJ_TO_COL ] < e_[ OBJ_COL ] } ) ) > 0
VouchAShrink( ::obj_, n )
IF empty( ::obj_ )
aadd( ::obj_, ::scrObjBlank() )
ENDIF
ELSE
EXIT
ENDIF
ENDDO
IF lOrder
// scrOrdObj( obj_ )
ENDIF
IF nMode == 1
IF nMode == 1
keyboard( chr( K_RIGHT ) )
ENDIF
::xRefresh := OBJ_REFRESH_LINE
::lEdited := .t.
RETURN NIL
//----------------------------------------------------------------------//
METHOD hbCUIEditor:scrProperty()
::aProperty := {}
::scrOrdObj()
RETURN NIL
//----------------------------------------------------------------------//
@@ -2447,7 +2461,7 @@ METHOD hbCUIEditor:scrMsg( msg )
msg := "F1:Help F4:Prop F5:Edit F6:Select F7:Copy F8:Paste F9:Box F10:Field"
ENDIF
msg := " " + msg + " "
@ maxrow(),( maxcol()+1-len( msg ) )/2 SAY msg COLOR "W+/B"
@ maxrow(),( maxcol()+1-len( msg ) )/2 SAY msg COLOR "W+/RB"
setPos( row,col )
RETURN NIL
@@ -2484,7 +2498,6 @@ METHOD hbCUIEditor:scrObjBlank()
o_[ OBJ_COLOR ] := ""
o_[ OBJ_WHEN ] := ""
o_[ OBJ_VALID ] := ""
o_[ OBJ_SECTION ] := 1
o_[ OBJ_ID ] := ""
o_[ OBJ_SEC_ROW ] := 0
o_[ OBJ_OBJ_UNIQUE ] := 0
@@ -2615,6 +2628,8 @@ METHOD hbCUIEditor:scrVv2Obj( v_, o_ )
METHOD hbCUIEditor:scrAddBox( nObj )
LOCAL o_, nKey, nnObj := nObj
::scrUpdateUndo()
DEFAULT nObj TO 0
IF empty( nObj )
@@ -2638,7 +2653,7 @@ METHOD hbCUIEditor:scrAddBox( nObj )
IF ! empty( nnObj )
::scrOnLastCol( nnObj )
ENDIF
::scrMsg( 'Draw Frame WITH <Arrow Keys>. Finish WITH <Enter>' )
::scrMsg( 'Draw Box with <Arrow Keys>. Finish with <Enter>' )
DO WHILE .t.
nKey := inkey( 0 )
@@ -2689,7 +2704,9 @@ METHOD hbCUIEditor:scrAddFld( nObj )
w_[ 3 ] := {|v| v := oAchGet( 2 ), iif( v == 'D', !oCPut( 8 ), iif( v == 'L', !oCPut( 1 ), .t. ) ) }
w_[ 4 ] := {|v| v := oAchGet( 2 ), iif( v <> 'N', !oCPut( 0 ), .t. ) }
::scrMsg( "ENTER: Starts Editing Current Selection. CTRL_ENTER: When Done." )
B_GETS HEADERS h_ VALUES v_ TITLE 'Configure Field' WHEN w_ INTO v_
::scrMsg()
v_:= v_[ 1 ]
v_[ 1 ] := alltrim( trim( v_[ 1 ] ) )
@@ -2698,6 +2715,8 @@ METHOD hbCUIEditor:scrAddFld( nObj )
ENDIF
IF lastkey() <> K_ESC
::scrUpdateUndo()
IF nObj == 0
o_:= ::scrObjBlank()
ELSE
@@ -2712,7 +2731,6 @@ METHOD hbCUIEditor:scrAddFld( nObj )
o_[ OBJ_TEXT ] := padc( alltrim( v_[ 1 ] ), v_[ 3 ] )
o_[ OBJ_TO_ROW ] := iif( nObj == 0, ::nRowRep, o_[ OBJ_TO_ROW ] )
o_[ OBJ_TO_COL ] := iif( nObj == 0, ::nColRep, o_[ OBJ_COL ] ) + v_[ 3 ] - 1
o_[ OBJ_SECTION ] := 1
IF nObj == 0
aadd( ::obj_, o_ )
@@ -2743,6 +2761,8 @@ METHOD hbCUIEditor:scrGetProperty( nObj )
SWITCH ::objType( nObj )
CASE OBJ_O_BOX
::scrUpdateUndo()
v_:= iif( nObj > 0, ::scrObj2Vv( ::obj_[ nObj ] ), ::scrVrbBlank( OBJ_O_BOX ) )
h_:= ::scrVrbHeaders( OBJ_O_BOX )
w_:= afill( array( len( h_ ) ), {|| .T. } )
@@ -2750,21 +2770,25 @@ METHOD hbCUIEditor:scrGetProperty( nObj )
w_[ 2 ] := {| | VouchMenuM( 'MN_BOX' ) }
w_[ 3 ] := {| | VouchMenuM( 'MN_FILL' ) }
::scrMsg( "ENTER: Starts Editing Current Selection. CTRL_ENTER: When Done." )
B_GETS HEADERS h_ VALUES v_ TITLE 'Configure Field' WHEN w_ INTO v_
v_:= v_[ 1 ]
::scrVv2Obj( v_, o_ )
::scrMsg()
::scrVv2Obj( v_[ 1 ], o_ )
EXIT
CASE OBJ_O_TEXT
::scrUpdateUndo()
v_:= iif( nObj > 0, ::scrObj2Vv( ::obj_[ nObj ] ), ::scrVrbBlank( OBJ_O_TEXT ) )
h_:= ::scrVrbHeaders( OBJ_O_TEXT )
w_:= afill( array( len( h_ ) ), {|| .T. } )
::scrMsg( "ENTER: Starts Editing Current Selection. CTRL_ENTER: When Done." )
B_GETS HEADERS h_ VALUES v_ TITLE 'Configure Field' WHEN w_ INTO v_
v_:= v_[ 1 ]
::scrVv2Obj( v_, o_ )
::scrMsg()
::scrVv2Obj( v_[ 1 ], o_ )
EXIT
CASE OBJ_O_FIELD

View File

@@ -1089,160 +1089,24 @@ FUNCTION VouchGetSome( msg, vrb, pass, pic, set_, wh, vl, nLastKey )
/*----------------------------------------------------------------------*/
FUNCTION help( cToken )
LOCAL nKey
LOCAL aScr := VouchWndSave( 0, 0, maxrow(), maxcol() )
DEFAULT cToken TO SetHelpStr()
IF empty( cToken )
cToken := "KEYS"
ENDIF
LOCAL nKey, nRows, nCols, aScr, lSetMode
nRows := maxrow()
nCols := maxcol()
aScr := VouchWndSave( 0, 0, maxrow(), maxcol() )
lSetMode := nRows <> 27 .or. nCols <> 79
Vstk_push()
IF lSetMode
SetMode( 28,80 )
ENDIF
SetCursor( 0 )
SetColor( "W/B" )
DispBegin()
CLS
SWITCH Upper( cToken )
CASE "KEYS"
/* HB_SCREEN_BEGINS <Keys> */
/// 1 3 C 76 0
@ 1, 2 SAY " Keys " COLOR "N/W*"
/// 2 3 C 61 0
@ 16, 2 SAY "Alt_N Insert blank row. All objects are moved down one row."
/// 3 3 C 61 0
@ 17, 2 SAY "Alt_O Delete current row. All objects are moved up one row."
/// 4 3 C 71 0
@ 14, 2 SAY "End Cursor is positioned at the next to last column of last object."
/// 5 3 C 44 0
@ 13, 2 SAY "Home Cursor is positioned at column zero."
/// 6 3 C 32 0
@ 12, 2 SAY "Del Delete hilighted object."
/// 7 3 C 32 0
@ 10, 2 SAY "F10 Define a new GET object."
/// 8 3 C 39 0
@ 9, 2 SAY "F9 Start to define new box object."
/// 9 3 C 28 0
@ 8, 2 SAY "F8 Paste copied object."
/// 10 3 C 30 0
@ 7, 2 SAY "F7 Copy hilighted objec.t"
/// 11 3 C 32 0
@ 6, 2 SAY "F6 Select hilighted object."
/// 12 3 C 30 0
@ 5, 2 SAY "F5 Edit hilighted object."
/// 13 3 C 39 0
@ 4, 2 SAY "F4 Properties of hilighted object."
/// 14 3 C 20 0
@ 3, 2 SAY "F1 This screen."
/// 15 3 C 31 0
@ 19, 2 SAY "Ctrl_F6 Begins block selection."
/// 16 3 C 44 0
@ 20, 2 SAY "Ctrl_F7 Copy selected block at new location."
/// 17 3 C 53 0
@ 21, 2 SAY "Ctrl_F8 Cut and paste selected block at new location."
/// 18 3 C 29 0
@ 23, 2 SAY "Alt+S Save designed screen."
/// 19 3 C 28 0
@ 24, 2 SAY "Alt+L Load another screen."
/// 20 3 C 76 0
@ 26, 2 SAY " ESC-Designer 1-Keys 2-General 3-ListedInputs 4-BlockSelection 5-About " COLOR "N/W*"
/* HB_SCREEN_ENDS <Keys> */
EXIT
CASE "GENERAL-1"
/* HB_SCREEN_BEGINS <General-1> */
/// 1 3 C 76 0
@ 1, 2 SAY " General " COLOR "N/W*"
/// 2 3 C 76 0
@ 26, 2 SAY " ESC-Designer 1-Keys 2-General 3-ListedInputs 4-BlockSelection 5-About " COLOR "N/W*"
/// 3 3 C 76 0
@ 3, 2 SAY "hbCuiEd is a fixed-coordinated, character based screen designer which allows"
/// 4 3 C 76 0
@ 4, 2 SAY "to arrange Harbour's GT oriented objects in visual interaction and saves the"
/// 5 3 C 76 0
@ 5, 2 SAY "results as Harbour source code (with some meta info) directly into the .PRG "
/// 6 3 C 73 0
@ 6, 2 SAY "file ready to be compiled and linked. Thus generated forms can be edited "
/// 7 3 C 76 0
@ 7, 2 SAY "either directly in the source file or through this tool which allows two-way"
/// 8 3 C 56 0
@ 8, 2 SAY "communication leading to highest degree of productivity."
/// 9 3 C 76 0
@ 10, 2 SAY "One source file can contain n number of screens, anywhere in the source, at "
/// 10 3 C 74 0
@ 11, 2 SAY "any indentation. The only requirement is to place following lines where a "
/// 11 3 C 17 0
@ 12, 2 SAY "screen is needed:"
/// 12 3 C 35 0
@ 13, 22 SAY "/* HB_SCREEN_BEGINS <ScreenName> */" COLOR "GR+/B"
/// 13 3 C 74 0
@ 16, 2 SAY "This is to be done manually. Once you place above lines into source file, "
/// 14 3 C 76 0
@ 20, 2 SAY "The designer implements SAYs with/without expression, GETs with all clauses,"
/// 15 3 C 35 0
@ 14, 22 SAY "/* HB_SCREEN_ENDS <ScreenName> */" COLOR "GR+/B"
/// 16 3 C 75 0
@ 17, 2 SAY "just supply that source to load a screen. All screens defined therein will "
/// 17 3 C 44 0
@ 18, 2 SAY "be presented to be selected and edited."
/// 18 3 C 76 0
@ 15, 2 SAY "<ScreenName> should be unique 13 characters long string across given source."
/// 19 3 C 55 0
@ 21, 2 SAY "BOXes with all flavours, special characters (TOBE Done)."
/* HB_SCREEN_ENDS <General-1> */
EXIT
CASE "GENERAL-2"
/* HB_SCREEN_BEGINS <General-2> */
/// 2 3 C 76 0
@ 1, 2 SAY " Selective Input " COLOR "N/W*"
/// 20 3 C 76 0
@ 26, 2 SAY " ESC-Designer 1-Keys 2-General 3-ListedInputs 4-BlockSelection 5-About " COLOR "N/W*"
/* HB_SCREEN_ENDS <General-2> */
EXIT
CASE "GENERAL-3"
/* HB_SCREEN_BEGINS <General-3> */
/// 2 3 C 76 0
@ 1, 2 SAY " Block Selection " COLOR "N/W*"
/// 20 3 C 76 0
@ 26, 2 SAY " ESC-Designer 1-Keys 2-General 3-ListedInputs 4-BlockSelection 5-About " COLOR "N/W*"
/* HB_SCREEN_ENDS <General-3> */
EXIT
CASE "ABOUT"
/* HB_SCREEN_BEGINS <About> */
/// 1 3 C 76 0
@ 1, 2 SAY " About " COLOR "N/W*"
/// 20 3 C 76 0
@ 26, 2 SAY " ESC-Designer 1-Keys 2-General 3-ListedInputs 4-BlockSelection 5-About " COLOR "N/W*"
/// 3 3 C 35 0
@ 7, 22 SAY "Harbour Screen Designer ( hbCuiEd )" COLOR "GR+/B"
/// 4 3 C 40 0
@ 10, 20 SAY "Pritpal Bedi ( bedipritpal@hotmail.com )"
/// 5 3 C 13 0
@ 9, 33 SAY "Developed by:"
/// 6 3 C 12 0
@ 15, 34 SAY "Pritpal Bedi"
/// 7 3 C 14 0
@ 14, 33 SAY "Copyright 2011"
/// 8 3 C 23 0
@ 16, 29 SAY "www.harbour-project.org"
/// 9 3 C 29 0
@ 20, 26 SAY "Visit the project website at:"
/// 10 3 C 31 0
@ 21, 25 SAY "http://www.harbour-project.org/" COLOR "GR+/B"
/* HB_SCREEN_ENDS <About> */
EXIT
ENDSWITCH
DispHelp( cToken )
DispEnd()
DO WHILE .t.
@@ -1273,6 +1137,9 @@ FUNCTION help( cToken )
ENDIF
ENDDO
IF lSetMode
SetMode( nRows + 1, nCols + 1 )
ENDIF
VouchWndRest( aScr )
Vstk_pop()
@@ -1292,3 +1159,208 @@ FUNCTION SetHelpStr( cStr )
RETURN o_str
/*----------------------------------------------------------------------*/
STATIC FUNCTION DispHelp( cToken )
DEFAULT cToken TO SetHelpStr()
IF empty( cToken )
cToken := "KEYS"
ENDIF
SWITCH Upper( cToken )
CASE "KEYS"
/* HB_SCREEN_BEGINS <Keys> */
/// 1 3 C 76 0
@ 1, 2 SAY " Keys " COLOR "N/W*"
/// 2 3 C 12 0
@ 3, 10 SAY "This screen."
/// 3 3 C 7 0
@ 3, 2 SAY "F1 " COLOR "GR+/B"
/// 4 3 C 7 0
@ 4, 2 SAY "F4 " COLOR "GR+/B"
/// 5 3 C 59 0
@ 4, 10 SAY "Properties of current object in a selectable/editable list."
/// 6 3 C 7 0
@ 5, 2 SAY "F5 " COLOR "GR+/B"
/// 7 3 C 64 0
@ 5, 10 SAY "Edit current object: Text-no action, Box-resize action, Field-F4"
/// 8 3 C 7 0
@ 6, 2 SAY "F6 " COLOR "GR+/B"
/// 9 3 C 40 0
@ 6, 10 SAY "Selects current object (Box/Field/Text)."
/// 10 3 C 39 0
@ 7, 10 SAY "Copies current object (Box/Field/Text)."
/// 11 3 C 7 0
@ 7, 2 SAY "F7 " COLOR "GR+/B"
/// 12 3 C 7 0
@ 8, 2 SAY "F8 " COLOR "GR+/B"
/// 13 3 C 48 0
@ 8, 10 SAY "Pastes copied object at current cursor position."
/// 14 3 C 7 0
@ 9, 2 SAY "F9 " COLOR "GR+/B"
/// 15 3 C 32 0
@ 9, 10 SAY "Starts to define new box object."
/// 16 3 C 25 0
@ 10, 10 SAY "Defines a new GET object."
/// 17 3 C 7 0
@ 10, 2 SAY "F10 " COLOR "GR+/B"
/// 18 3 C 63 0
@ 12, 10 SAY "Deletes current object (Box/Field) or current character (Text)."
/// 19 3 C 7 0
@ 12, 2 SAY "Del " COLOR "GR+/B"
/// 20 3 C 36 0
@ 13, 10 SAY "Cursor is positioned at column zero."
/// 21 3 C 7 0
@ 13, 2 SAY "Home " COLOR "GR+/B"
/// 22 3 C 63 0
@ 14, 10 SAY "Cursor is positioned at the next to last column of last object."
/// 23 3 C 7 0
@ 14, 2 SAY "End " COLOR "GR+/B"
/// 24 3 C 7 0
@ 15, 2 SAY "Alt_Z " COLOR "GR+/B"
/// 25 3 C 5 0
@ 15, 10 SAY "Undo."
/// 26 3 C 54 0
@ 16, 10 SAY "Inserts blank row, all objects are moved down one row."
/// 27 3 C 7 0
@ 16, 2 SAY "Alt_N " COLOR "GR+/B"
/// 28 3 C 66 0
@ 17, 10 SAY "Deletes objects on current row, next objects are moved up one row."
/// 29 3 C 7 0
@ 17, 2 SAY "Alt_O " COLOR "GR+/B"
/// 30 3 C 53 0
@ 18, 10 SAY "Re-order GETS. This is different than creation order."
/// 31 3 C 7 0
@ 18, 2 SAY "Alt_G " COLOR "GR+/B"
/// 32 3 C 23 0
@ 20, 10 SAY "Begins block selection."
/// 33 3 C 7 0
@ 20, 2 SAY "Ctrl_F6" COLOR "GR+/B"
/// 34 3 C 36 0
@ 21, 10 SAY "Copy selected block at new location."
/// 35 3 C 7 0
@ 21, 2 SAY "Ctrl_F7" COLOR "GR+/B"
/// 36 3 C 45 0
@ 22, 10 SAY "Cut and paste selected block at new location."
/// 37 3 C 7 0
@ 22, 2 SAY "Ctrl_F8" COLOR "GR+/B"
/// 38 3 C 20 0
@ 24, 58 SAY "Load another screen."
/// 39 3 C 7 0
@ 24, 50 SAY "Alt_L " COLOR "GR+/B"
/// 40 3 C 21 0
@ 24, 10 SAY "Save designed screen."
/// 41 3 C 7 0
@ 24, 2 SAY "Alt_S " COLOR "GR+/B"
/// 42 3 C 76 0
@ 26, 2 SAY " ESC-Designer 1-Keys 2-General 3-ListedInputs 4-BlockSelection 5-About " COLOR "N/W*"
/* HB_SCREEN_ENDS <Keys> */
EXIT
CASE "GENERAL-1"
/* HB_SCREEN_BEGINS <General-1> */
/// 1 3 C 76 0
@ 1, 2 SAY " General " COLOR "N/W*"
/// 2 3 C 76 0
@ 3, 2 SAY "hbCuiEd is a fixed-coordinated, character based screen designer which allows"
/// 3 3 C 76 0
@ 4, 2 SAY "to arrange Harbour's GT oriented objects in visual interaction and saves the"
/// 4 3 C 76 0
@ 5, 2 SAY "results as Harbour source code (with some meta info) directly into the .PRG "
/// 5 3 C 73 0
@ 6, 2 SAY "file ready to be compiled and linked. Thus generated forms can be edited "
/// 6 3 C 76 0
@ 7, 2 SAY "either directly in the source file or through this tool which allows two-way"
/// 7 3 C 56 0
@ 8, 2 SAY "communication leading to highest degree of productivity."
/// 8 3 C 76 0
@ 10, 2 SAY "One source file can contain n number of screens, anywhere in the source, at "
/// 9 3 C 74 0
@ 11, 2 SAY "any indentation. The only requirement is to place following lines where a "
/// 10 3 C 17 0
@ 12, 2 SAY "screen is needed:"
/// 11 3 C 35 0
@ 13, 22 SAY "/* HB_SCREEN_BEGINS <ScreenName> */" COLOR "GR+/B"
/// 12 3 C 33 0
@ 14, 22 SAY "/* HB_SCREEN_ENDS <ScreenName> */" COLOR "GR+/B"
/// 13 3 C 76 0
@ 15, 2 SAY "<ScreenName> should be unique 13 characters long string across given source."
/// 14 3 C 74 0
@ 16, 2 SAY "This is to be done manually. Once you place above lines into source file, "
/// 15 3 C 75 0
@ 17, 2 SAY "just supply that source to load a screen. All screens defined therein will "
/// 16 3 C 39 0
@ 18, 2 SAY "be presented to be selected and edited."
/// 17 3 C 76 0
@ 20, 2 SAY "The designer implements SAYs with/without expression, GETs with all clauses,"
/// 18 3 C 56 0
@ 21, 2 SAY "BOXes with all flavours, special characters (TOBE Done)."
/// 19 3 C 76 0
@ 26, 2 SAY " ESC-Designer 1-Keys 2-General 3-ListedInputs 4-BlockSelection 5-About " COLOR "N/W*"
/* HB_SCREEN_ENDS <General-1> */
EXIT
CASE "GENERAL-2"
/* HB_SCREEN_BEGINS <General-2> */
/// 1 3 C 76 0
@ 1, 2 SAY " Selective Input " COLOR "N/W*"
/// 2 3 C 76 0
@ 26, 2 SAY " ESC-Designer 1-Keys 2-General 3-ListedInputs 4-BlockSelection 5-About " COLOR "N/W*"
/* HB_SCREEN_ENDS <General-2> */
EXIT
CASE "GENERAL-3"
/* HB_SCREEN_BEGINS <General-3> */
/// 1 3 C 76 0
@ 1, 2 SAY " Block Selection " COLOR "N/W*"
/// 2 3 C 76 0
@ 26, 2 SAY " ESC-Designer 1-Keys 2-General 3-ListedInputs 4-BlockSelection 5-About " COLOR "N/W*"
/* HB_SCREEN_ENDS <General-3> */
EXIT
CASE "ABOUT"
/* HB_SCREEN_BEGINS <About> */
/// 1 3 C 76 0
@ 1, 2 SAY " About " COLOR "N/W*"
/// 2 3 C 1 0
@ 4, 40 SAY "*" COLOR "W+/B"
/// 3 3 C 35 0
@ 7, 23 SAY "Harbour Screen Designer ( hbCuiEd )" COLOR "GR+/B"
/// 4 3 C 13 0
@ 9, 34 SAY "Developed by"
/// 5 3 C 40 0
@ 10, 20 SAY "Pritpal Bedi ( bedipritpal@hotmail.com )"
/// 6 3 C 14 0
@ 14, 33 SAY "Copyright 2011"
/// 7 3 C 12 0
@ 15, 34 SAY "Pritpal Bedi" COLOR "W+/B"
/// 8 3 C 23 0
@ 16, 29 SAY "www.harbour-project.org"
/// 9 3 C 29 0
@ 20, 26 SAY "Visit the project website at:"
/// 10 3 C 31 0
@ 21, 25 SAY "http://www.harbour-project.org/" COLOR "GR+/B"
/// 11 3 C 1 0
@ 23, 40 SAY "*" COLOR "W+/B"
/// 12 3 C 76 0
@ 26, 2 SAY " ESC-Designer 1-Keys 2-General 3-ListedInputs 4-BlockSelection 5-About " COLOR "N/W*"
/* HB_SCREEN_ENDS <About> */
EXIT
ENDSWITCH
RETURN NIL
/*----------------------------------------------------------------------*/

View File

@@ -96,12 +96,11 @@
#define OBJ_PATTERN 13 // C 10
#define OBJ_ID 14 // C 15
#define OBJ_SECTION 15 // N 4
#define OBJ_SEC_ROW 16 // N 3
#define OBJ_OBJ_UNIQUE 17 // N 4
#define OBJ_MDL_F_TYPE 18 // C 10
#define OBJ_SEC_ROW 15 // N 3
#define OBJ_OBJ_UNIQUE 16 // N 4
#define OBJ_MDL_F_TYPE 17 // C 10
//
#define OBJ_INIT_VRBLS 18
#define OBJ_INIT_VRBLS 17
#define OBJ_REFRESH_ALL 1
@@ -120,37 +119,37 @@
#define OBJ_MODE_IDLE 0
#translate B_MSG ;
[ <msg,...> ] ;
[ AT <r1> [, <c1> ] ] ;
[ TO <r2> [, <c2> ] ] ;
[ WIDTH <w> ] ;
[ DEPTH <d> ] ;
[ COLOR <clr> ] ;
[ CHOOSE <ch,...> ] ;
[ CHOOSECOLOR <chClr> ] ;
[ CHCOLOR <chClr> ] ;
[ INTO <ret> ] ;
[ WAIT <wait> ] ;
[ <rest:RESTORE,REST> ] ;
[ <paste:PASTE> ] ;
[ <shadow:SHADOW> ] ;
[ TRIGGER <trg> ] ;
[ INITIAL <init> ] ;
[ SELECTABLES <sel> ] ;
[ ABORT <abr> ] ;
[ <msg,...> ] ;
[ AT <r1> [, <c1> ] ] ;
[ TO <r2> [, <c2> ] ] ;
[ WIDTH <w> ] ;
[ DEPTH <d> ] ;
[ COLOR <clr> ] ;
[ CHOOSE <ch,...> ] ;
[ CHOOSECOLOR <chClr> ] ;
[ CHCOLOR <chClr> ] ;
[ INTO <ret> ] ;
[ WAIT <wait> ] ;
[ <rest:RESTORE,REST> ] ;
[ <paste:PASTE> ] ;
[ <shadow:SHADOW> ] ;
[ TRIGGER <trg> ] ;
[ INITIAL <init> ] ;
[ SELECTABLES <sel> ] ;
[ ABORT <abr> ] ;
[ <selections:SELECTIONS> ] ;
[ <leftright:LEFTRIGHT> ] ;
[ <cent:CENTER,CENTRE> ] ;
[ TAGGED <tag_> ] ;
[ <num:NUMERIC> ] ;
[ HELP <hlp> ] ;
[ EXECUTE <ex_> ] ;
[ NUMBERED <num_> ] ;
[ <lNoXpp:NOXPP> ] ;
[ WINDOW <oWin> ] ;
[ ICON <cIcon> ] ;
[ WVT <lWvt> ] ;
[ ALIGN <nAlign> ] ;
[ TAGGED <tag_> ] ;
[ <num:NUMERIC> ] ;
[ HELP <hlp> ] ;
[ EXECUTE <ex_> ] ;
[ NUMBERED <num_> ] ;
[ <lNoXpp:NOXPP> ] ;
[ WINDOW <oWin> ] ;
[ ICON <cIcon> ] ;
[ WVT <lWvt> ] ;
[ ALIGN <nAlign> ] ;
=> ;
[<ret> := ] VouchMsgBox (<r1>, <c1>, <r2>, <c2>, <w>, <d>, ;
{<msg>}, <clr>, {<ch>}, <chClr>, <wait>, <.rest.>, ;
@@ -164,33 +163,18 @@
[ SELECTABLES <sel> ] ;
[ AT <r1> [, <c1> ] ] ;
[ TO <r2> [, <c2> ] ] ;
[ TITLE <ttl> ] ;
[ INTO <ret> ] ;
[ WHEN <whn> ] ;
[ VALID <vld> ] ;
[ PICTURE <pic> ] ;
[ HELP <hlp> ] ;
[ ORDER <ord> ] ;
[ TITLE <ttl> ] ;
[ INTO <ret> ] ;
[ WHEN <whn> ] ;
[ VALID <vld> ] ;
[ PICTURE <pic> ] ;
[ HELP <hlp> ] ;
[ ORDER <ord> ] ;
=> ;
[<ret> := ] VouchGetArray(<hed>, <val>, <sel>, <r1>, <c1>, <r2>, <c2>, ;
<ttl>, <whn>, <vld>, <pic>, <hlp>, <ord> )
#xtranslate B_CRT <nTop>,<nLeft>,<nBottom>,<nRight> ;
[ TITLE <ttl> ] ;
[ ICON <icon> ] ;
[ <lModal:MODAL> ] ;
[ <lRowCols:RESIZEROWCOLS> ] ;
[ <lHidden:HIDDEN> ] ;
[ <lCenter:CENTER> ] ;
[ AT <nRow>,<nCol> ] ;
[ <lNoTitleBar:NOTITLEBAR> ] ;
INTO <oCrt> ;
=> ;
<oCrt> := Vou_CreateOCrt( <nTop>, <nLeft>, <nBottom>, <nRight>, <ttl>, <icon>, ;
<.lModal.>, <.lRowCols.>, <.lHidden.>, <.lCenter.>, ;
<nRow>, <nCol>, <.lNoTitleBar.> )
#define COMPILE( cStr ) &( "{|v,w,x| " + cStr + " }" )
#define CHECKMARK chr( 251 )