Module: _radiog Library: Clipper 5.3
This module contains the following functions and procedures:
Note: Because this is raw decompiler output, the code is closer
to that seen in a .PPO file, rather than a .PRG file. In other
words, you must allow for the preprocessor conversions normally
performed based on the contents of STD.CH and other .CH files
#include "common.ch"
#include "inkey.ch"
//-----------------------------------------------------------------
// file-wide static variables
//
static Static1
//---------------------------------------------------[top]-
// DEFINE
//
static function DEFINE
local Local1 := __classnew("RADIOGROUP", 20)
__classadd(Local1, "AddItem", "__rgAddItem")
__classadd(Local1, "DelItem", "__rgDelItem")
__classadd(Local1, "Display", "__rgDisplay")
__classadd(Local1, "GetAccel", "__rgGetAccel")
__classadd(Local1, "GetItem", "__rgGetItem")
__classadd(Local1, "HitTest", "__rgHitTest")
__classadd(Local1, "InsItem", "__rgInsItem")
__classadd(Local1, "KillFocus", "__rgKillFocus")
__classadd(Local1, "NextItem", "__rgNextItem")
__classadd(Local1, "PrevItem", "__rgPrevItem")
__classadd(Local1, "Select", "__rgSelect")
__classadd(Local1, "SetColor", "__rgSetColor")
__classadd(Local1, "SetFocus", "__rgSetFocus")
__classadd(Local1, "SetStyle", "__rgSetStyle")
__classadd(Local1, "Bottom", "__rgBottom")
__classadd(Local1, "_Bottom", "__rgBottom")
__classadd(Local1, "Buffer", "__rgBuffer")
__classadd(Local1, "_Buffer", "__rgBuffer")
__classadd(Local1, "CapCol", "__rgCapCol")
__classadd(Local1, "_CapCol", "__rgCapCol")
__classadd(Local1, "CapRow", "__rgCapRow")
__classadd(Local1, "_CapRow", "__rgCapRow")
__classadd(Local1, "Caption", "__rgCaption")
__classadd(Local1, "_Caption", "__rgCaption")
__classadd(Local1, "Cargo", "__rgCargo")
__classadd(Local1, "_Cargo", "__rgCargo")
__classadd(Local1, "ColdBox", "__rgColdBox")
__classadd(Local1, "_ColdBox", "__rgColdBox")
__classadd(Local1, "ColorSpec", "__rgColorSpec")
__classadd(Local1, "_ColorSpec", "__rgColorSpec")
__classadd(Local1, "fBlock", "__rgfBlock")
__classadd(Local1, "_fBlock", "__rgfBlock")
__classadd(Local1, "HasFocus", "__rgHasFocus")
__classadd(Local1, "_HasFocus", "__rgHasFocus")
__classadd(Local1, "HotBox", "__rgHotBox")
__classadd(Local1, "_HotBox", "__rgHotBox")
__classadd(Local1, "ItemCount", "__rgItemCount")
__classadd(Local1, "_ItemCount", "__rgItemCount")
__classadd(Local1, "Left", "__rgLeft")
__classadd(Local1, "_Left", "__rgLeft")
__classadd(Local1, "Message", "__rgMessage")
__classadd(Local1, "_Message", "__rgMessage")
__classadd(Local1, "Right", "__rgRight")
__classadd(Local1, "_Right", "__rgRight")
__classadd(Local1, "TextValue", "__rgTextValue")
__classadd(Local1, "_TextValue", "__rgTextValue")
__classadd(Local1, "Top", "__rgTop")
__classadd(Local1, "_Top", "__rgTop")
__classadd(Local1, "TypeOut", "__rgTypeOut")
__classadd(Local1, "_TypeOut", "__rgTypeOut")
__classadd(Local1, "Value", "__rgValue")
__classadd(Local1, "_Value", "__rgValue")
return Local1
//---------------------------------------------------[top]-
// RADIOGROUP( Arg1, Arg2, Arg3, Arg4 )
//
function RADIOGROUP( Arg1, Arg2, Arg3, Arg4 )
local Local1, Local2
do case
case !( ISNUMBER( Arg1 ) )
Local1 := Nil
case !( ISNUMBER( Arg2 ) )
Local1 := Nil
case !( ISNUMBER( Arg3 ) )
Local1 := Nil
case !( ISNUMBER( Arg4 ) )
Local1 := Nil
otherwise
if ( ValType(Static1) != "N" )
Static1 := define()
endif
Local1 := __classins(Static1)
Local1[ 1 ] := Arg3
Local1[ 2 ] := Nil
Local1[ 3 ] := ""
Local1[ 4 ] := Arg2 + 2
Local1[ 5 ] := Arg1
Local1[ 6 ] := Nil
Local1[ 7 ] := "ÚÄ¿³ÙÄÀ³"
if ( isdefcolor() )
Local1[ 8 ] := "W/N,W/N,W+/N"
else
Local2 := SetColor()
Local1[ 8 ] := __guicolor(Local2, 3) + "," + ;
__guicolor(Local2, 1) + "," + __guicolor(Local2, 4)
endif
Local1[ 9 ] := Nil
Local1[ 12 ] := .F.
Local1[ 10 ] := "ÉÍ»º¼ÍȺ"
Local1[ 11 ] := 0
Local1[ 16 ] := {}
Local1[ 13 ] := Arg2
Local1[ 14 ] := ""
Local1[ 15 ] := Arg4
Local1[ 17 ] := 0
Local1[ 18 ] := ""
Local1[ 19 ] := Arg1
Local1[ 20 ] := 0
endcase
return Local1
//---------------------------------------------------[top]-
// __RGADDITE( Arg1 )
//
function __RGADDITE( Arg1 )
if ( !( ISOBJECT( Arg1 ) ) )
elseif ( Arg1:classname() == "RADIOBUTTN" )
AAdd(qself()[ 16 ], Arg1)
qself()[ 11 ]++
endif
return qself()
//---------------------------------------------------[top]-
// __RGBOTTOM( Arg1 )
//
function __RGBOTTOM( Arg1 )
if ( !( ISNIL( Arg1 ) ) )
qself()[ 1 ] := _einstvar(qself(), "BOTTOM", Arg1, "N", 1001)
endif
return qself()[ 1 ]
//---------------------------------------------------[top]-
// __RGBUFFER( Arg1 )
//
function __RGBUFFER( Arg1 )
return qself()[ 2 ]
//---------------------------------------------------[top]-
// __RGCAPCOL( Arg1 )
//
function __RGCAPCOL( Arg1 )
if ( !( ISNIL( Arg1 ) ) )
qself()[ 4 ] := _einstvar(qself(), "CAPCOL", Arg1, "N", 1001)
endif
return qself()[ 4 ]
//---------------------------------------------------[top]-
// __RGCAPROW( Arg1 )
//
function __RGCAPROW( Arg1 )
if ( !( ISNIL( Arg1 ) ) )
qself()[ 5 ] := _einstvar(qself(), "CAPROW", Arg1, "N", 1001)
endif
return qself()[ 5 ]
//---------------------------------------------------[top]-
// __RGCAPTIO( Arg1 )
//
function __RGCAPTIO( Arg1 )
if ( !( ISNIL( Arg1 ) ) )
qself()[ 3 ] := _einstvar(qself(), "CAPTION", Arg1, "C", 1001)
endif
return qself()[ 3 ]
//---------------------------------------------------[top]-
// __RGCARGO( Arg1 )
//
function __RGCARGO( Arg1 )
if ( PCount() != 0 )
qself()[ 6 ] := Arg1
endif
return qself()[ 6 ]
//---------------------------------------------------[top]-
// __RGCOLDBO( Arg1 )
//
function __RGCOLDBO( Arg1 )
local Local1
if ( !( ISNIL( Arg1 ) ) )
qself()[ 7 ] := _einstvar(qself(), "COLDBOX", Arg1, "C", 1001, ;
{ |_1, _2| LTrim(Str(Len(_2))) $ "08" })
endif
return qself()[ 7 ]
//---------------------------------------------------[top]-
// __RGCOLORS( Arg1 )
//
function __RGCOLORS( Arg1 )
if ( !( ISNIL( Arg1 ) ) )
qself()[ 8 ] := _einstvar(qself(), "COLORSPEC", Arg1, "C", ;
1001, { |_1, _2| !Empty(__guicolor(Arg1, 3)) .AND. ;
Empty(__guicolor(Arg1, 4)) })
endif
return qself()[ 8 ]
//---------------------------------------------------[top]-
// __RGDELITE( Arg1 )
//
function __RGDELITE( Arg1 )
if ( Arg1 < 1 )
elseif ( Arg1 <= qself()[ 11 ] )
adel(qself()[ 16 ][ Arg1 ])
asize(qself()[ 16 ], --qself()[ 11 ])
endif
if ( !qself()[ 12 ] )
elseif ( qself()[ 11 ] < qself()[ 20 ] )
qself()[ 20 ] := qself()[ 11 ]
qself()[ 18 ] := qself()[ 16 ][ qself()[ 20 ] ]:data()
if ( ISNUMBER( qself()[ 2 ] ) )
qself()[ 2 ] := qself()[ 20 ]
else
qself()[ 2 ] := qself()[ 18 ]
endif
endif
return qself()
//---------------------------------------------------[top]-
// __RGDISPLA
//
function __RGDISPLA
local Local1, Local2, Local3, Local4 := SetColor(), Local5:= ;
Row(), Local6 := Col(), Local7, Local8, Local9, Local10, Local11
Local3 := qself()[ 16 ]
Local2 := qself()[ 11 ]
Local11 := msetcursor(.F.)
dispbegin()
if ( qself()[ 12 ] )
Local7 := qself()[ 10 ]
Local8 := qself()[ 7 ]
else
Local7 := qself()[ 7 ]
Local8 := qself()[ 10 ]
endif
set color to (__guicolor(qself()[ 8 ], 1))
if ( !Empty(Local7) )
@ qself()[ 19 ], qself()[ 13 ], qself()[ 1 ], qself()[ 15 ] ;
box Local7
elseif ( !Empty(Local8) )
@ qself()[ 19 ], qself()[ 13 ], qself()[ 1 ], qself()[ 15 ] ;
box Local8
endif
if ( !Empty(Local9 := qself()[ 3 ]) )
if ( ( Local10 := At("&", Local9) ) == 0 )
elseif ( Local10 == Len(Local9) )
Local10 := 0
else
Local9 := stuff(Local9, Local10, 1, "")
endif
set color to (__guicolor(qself()[ 8 ], 2))
SetPos(qself()[ 5 ], qself()[ 4 ])
?? Local9
if ( Local10 != 0 )
set color to (__guicolor(qself()[ 8 ], 3))
SetPos(qself()[ 5 ], qself()[ 4 ] + Local10 - 1)
?? SubStr(Local9, Local10, 1)
endif
endif
for Local1 := 1 to Local2
Local3[ Local1 ]:display()
next
dispend()
msetcursor(Local11)
set color to (Local4)
SetPos(Local5, Local6)
return qself()
//---------------------------------------------------[top]-
// __RGFBLOCK( Arg1 )
//
function __RGFBLOCK( Arg1 )
if ( PCount() == 0 )
elseif ( ISNIL( Arg1 ) )
qself()[ 9 ] := Arg1
else
qself()[ 9 ] := _einstvar(qself(), "FBLOCK", Arg1, "B", 1001)
endif
return qself()[ 9 ]
//---------------------------------------------------[top]-
// __RGGETACC( Arg1 )
//
function __RGGETACC( Arg1 )
local Local1, Local2, Local3
if ( ISNUMBER( Arg1 ) )
Arg1 := Chr(Arg1)
elseif ( !ValType(Arg1 == "C") )
return 0
endif
Local3 := qself()[ 16 ]
Local2 := Len(Local3)
Arg1 := Lower(Arg1)
for Local1 := 1 to Local2
if ( Local3[ Local1 ]:isaccel(Arg1) )
return Local1
endif
next
return 0
//---------------------------------------------------[top]-
// __RGGETITE( Arg1 )
//
function __RGGETITE( Arg1 )
local Local1 := Nil
if ( Arg1 < 1 )
elseif ( Arg1 <= qself()[ 11 ] )
Local1 := qself()[ 16 ][ Arg1 ]
endif
return Local1
//---------------------------------------------------[top]-
// __RGHASFOC
//
function __RGHASFOC
return qself()[ 12 ]
//---------------------------------------------------[top]-
// __RGHITTES( Arg1, Arg2 )
//
function __RGHITTES( Arg1, Arg2 )
local Local1, Local2, Local3 := qself()[ 16 ], Local4, Local5
Local2 := qself()[ 11 ]
do case
case Empty(qself()[ 7 ] + qself()[ 10 ])
case Arg1 == qself()[ 19 ]
if ( Arg2 == qself()[ 13 ] )
return -1
elseif ( Arg2 == qself()[ 15 ] )
return -3
elseif ( Arg2 >= qself()[ 13 ] .AND. Arg2 <= qself()[ 15 ] )
return -2
endif
case Arg1 == qself()[ 1 ]
if ( Arg2 == qself()[ 13 ] )
return -7
elseif ( Arg2 == qself()[ 15 ] )
return -5
elseif ( Arg2 >= qself()[ 13 ] .AND. Arg2 <= qself()[ 15 ] )
return -6
endif
case Arg2 == qself()[ 13 ]
if ( Arg1 >= qself()[ 19 ] .AND. Arg1 <= qself()[ 1 ] )
return -8
else
return 0
endif
case Arg2 == qself()[ 15 ]
if ( Arg1 >= qself()[ 19 ] .AND. Arg1 <= qself()[ 1 ] )
return -4
else
return 0
endif
endcase
Local4 := Len(qself()[ 3 ])
if ( ( Local5 := At("&", qself()[ 3 ]) ) == 0 )
elseif ( Local5 < Local4 )
Local4--
endif
do case
case Empty(qself()[ 3 ])
case Arg1 != qself()[ 5 ]
case Arg2 < qself()[ 4 ]
case Arg2 < qself()[ 4 ] + Local4
return -1025
endcase
do case
case Arg1 < qself()[ 19 ]
case Arg1 > qself()[ 1 ]
case Arg2 < qself()[ 13 ]
case Arg2 <= qself()[ 15 ]
for Local1 := 1 to Local2
if ( Local3[ Local1 ]:hittest(Arg1, Arg2) != 0 )
return Local1
endif
next
return -2049
endcase
return 0
//---------------------------------------------------[top]-
// __RGHOTBOX( Arg1 )
//
function __RGHOTBOX( Arg1 )
local Local1
if ( !( ISNIL( Arg1 ) ) )
qself()[ 10 ] := _einstvar(qself(), "HOTBOX", Arg1, "C", 1001, ;
{ |_1, _2| LTrim(Str(Len(_2))) $ "08" })
endif
return qself()[ 10 ]
//---------------------------------------------------[top]-
// __RGINSITE( Arg1, Arg2 )
//
function __RGINSITE( Arg1, Arg2 )
if ( !( ISOBJECT( Arg2 ) ) )
elseif ( !( Arg2:classname() == "RADIOBUTTN" ) )
elseif ( Arg1 < qself()[ 11 ] )
asize(qself()[ 16 ], ++qself()[ 11 ])
ains(qself()[ 16 ], Arg1)
qself()[ 16 ][ Arg1 ] := Arg2
endif
return qself()[ 16 ][ Arg1 ]
//---------------------------------------------------[top]-
// __RGITEMCO( Arg1 )
//
function __RGITEMCO( Arg1 )
return qself()[ 11 ]
//---------------------------------------------------[top]-
// __RGKILLFO
//
function __RGKILLFO
local Local1, Local2, Local3, Local4
if ( qself()[ 12 ] )
qself()[ 12 ] := .F.
if ( ISBLOCK( qself()[ 9 ] ) )
eval(qself()[ 9 ])
endif
Local3 := qself()[ 16 ]
Local2 := qself()[ 11 ]
Local4 := msetcursor(.F.)
dispbegin()
for Local1 := 1 to Local2
Local3[ Local1 ]:killfocus()
next
qself():display()
dispend()
msetcursor(Local4)
setcursor(qself()[ 17 ])
endif
return qself()
//---------------------------------------------------[top]-
// __RGLEFT( Arg1 )
//
function __RGLEFT( Arg1 )
if ( !( ISNIL( Arg1 ) ) )
qself()[ 13 ] := _einstvar(qself(), "LEFT", Arg1, "N", 1001)
endif
return qself()[ 13 ]
//---------------------------------------------------[top]-
// __RGMESSAG( Arg1 )
//
function __RGMESSAG( Arg1 )
if ( !( ISNIL( Arg1 ) ) )
qself()[ 14 ] := _einstvar(qself(), "MESSAGE", Arg1, "C", 1001)
endif
return qself()[ 14 ]
//---------------------------------------------------[top]-
// __RGNEXTIT
//
function __RGNEXTIT
local Local1, Local2
if ( !qself()[ 12 ] )
elseif ( qself()[ 11 ] > 0 )
if ( ( Local1 := qself()[ 20 ] ) == qself()[ 11 ] )
Local2 := 1
else
Local2 := Local1 + 1
endif
changebutt(qself(), Local1, Local2)
endif
return qself()
//---------------------------------------------------[top]-
// CHANGEBUTT( Arg1, Arg2, Arg3 )
//
static function CHANGEBUTT( Arg1, Arg2, Arg3 )
local Local1
if ( Arg2 != Arg3 )
Local1 := msetcursor(.F.)
dispbegin()
if ( Arg2 > 0 )
Arg1[ 16 ][ Arg2 ]:select(.F.)
Arg1[ 16 ][ Arg2 ]:display()
endif
if ( Arg3 > 0 )
Arg1[ 16 ][ Arg3 ]:select(.T.)
Arg1[ 16 ][ Arg3 ]:display()
endif
dispend()
msetcursor(Local1)
Arg1[ 20 ] := Arg3
Arg1[ 18 ] := Arg1[ 16 ][ Arg3 ]:data()
if ( ISNUMBER( Arg1[ 2 ] ) )
Arg1[ 2 ] := Arg3
else
Arg1[ 2 ] := Arg1[ 18 ]
endif
endif
return .T.
//---------------------------------------------------[top]-
// __RGPREVIT
//
function __RGPREVIT
local Local1, Local2
if ( !qself()[ 12 ] )
elseif ( qself()[ 11 ] > 0 )
if ( ( Local1 := qself()[ 20 ] ) == 0 )
Local2 := 1
elseif ( Local1 == 1 )
Local2 := qself()[ 11 ]
else
Local2 := Local1 - 1
endif
changebutt(qself(), Local1, Local2)
endif
return qself()
//---------------------------------------------------[top]-
// __RGSELECT( Arg1 )
//
function __RGSELECT( Arg1 )
local Local1, Local2, Local3 := ValType(Arg1)
if ( Local3 == "C" )
Local2 := qself()[ 11 ]
for Local1 := 1 to Local2
if ( qself()[ 16 ][ Local1 ]:data() == Arg1 )
default qself()[ 2 ] to ""
changebutt(qself(), qself()[ 20 ], Local1)
exit
endif
next
if ( Local1 > Local2 )
qself()[ 2 ] := Arg1
endif
elseif ( Local3 != "U" .AND. Arg1 < 1 )
elseif ( Local3 != "U" .AND. Arg1 <= qself()[ 11 ] )
default qself()[ 2 ] to 0
changebutt(qself(), qself()[ 20 ], Arg1)
endif
return qself()
//---------------------------------------------------[top]-
// __RGRIGHT( Arg1 )
//
function __RGRIGHT( Arg1 )
if ( !( ISNIL( Arg1 ) ) )
qself()[ 15 ] := _einstvar(qself(), "RIGHT", Arg1, "N", 1001)
endif
return qself()[ 15 ]
//---------------------------------------------------[top]-
// __RGSETCOL( Arg1 )
//
function __RGSETCOL( Arg1 )
local Local1, Local2, Local3 := qself()[ 16 ]
Local2 := qself()[ 11 ]
for Local1 := 1 to Local2
Local3[ Local1 ]:colorspec(Arg1)
next
return qself()
//---------------------------------------------------[top]-
// __RGSETFOC
//
function __RGSETFOC
local Local1, Local2, Local3, Local4
if ( !qself()[ 12 ] )
qself()[ 17 ] := setcursor(0)
qself()[ 12 ] := .T.
Local3 := qself()[ 16 ]
Local2 := qself()[ 11 ]
Local4 := msetcursor(.F.)
dispbegin()
for Local1 := 1 to Local2
Local3[ Local1 ]:setfocus()
next
qself():display()
dispend()
msetcursor(Local4)
if ( ISBLOCK( qself()[ 9 ] ) )
eval(qself()[ 9 ])
endif
endif
return qself()
//---------------------------------------------------[top]-
// __RGSETSTY( Arg1 )
//
function __RGSETSTY( Arg1 )
local Local1, Local2, Local3 := qself()[ 16 ]
Local2 := qself()[ 11 ]
for Local1 := 1 to Local2
Local3[ Local1 ]:style(Arg1)
next
return qself()
//---------------------------------------------------[top]-
// __RGTEXTVA( Arg1 )
//
function __RGTEXTVA( Arg1 )
return qself()[ 18 ]
//---------------------------------------------------[top]-
// __RGTOP( Arg1 )
//
function __RGTOP( Arg1 )
if ( !( ISNIL( Arg1 ) ) )
qself()[ 19 ] := _einstvar(qself(), "TOP", Arg1, "N", 1001)
endif
return qself()[ 19 ]
//---------------------------------------------------[top]-
// __RGTYPEOU
//
function __RGTYPEOU
return qself()[ 11 ] == 0 .OR. qself()[ 20 ] > qself()[ 11 ]
//---------------------------------------------------[top]-
// __RGVALUE( Arg1 )
//
function __RGVALUE( Arg1 )
return qself()[ 20 ]
//---EOF
Use your Browser's BACK button to return to Function Listings