Module: _radiob      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("RADIOBUTTN", 14)
   __classadd(Local1, "Display", "__rbDisplay")
   __classadd(Local1, "HitTest", "__rbHitTest")
   __classadd(Local1, "IsAccel", "__rbIsAccel")
   __classadd(Local1, "KillFocus", "__rbKillFocus")
   __classadd(Local1, "Select", "__rbSelect")
   __classadd(Local1, "SetFocus", "__rbSetFocus")
   __classadd(Local1, "Bitmaps", "__rbBitmaps")
   __classadd(Local1, "_Bitmaps", "__rbBitmaps")
   __classadd(Local1, "Buffer", "__rbBuffer")
   __classadd(Local1, "_Buffer", "__rbBuffer")
   __classadd(Local1, "CapRow", "__rbCapRow")
   __classadd(Local1, "_CapRow", "__rbCapRow")
   __classadd(Local1, "CapCol", "__rbCapCol")
   __classadd(Local1, "_CapCol", "__rbCapCol")
   __classadd(Local1, "Caption", "__rbCaption")
   __classadd(Local1, "_Caption", "__rbCaption")
   __classadd(Local1, "Cargo", "__rbCargo")
   __classadd(Local1, "_Cargo", "__rbCargo")
   __classadd(Local1, "Col", "__rbCol")
   __classadd(Local1, "_Col", "__rbCol")
   __classadd(Local1, "ColorSpec", "__rbColorSpec")
   __classadd(Local1, "_ColorSpec", "__rbColorSpec")
   __classadd(Local1, "Data", "__rbData")
   __classadd(Local1, "_Data", "__rbData")
   __classadd(Local1, "fBlock", "__rbfBlock")
   __classadd(Local1, "_fBlock", "__rbfBlock")
   __classadd(Local1, "HasFocus", "__rbHasFocus")
   __classadd(Local1, "_HasFocus", "__rbHasFocus")
   __classadd(Local1, "Row", "__rbRow")
   __classadd(Local1, "_Row", "__rbRow")
   __classadd(Local1, "sBlock", "__rbsBlock")
   __classadd(Local1, "_sBlock", "__rbsBlock")
   __classadd(Local1, "Style", "__rbStyle")
   __classadd(Local1, "_Style", "__rbStyle")
   return Local1

//---------------------------------------------------[top]-
//  RADIOBUTTO( Arg1, Arg2, Arg3, Arg4 )
//
function RADIOBUTTO( Arg1, Arg2, Arg3, Arg4 )

   local Local1, Local2, Local3 := array(2)
   if ( !( ISNUMBER( Arg1 ) ) )
      Local1 := Nil
   elseif ( !( ISNUMBER( Arg2 ) ) )
      Local1 := Nil
   else
      if ( ValType(Static1) != "N" )
         Static1 := define()
      endif
      Local1 := __classins(Static1)
      Local1[ 1 ] := .F.
      Local1[ 2 ] := Arg3
      Local1[ 6 ] := Arg2
      Local1[ 3 ] := Arg2 + 3 + 1
      Local1[ 4 ] := Arg1
      Local1[ 5 ] := Nil
      Local1[ 8 ] := Arg4
      Local1[ 9 ] := Nil
      Local1[ 10 ] := .F.
      Local1[ 11 ] := Arg1
      Local1[ 12 ] := Nil
      Local1[ 13 ] := "(* )"
      if ( isdefcolor() )
         Local1[ 7 ] := "W/N,W+/N,W+/N,N/W,W/N,W/N,W+/N"
      else
         Local2 := SetColor()
         Local1[ 7 ] := __guicolor(Local2, 5) + "," + ;
            __guicolor(Local2, 5) + "," + __guicolor(Local2, 2) + ;
            "," + __guicolor(Local2, 2) + "," + __guicolor(Local2, ;
            1) + "," + __guicolor(Local2, 1) + "," + ;
            __guicolor(Local2, 4)
      endif
      Local3[ 1 ] := "RADIO_F.BMU"
      Local3[ 2 ] := "RADIO_E.BMU"
      Local1[ 14 ] := Local3
   endif
   return Local1

//---------------------------------------------------[top]-
//  __RBBITMAP( Arg1 )
//
function __RBBITMAP( Arg1 )

   if ( !( ISNIL( Arg1 ) ) )
      qself()[ 14 ] := _einstvar(qself(), "BITMAPS", Arg1, "A", 1001, ;
         { |_1, _2| Len(Arg1) == 2 })
   endif
   return qself()[ 14 ]

//---------------------------------------------------[top]-
//  __RBBUFFER
//
function __RBBUFFER

   return qself()[ 1 ]

//---------------------------------------------------[top]-
//  __RBCAPCOL( Arg1 )
//
function __RBCAPCOL( Arg1 )

   if ( !( ISNIL( Arg1 ) ) )
      qself()[ 3 ] := _einstvar(qself(), "CAPCOL", Arg1, "N", 1001)
   endif
   return qself()[ 3 ]

//---------------------------------------------------[top]-
//  __RBCAPROW( Arg1 )
//
function __RBCAPROW( Arg1 )

   if ( !( ISNIL( Arg1 ) ) )
      qself()[ 4 ] := _einstvar(qself(), "CAPROW", Arg1, "N", 1001)
   endif
   return qself()[ 4 ]

//---------------------------------------------------[top]-
//  __RBCAPTIO( Arg1 )
//
function __RBCAPTIO( Arg1 )

   if ( !( ISNIL( Arg1 ) ) )
      qself()[ 2 ] := _einstvar(qself(), "CAPTION", Arg1, "C", 1001)
   endif
   return qself()[ 2 ]

//---------------------------------------------------[top]-
//  __RBCARGO( Arg1 )
//
function __RBCARGO( Arg1 )

   qself()[ 5 ] := Arg1
   return qself()[ 5 ]

//---------------------------------------------------[top]-
//  __RBCOL( Arg1 )
//
function __RBCOL( Arg1 )

   if ( !( ISNIL( Arg1 ) ) )
      qself()[ 6 ] := _einstvar(qself(), "COL", Arg1, "N", 1001)
   endif
   return qself()[ 6 ]

//---------------------------------------------------[top]-
//  __RBCOLORS( Arg1 )
//
function __RBCOLORS( Arg1 )

   if ( !( ISNIL( Arg1 ) ) )
      qself()[ 7 ] := _einstvar(qself(), "COLORSPEC", Arg1, "C", ;
         1001, { |_1, _2| !Empty(__guicolor(Arg1, 7)) .AND. ;
         Empty(__guicolor(Arg1, 8)) })
   endif
   return qself()[ 7 ]

//---------------------------------------------------[top]-
//  __RBDATA( Arg1 )
//
function __RBDATA( Arg1 )

   if ( PCount() == 0 )
   elseif ( ISNIL( Arg1 ) )
      qself()[ 8 ] := Arg1
   else
      qself()[ 8 ] := _einstvar(qself(), "DATA", Arg1, "C", 1001)
   endif
   if ( ISNIL( qself()[ 8 ] ) )
      return __caption(qself()[ 2 ])
   endif
   return qself()[ 8 ]

//---------------------------------------------------[top]-
//  __RBDISPLA
//
function __RBDISPLA

   local Local1 := SetColor(), Local2, Local3:= Row(), Local4:= ;
      Col(), Local5, Local6, Local7, Local8, Local9, Local10, ;
      Local11, Local12
   Local2 := qself()[ 13 ]
   Local12 := msetcursor(.F.)
   dispbegin()
   if ( qself()[ 10 ] )
      Local6 := __guicolor(qself()[ 7 ], 3)
      Local5 := __guicolor(qself()[ 7 ], 4)
      Local8 := __guicolor(qself()[ 7 ], 7)
   else
      Local6 := __guicolor(qself()[ 7 ], 1)
      Local5 := __guicolor(qself()[ 7 ], 2)
      Local8 := __guicolor(qself()[ 7 ], 6)
   endif
   if ( qself()[ 1 ] )
      set color to (Local5)
   else
      set color to (Local6)
   endif
   if ( !_isgraphic() )
      SetPos(qself()[ 11 ], qself()[ 6 ])
      ?? Left(Local2, 1)
      if ( qself()[ 1 ] )
         ?? SubStr(Local2, 2, 1)
      else
         ?? SubStr(Local2, 3, 1)
      endif
      ?? right(Local2, 1)
   else
      Local11 := qself()[ 14 ]
      if ( qself()[ 1 ] )
         Local10 := gbmpload(Local11[ 1 ])
      else
         Local10 := gbmpload(Local11[ 2 ])
      endif
      if ( ISNIL( Local10 ) )
      elseif ( !( ISNIL( Local10[ 1 ] ) ) .AND. !( ISNIL( ;
            Local10[ 2 ] ) ) )
         gbmpdisp(Local10, ( qself()[ 6 ] + 1 ) * 8, qself()[ 11 ] * ;
            gmode()[ 5 ])
      endif
   endif
   if ( !Empty(Local9 := qself()[ 2 ]) )
      if ( ( Local7 := At("&", Local9) ) == 0 )
      elseif ( Local7 == Len(Local9) )
         Local7 := 0
      else
         Local9 := stuff(Local9, Local7, 1, "")
      endif
      set color to (__guicolor(qself()[ 7 ], 5))
      SetPos(qself()[ 4 ], qself()[ 3 ])
      ?? Local9
      if ( Local7 != 0 )
         set color to (Local8)
         SetPos(qself()[ 4 ], qself()[ 3 ] + Local7 - 1)
         ?? SubStr(Local9, Local7, 1)
      endif
   endif
   dispend()
   msetcursor(Local12)
   set color to (Local1)
   SetPos(Local3, Local4)
   return qself()

//---------------------------------------------------[top]-
//  __RBFBLOCK( Arg1 )
//
function __RBFBLOCK( Arg1 )

   if ( PCount() == 0 )
   elseif ( ISNIL( Arg1 ) )
      qself()[ 9 ] := Arg1
   else
      qself()[ 9 ] := _einstvar(qself(), "FBLOCK", Arg1, "B", 1001)
   endif
   return qself()[ 9 ]

//---------------------------------------------------[top]-
//  __RBHASFOC( Arg1 )
//
function __RBHASFOC( Arg1 )

   return qself()[ 10 ]

//---------------------------------------------------[top]-
//  __RBHITTES( Arg1, Arg2 )
//
function __RBHITTES( Arg1, Arg2 )

   local Local1, Local2
   if ( Arg1 != qself()[ 11 ] )
   elseif ( Arg2 < qself()[ 6 ] )
   elseif ( Arg2 < qself()[ 6 ] + 3 )
      return -2049
   endif
   Local2 := Len(qself()[ 2 ])
   if ( ( Local1 := At("&", qself()[ 2 ]) ) == 0 )
   elseif ( Local1 < Local2 )
      Local2--
   endif
   if ( Arg1 != qself()[ 4 ] )
   elseif ( Arg2 < qself()[ 3 ] )
   elseif ( Arg2 < qself()[ 3 ] + Local2 )
      return -2049
   endif
   return 0

//---------------------------------------------------[top]-
//  __RBISACCE( Arg1 )
//
function __RBISACCE( Arg1 )

   local Local1, Local2, Local3
   if ( ISNUMBER( Arg1 ) )
      Arg1 := Chr(Arg1)
   elseif ( !( ISCHARACTER( Arg1 ) ) )
      return .F.
   endif
   Arg1 := Lower(Arg1)
   Local2 := qself()[ 2 ]
   if ( ( Local1 := At("&", Local2) ) == 0 )
   elseif ( ( Local3 := Lower(SubStr(Local2, Local1 + 1, 1)), Local1 ;
         < Len(Local2) .AND. Local3 == Arg1 ) )
      return .T.
   endif
   return .F.

//---------------------------------------------------[top]-
//  __RBKILLFO
//
function __RBKILLFO

   if ( qself()[ 10 ] )
      qself()[ 10 ] := .F.
      if ( ISBLOCK( qself()[ 9 ] ) )
         eval(qself()[ 9 ])
      endif
      qself():display()
   endif
   return qself()

//---------------------------------------------------[top]-
//  __RBROW( Arg1 )
//
function __RBROW( Arg1 )

   if ( !( ISNIL( Arg1 ) ) )
      qself()[ 11 ] := _einstvar(qself(), "ROW", Arg1, "N", 1001)
   endif
   return qself()[ 11 ]

//---------------------------------------------------[top]-
//  __RBSBLOCK( Arg1 )
//
function __RBSBLOCK( Arg1 )

   if ( PCount() == 0 )
   elseif ( ISNIL( Arg1 ) )
      qself()[ 12 ] := Arg1
   else
      qself()[ 12 ] := _einstvar(qself(), "SBLOCK", Arg1, "B", 1001)
   endif
   return qself()[ 12 ]

//---------------------------------------------------[top]-
//  __RBSELECT( Arg1 )
//
function __RBSELECT( Arg1 )

   local Local1 := qself()[ 1 ]
   if ( ISLOGICAL( Arg1 ) )
      qself()[ 1 ] := Arg1
   else
      qself()[ 1 ] := !qself()[ 1 ]
   endif
   if ( Local1 == qself()[ 1 ] )
   elseif ( ISBLOCK( qself()[ 12 ] ) )
      eval(qself()[ 12 ])
   endif
   return qself()

//---------------------------------------------------[top]-
//  __RBSETFOC
//
function __RBSETFOC

   if ( !qself()[ 10 ] .AND. ISBLOCK( ( qself()[ 10 ] := .T., ;
         qself():display(), qself()[ 9 ] ) ) )
      eval(qself()[ 9 ])
   endif
   return qself()

//---------------------------------------------------[top]-
//  __RBSTYLE( Arg1 )
//
function __RBSTYLE( Arg1 )

   if ( !( ISNIL( Arg1 ) ) )
      qself()[ 13 ] := _einstvar(qself(), "STYLE", Arg1, "C", 1001, { ;
         |_1, _2| LTrim(Str(Len(_2))) $ "04" })
   endif
   return qself()[ 13 ]

//---EOF


Use your Browser's BACK button to return to Function Listings