HwGUI 2.20 reference manual  
prev Alexander S.Kresin, October 2016 next


6. Classes
6.1. Introduction

This section describes all of the classes that make up the HwGUI. In the description of the classes I omitted the variables that are used only for the internal needs of the class methods. Redefine() methods also omitted as outdated and not recommended for use.


6.2. Class hierarchy

The following schema illustrates the hierarchy of classes, currently implemented in HwGUI.


HObject

It is a base class for all HwGUI classes.

DATA
     cargo
   

HScrollArea

It is a base class for windows (HWindow), currently it is implemented in WinAPI version only.


HCustomWindow

Do not create instances of HCustomWindow. It serves as a base class for all windows and controls. In other words, HCustomWindow provide basic variables and methods, which are inherited by all windows and controls. Every subclass adds its own variables and methods, modifies inherited, if needed, and use others as is.

DATA
     CLASS VAR oDefaultParent
     handle                       - handle of a GUI element
     oParent                      - an object of a parent window or control
     title                        - 
     type 
     nTop, nLeft                  - coordinates of a top left corner
     nWidth, nHeight              - a size: width and height
     tcolor, bcolor               - text and background color, respectively,
     brush
     style                        - WinAPI style
     extstyle                     - extended WinAPI style
     lHide                        - .T., if the element is hidden
     oFont                        - a font, an object of HFont class
     aEvents, aNotify 
     aControls                    - an array with controls objects, belonged to this
                                    window or container
     bInit                        - codeblock, performed during initialization
     bDestroy                     - codeblock, performed during destroying
     bSize                        - codeblock, performed when a size is changed
     bPaint                       - codeblock, which paints the element
     bGetFocus                    - codeblock, executed when it receives focus
     bLostFocus                   - codeblock, executed when it looses focus
     bOther                       - codeblock, executed for all messages
     HelpId 
     nHolder
   
METHODS
     AddControl( oCtrl ) 
     DelControl( oCtrl ) 
     AddEvent( nEvent,nId,bAction,lNotify )
     FindControl( nId,nHandle )
     Hide()
     Show()
     Move( x1,y1,width,height )
     SetColor( tcolor, bColor, lRepaint )
     onEvent( msg, wParam, lParam )
     End()
   

HWindow

It is a base class for all windows and dialogs, do not create instances of it.

DATA
      CLASS VAR aWindows 
      CLASS VAR szAppName 
      CLASS VAR aKeysGlobal
      menu, oPopup, hAccel 
      oIcon, oBmp 
      lUpdated                    - .F., if any of GET items is changed
      lClipper 
      GetList 
      KeyList 
      nLastKey 
      bCloseQuery
      bActivate                   - codeblock, performed one time while window activation
      tColorinFocus               - text color for an Edit control, which has focus
      bColorinFocus               - background color for an Edit control, which has focus
      aOffset
      oEmbedded
      bScroll                     - codeblock, performed during window scrolling
   
METHODS
      New( oIcon, clr, nStyle, x, y, width, height, cTitle, cMenu, nPos,
         oFont, bInit, bExit, bSize, bPaint, bGfocus, bLfocus, bOther,
         cAppName, oBmp, cHelp, nHelpId,bCloseQuery ) 
      AddItem( oWnd ) 
      DelItem( oWnd ) 
      FindWindow( hWnd )          - Seeking a window by the handle, returns a window object
      GetMain()                   - returns a main window object
      Center()                    - moves the window in the center of the screen
      Restore()                   - restores the normal window size
      Maximize()                  - expands window to full screen
      Minimize()                  - minimizes window
      SetTitle( cTitle )          - set a new window title
      Close()                     - closes windows, deletes it with all controls
   

HMainWindow

A class of a main window. the corresponding command: INIT WINDOW MAIN

DATA
      CLASS VAR aMessages 
      nMenuPos 
      oNotifyIcon, bNotify, oNotifyMenu 
      lTray
   
METHODS
      New( lType, oIcon, clr, nStyle, x, y, width, height, cTitle, cMenu, nPos, 
         oFont, bInit, bExit, bSize, bPaint, bGfocus, bLfocus, bOther, 
         cAppName, oBmp, cHelp, nHelpId, bCloseQuery, bColor, nExclude ) 
      Activate( lShow, lMaximized,           - Activates a window, the corresponding
         lMinimized, lCentered, bActivate )    command: ACTIVATE WINDOW
      onEvent( msg, wParam, lParam ) 
      InitTray( oNotifyIcon, bNotify, oNotifyMenu ) 
      GetMdiActive()                         - returns an active MDI child window object
   

HMDIChildWindow

A class of a MDI child window. the corresponding command: INIT WINDOW MDICHILD

DATA
      CLASS VAR aMessages 
   
METHODS
      New( oIcon, clr, nStyle, x, y, width, height, cTitle, cMenu, oFont,
         bInit, bExit, bSize, bPaint, bGfocus, bLfocus, bOther,
         cAppName, oBmp, cHelp, nHelpId, bCloseQuery, bColor )
      Activate( lShow, lMaximized, lMinimized, lCentered, bActivate )
      onEvent( msg, wParam, lParam )
   

HDialog

A class of a dialog window. the corresponding command: INIT DIALOG

DATA
      CLASS VAR aDialogs 
      CLASS VAR aModalDialogs 
      lModal          - if .T. the dialog is modal
      lResult
      lClipper        - if .T., ENTER allows to move between GET items
      lExitOnEnter
      lExitOnEsc
      lClosable
      nInitState
   
METHODS
     New( lType, nStyle, x, y, width, height, cTitle, bInit, bExit, bSize, 
         bPaint, bGfocus, bLfocus, bOther, lClipper, oBmp, oIcon, lExitOnEnter, nHelpId,
         xResourceID, lExitOnEsc, bColor, lNoClosable )
     Activate( lNoModal, lMaximized, lMinimized, lCentered, bActivate )
     onEvent( msg, wParam, lParam ) 
     AddItem() 
     DelItem() 
     FindDialog( hWnd ) 
     GetActive() 
     Close()
   

HControl
DATA
      id 
      objName
      tooltip 
      lInit
      Anchor
   
METHODS
      New( oWndParent,nId,nStyle,nLeft,nTop,nWidth,nHeight,oFont,bInit, 
         bSize,bPaint,ctoolt,tcolor,bcolor ) 
      Init() 
      NewId() 
      Disable() 
      Enable() 
      Enabled() 
      SetFocus() 
      GetText() 
      SetText( c )
      Refresh()
      End()
   

HBrowse
DATA
      winclass
      active
      lChanged

      lDispHead                   - Should I display headers ?
      lDispSep                    - Should I display separators ?

      lBuffering

      aColumns                    - HColumn's array
      aColAlias
      aRelation

      nRowHeight INIT 0                      // Predefined height of a row
      nRowTextHeight                         // A max text height in a row

      rowCount                    - Number of visible data rows
      rowPos                      - Current row position
      rowCurrCount                - Current number of rows
      colPos                      - Current column position
      nColumns                    -  Number of visible data columns
      nLeftCol                    - Leftmost column
      freeze                      - Number of columns to freeze
      nRecords                    - Number of records in browse
      nCurrent
      aArray
      recCurr
      headColor                   - Header text color
      sepColor                    - Separators color
      oPenSep, oPenHdr, oPen3d
      lSep3d
      aPadding
      aHeadPadding
      lInFocus
      tcolorSel, bcolorSel, brushSel, htbColor, httColor
      bSkip, bGoTo, bGoTop, bGoBot, bEof, bBof
      bRcou, bRecno, bRecnoLog
      bPosChanged, bLineOut, 
      bScrollPos, bHScrollPos
      bEnter, bKeyDown, bUpdate
      bRClick
      alias                       - Alias name of browsed database
      x1,y1,x2,y2,width,height
      lEditable
      lAppable
      lAppMode
      lAutoEdit
      lUpdated
      lAppended
      lAdjRight                   - Adjust last column to right
      nHeadRows                   - Rows in header
      nFootRows                   - Rows in footer
      lResizing
      lCtrlPress
      aSelected
      nPaintRow, nPaintCol        - Row/Col being painted
   
METHODS
      New( lType, oWndParent, nId, nStyle, nLeft, nTop, nWidth, nHeight, oFont ; 
         bInit, bSize, bPaint, bEnter, bGfocus, bLfocus, lNoVScroll, lNoBorder, 
         lAppend, lAutoedit, bUpdate, bKeyDown, bPosChg, lMultiSelect, bRClick )
      InitBrw( nType ) 
      Rebuild() 
      Activate() 
      onEvent( msg, wParam, lParam ) 
      FindBrowse( nId ) 
      AddColumn( oColumn ) 
      InsColumn( oColumn,nPos ) 
      DelColumn( nPos ) 
      Paint() 
      DrawHeader( hDC, nColumn, x1, y1, x2, y2 )
      LineOut() 
      HeaderOut( hDC ) 
      FooterOut( hDC ) 
      SetColumn( nCol ) 
      DoHScroll( wParam ) 
      DoVScroll( wParam ) 
      LineDown( lMouse ) 
      LineUp() 
      PageUp() 
      PageDown() 
      Bottom() 
      Top()
      Home()
      ButtonDown( lParam ) 
      ButtonRDown( lParam ) 
      ButtonUp( lParam ) 
      ButtonDbl( lParam ) 
      MouseMove( wParam, lParam ) 
      MouseWheel( nKeys, nDelta, nXPos, nYPos ) 
      Edit( wParam,lParam ) 
      Append() 
      RefreshLine() 
      Refresh() 
      ShowSizes() 
      End()
   

HPanel
DATA
      winclass
      oEmbedded
      bScroll
      oStyle
      aPaintCB                    - Array of items to draw
   
METHODS
     New( oWndParent, nId, nStyle, nLeft, nTop, nWidth, nHeight, 
         bInit, bSize, bPaint, bColor ) 
     Activate() 
     onEvent( msg, wParam, lParam ) 
     DrawItems( hDC, aCoors )
     Paint() 
     Hide()
     Show()
     SetPaintCB( nId, block, cId )
   

HPanelSts
DATA
      aParts
      aText
   
METHODS
      Write( cText, nPart, lRedraw )
      PaintText( hDC )
   

HOwnerButton
DATA
     CLASS VAR cPath SHARED
     winclass 
     lFlat
     aStyle
     state 
     bClick 
     lPress 
     lCheck
     text, tfont, xt, yt, widtht, heightt 
     oBitmap, xb, yb, widthb, heightb, lTransp, trColor
     lEnabled
     nOrder
   
METHODS
     New( oWndParent, nId, nStyle, nLeft, nTop, nWidth, nHeight,
         bInit, bSize, bPaint, bClick, lflat,
         cText, color, font, xt, yt, widtht, heightt,
         bmp, lResour, xb, yb, widthb, heightb, lTr, trColor,
         cTooltip, lEnabled, lCheck )
     Activate() 
     onEvent( msg, wParam, lParam ) 
     Init() 
     Redefine( oWndParent,nId,bInit,bSize,bPaint,bClick,lflat, 
         cText,color,font,xt,yt,widtht,heightt, 
         bmp,lResour,xb,yb,widthb,heightb,lTr, 
         cTooltip,lEnabled )
     Paint() 
     DrawItems( hDC )
     MouseMove( wParam, lParam ) 
     MDown() 
     MUp() 
     Press() 
     Release() 
     End()
     Enable()
     Disable()
   

HSplitter
DATA
      winclass 
      aLeft 
      aRight 
      lVertical
      lRepaint
      nFrom, nTo
      hCursor 
      lCaptured, lMoved 
      bEndDrag
   
METHODS
      New( oWndParent, nId, nLeft, nTop, nWidth, nHeight,
         bSize, bPaint, color, bcolor, aLeft, aRight, nFrom, nTo )
      Activate() 
      onEvent( msg, wParam, lParam ) 
      Init() 
      Paint( lpdis ) 
      Drag( lParam ) 
      DragAll()
   

HStatus
DATA
      CLASS VAR winclass 
      aParts
   
METHODS
     New( oWndParent, nId, nStyle, aParts, bInit, bSize, bPaint ) 
     Activate() 
     Init()
     SetText( cText,nPart )
   

HStatic
DATA
     CLASS VAR winclass
     nStyleDraw
   
METHODS
     New( oWndParent, nId, nStyle, nLeft, nTop, nWidth, nHeight, cCaption, oFont,
        bInit, bSize, bPaint, ctoolt, tcolor, bcolor, lTransp ) 
     Activate() 
     Init()
     Paint( lpDis )
   

HStaticLink
DATA
      state
      m_bFireChild
      m_hHyperCursor
      m_bMouseOver
      m_bVisited
      m_oTextFont
      m_csUrl
      dc
      dwFlags

      m_sHoverColor
      m_sLinkColor
      m_sVisitedColor
   
METHODS
      New( oWndParent, nId, nStyle, nLeft, nTop, nWidth, nHeight, cCaption, oFont, bInit,
         bSize, bPaint, ctooltip, tcolor, bcolor, lTransp, cLink, vColor, lColor, hColor )
     Activate() 
     Init()
     onEvent( msg, wParam, lParam )
     GoToLinkUrl( csLink )
     SetLinkUrl( csUrl )
     GetLinkUrl()
     SetVisitedColor( sVisitedColor )
     SetHoverColor( cHoverColor )
     SetFireChild( lFlag )
     OnClicked()
     SetLinkColor( sLinkColor )
     Paint()
     OnMouseMove( nFlags, point )
   

HButton
DATA
     CLASS VAR winclass
     bClick
   
METHODS
     New( oWndParent, nId, nStyle, nLeft, nTop, nWidth, nHeight, cCaption, oFont, 
         bInit, bSize, bPaint, bClick, ctoolt, tcolor, bcolor ) 
     Activate() 
     Init()
   

HEdit
DATA
     CLASS VAR winclass 
     lMultiLine 
     cType 
     bSetGet 
     bValid 
     cPicFunc, cPicMask 
     lPicComplex 
     lFirst 
     lChanged 
     lNoPaste
     nMaxLength
     bkeydown, bkeyup, bchange
     aColorOld
     bColorBlock
   
METHODS
     New( oWndParent, nId, vari, bSetGet, nStyle, nLeft, nTop, nWidth, nHeight, ;
        oFont, bInit, bSize, bGfocus, bLfocus, ctooltip, ;
        tcolor, bcolor, cPicture, lNoBorder, nMaxLength, lPassword, bKeyDown, bChange )
     Activate() 
     onEvent( msg, wParam, lParam ) 
     Init() 
     Refresh()
     Value( xValue ) SETGET
     SelStart( nStart ) SETGET
     SelLength( nLength ) SETGET
     ParsePict( cPicture, vari )
   

HCheckButton
DATA
     CLASS VAR winclass 
     bSetGet 
     lValue
     bClick
   
METHODS
     New( oWndParent, nId, vari, bSetGet,nStyle, nLeft, nTop, nWidth, nHeight,
        cCaption, oFont, bInit, bSize, bPaint, bClick, ctoolt, tcolor, bcolor,
        bGFocus, lTransp, bLFocus ) 
     Activate() 
     Init() 
     Refresh() 
     Disable() 
     Enable()
     Value( lValue ) SETGET
   

HRadioButton
DATA
     CLASS VAR winclass 
     oGroup
     bClick
   
METHODS
     New( oWndParent, nId, nStyle, nLeft, nTop, nWidth, nHeight, cCaption, oFont, 
         bInit, bSize, bPaint, bClick, ctoolt, tcolor, bcolor, lTransp ) 
     Activate()
     Value( lValue ) SETGET
   

HCombobox
DATA
     CLASS VAR winclass 
     aItems 
     bSetGet 
     xValue 
     bValid
     bChangeSel 
     lText 
     lEdit
     nDisplay
   
METHODS
     New( oWndParent, nId, vari, bSetGet, nStyle, nLeft, nTop, nWidth, nHeight, aItems, 
         bInit, bSize, bPaint, bChange, cTooltip, lEdit, lText, bGFocus, tcolor,
         bcolor, bValid, nDisplay )
     Activate()
     Init( aCombo, nCurrent )
     Refresh( xVal )
     Setitem( nPos )
     GetValue( nItem )
     Value ( xValue ) SETGET
   

HGroup
DATA
     CLASS VAR winclass
   
METHODS
     New( oWndParent, nId, nStyle, nLeft, nTop, nWidth, nHeight, cCaption, oFont, 
         bInit, bSize, bPaint, tcolor, bcolor ) 
     Activate()
   

HLine
DATA
     CLASS VAR winclass 
     lVert 
     oPenLight, oPenGray
   
METHODS
     New( oWndParent, nId, lVert, nLeft, nTop, nLength, bSize ) 
     Activate() 
     Paint()
   

HSayImage
DATA
     CLASS VAR winclass
     oImage
     bClick, bDblClick
   
METHODS
     New( oWndParent, nId, nLeft, nTop, nWidth, nHeight, bInit,
        bSize, ctoolt, bClick, bDblClick, bColor )
     Activate()
     End()
     onClick()
     onDblClick()
   

HSayBmp
DATA
     nOffsetV
     nOffsetH
     nZoom
     lTransp, trcolor
     nStretch
   
METHODS
     New( oWndParent, nId, nLeft, nTop, nWidth, nHeight, Image, lRes, bInit, 
        bSize, ctoolt, bClick, bDblClick, lTransp, nStretch, trcolor, bColor )
     Paint( lpdis )
     ReplaceBitmap( Image, lRes )
     Refresh()
   

HSayIcon
METHODS
     New( oWndParent, nId, nLeft, nTop, nWidth, nHeight, Image, lRes, bInit, 
        bSize, ctoolt, lOEM, bClick, bDblClick ) 
     Init()
     Refresh()
   

HSayFImage
DATA
     nOffsetV
     nOffsetH
     nZoom
   
METHODS
     New( oWndParent, nId, nLeft, nTop, nWidth, nHeight, Image, lRes, bInit, 
        bSize, ctoolt, cType ) 
     Paint( lpdis )
     ReplaceImage( Image, cType )
     Refresh()
   

HDatePicker
DATA
      CLASS VAR winclass 
      bSetGet 
      value 
      bChange
   
METHODS
      New( oWndParent, nId, vari, bSetGet, nStyle, nLeft, nTop, nWidth, nHeight,
         oFont, bInit, bGfocus, bLfocus, ctoolt, tcolor, bcolor ) 
      Activate() 
      Init() 
      Refresh()
      Value ( dValue ) SETGET
   

HUpDown
DATA
      CLASS VAR winclass 
      bSetGet 
      nValue 
      hUpDown, idUpDown, styleUpDown 
      nLower 
      nUpper 
      nUpDownWidth 
      lChanged
   
METHODS
      New( oWndParent, nId, vari,bSetGet, nStyle, nLeft, nTop, nWidth, nHeight,
         oFont, bInit, bSize, bPaint, bGfocus, bLfocus, ctoolt, tcolor, bcolor,
         nUpDWidth, nLower, nUpper ) 
      Activate() 
      Init() 
      Refresh()
      Value( nValue ) SETGET
      SetRange( n1, n2 )
      Hide()
      Show()
   

HTab
DATA
      CLASS VAR winclass 
      aTabs 
      aPages 
      bChange,bChange2 
      hIml, aImages, Image1, Image2 
      oTemp 
      bAction
   
METHODS
      New( oWndParent, nId, nStyle, nLeft, nTop, nWidth, nHeight, oFont, bInit,
         bSize, bPaint, aTabs, bChange, aImages, lResour, nBC, bClick, bGetFocus,
         bLostFocus ) 
      Activate()
      Init()
      onEvent( msg, wParam, lParam )
      SetTab( n )
      StartPage( cname )
      EndPage()
      ChangePage( nPage )
      DeletePage( nPage )
      HidePage( nPage )
      ShowPage( nPage )
      GetActivePage( nFirst,nEnd )
      Notify( lParam )
   

HTree
DATA
      CLASS VAR winclass 
      aItems 
      oSelected 
      himl,aImages,Image1,Image2 
      bItemChange, bExpand, bRClick, bDblClick, bAction 
      lEmpty
   
METHODS
      New( oWndParent, nId, nStyle, nLeft, nTop, nWidth, nHeight, oFont,
         bInit, bSize, color, bcolor, aImages, lResour, lEditLabels, bAction, nBC )
      Activate()
      Init()
      AddNode( cTitle, oPrev, oNext, bAction, aImages )
      FindChild( handle )
      GetSelected()
      EditLabel( oNode )
      Expand( oNode )
      Select( oNode )
      Clean()
      Notify( lParam )
      End()
   

HMonthCalendar
DATA
      CLASS VAR winclass 
      dValue 
      bChange
   
METHODS
      New( oWndParent, nId, vari, nStyle, nLeft, nTop, nWidth, nHeight, 
         oFont, bInit, bChange, cTooltip, lNoToday, lNoTodayCircle, lWeekNumbers ) 
      Activate() 
      Init()
      Value( dValue ) SETGET
   

HListbox
DATA
      CLASS VAR winclass 
      aItems 
      bSetGet 
      value 
      bChangeSel
      bkeydown, bDblclick
      bValid
   
METHODS
      New( oWndParent, nId, vari, bSetGet, nStyle, nLeft, nTop, nWidth, nHeight,
         aItems, oFont, bInit, bSize, bPaint, bChange, cTooltip, tColor, bcolor,
         bGFocus, bLFocus, bKeydown, bDblclick, bOther ) 
      Activate() 
      Init( aListbox, nCurrent ) 
      Refresh() 
      Requery()
      Setitem( nPos )
      AddItems( p )
      DeleteItem( nPos )
      Valid( oCtrl )
      When( oCtrl )
      onChange( oCtrl )
      onDblClick()
      Clear()
      onEvent( msg, wParam, lParam )
   

HTrackBar
DATA
      CLASS VAR winclass 
      nValue 
      bChange 
      bThumbDrag 
      nLow 
      nHigh 
      hCursor
   
METHODS
      New( oWndParent, nId, vari, nStyle, nLeft, nTop, nWidth, nHeight, bInit,
         bSize, bPaint, cTooltip, bChange, bDrag, nLow, nHigh, lVertical,
         TickStyle, TickMarks ) 
      Activate() 
      onEvent( msg, wParam, lParam ) 
      Init() 
      Value( nValue ) SETGET
      GetNumTics()
   

HAnimation
DATA
      CLASS VAR winclass 
      cFileName
      xResID
   
METHODS
      New( oWndParent, nId, nStyle, nLeft, nTop, nWidth, nHeight, 
         cFilename, lAutoPlay, lCenter, lTransparent, xResID )
      Activate() 
      Init() 
      Open( cFileName ) 
      Play( nFrom, nTo, nRep ) 
      Seek( nFrame ) 
      Stop() 
      Close() 
      Destroy()
   

HGrid
DATA
      CLASS VAR winclass 
      aBitMaps
      ItemCount
      color
      bkcolor
      aColumns
      nRow
      nCol

      lNoScroll
      lNoBorder
      lNoLines
      lNoHeader

      bEnter
      bKeyDown
      bPosChg
      bDispInfo

      bGfocus
      bLfocus
   
METHODS
      New( oWnd, nId, nStyle, x, y, width, height, oFont, bInit, bSize, bPaint, bEnter,
               bGfocus, bLfocus, lNoScroll, lNoBord, bKeyDown, bPosChg, bDispInfo,
               nItemCount, lNoLines, color, bkcolor, lNoHeader, aBit )
      Activate() 
      Init() 
      AddColumn( cHeader, nWidth, nJusHead, nBit )
      Refresh()
      RefreshLine()
      SetItemCount( nItem )
      Row()
      Notify( lParam )
   

HToolBar
DATA
      Name
      id
      nBitIp
      bState
      bStyle
      tooltip
      aMenu
      hMenu
      Title
      bClick
      oParent
   
METHODS
      New( oParent, cName, nBitIp, nId, bState, bStyle, cText, bClick, ctip, aMenu )
      Enable()
      Disable()
      Show()
      Hide()
      Enabled( lEnabled ) SETGET
      Checked( lCheck ) SETGET
      Pressed( lPressed ) SETGET
      onClick()
      Caption( cText ) SETGET
   

HGraph
DATA
      aValues
      aSignX, aSignY
      nGraphs
      nType
      lGridX
      lGridY
      lGridXMid
      lPositive
      x1Def
      x2Def
      y1Def
      y2Def
      scaleX, scaleY
      ymaxSet
      tbrush
      colorCoor
      oPen, oPenCoor
   
METHODS
      New( oWndParent, nId, aValues, nLeft, nTop, nWidth, nHeight, oFont,
           bSize, ctooltip, tcolor, bcolor )
      Activate()
      Init()
      CalcMinMax()
      Paint()
      Rebuild( aValues )
   

HPager
DATA
      CLASS DATA oSelected INIT Nil
      winclass
      TEXT, id, nTop, nLeft, nwidth, nheight
      ExStyle
      bClick
      lVert
      hTool
      m_nWidth, m_nHeight
   
METHODS
      New( oWndParent, nId, nStyle, nLeft, nTop, nWidth, nHeight, cCaption, oFont,
         bInit, bSize, bPaint, ctooltip, tcolor, bcolor, lVert )
      SetScrollArea( nWidth, nHeight )
      Activate()
      Init()
      Notify( lParam )
      Pagersetchild( b )
      Pagerrecalcsize()
      Pagerforwardmouse( b )
      Pagersetbkcolor( b )
      Pagergetbkcolor()
      Pagersetborder( b )
      Pagergetborder()
      Pagersetpos( b )
      Pagergetpos()
      Pagersetbuttonsize( b )
      Pagergetbuttonsize()
      Pagergetbuttonstate()
   

HRebar
DATA
      CLASS DATA oSelected
      winclass
      TEXT, id, nTop, nLeft, nwidth, nheight
      ExStyle
      bClick
      lVert
      hTool
      m_nWidth, m_nHeight
      aBands
   
METHODS
      New( oWndParent, nId, nStyle, nLeft, nTop, nWidth, nHeight, cCaption,
         oFont, bInit, bSize, bPaint, ctooltip, tcolor, bcolor, lVert )
      Activate()
      Init()
      ADDBARColor( pBar, clrFore, clrBack, pszText, dwStyle )
      Addbarbitmap( pBar, pszText, pbmp, dwStyle )
      RebarBandNew( pBar, pszText, clrFore, clrBack, pbmp, dwStyle )
      CreateBands( pBar, pszText, clrFore, clrBack, pbmp, dwStyle )
   

HCEdit
DATA
      CLASS VAR winclass  INIT "TEDIT"
      hEdit
      cFileName
      aText, nTextLen
      nMaxLines
      cp, cpSource
      lUtf8
      aWrap, nLinesAll
      nDocFormat
      nDocOrient
      aDocMargins
      nKoeffScr

      lShowNumbers
      lReadOnly
      lUpdated
      lInsert
      lNoPaste

      nShiftL
      nBoundL
      nBoundR
      nBoundT
      nMarginL
      nMarginR
      nMarginT
      nMarginB

      n4Number
      n4Separ
      bColorCur
      tcolorSel
      bcolorSel
      nClrDesk
      nAlign
      nIndent
      nDefFont

      nLineF
      nPosF
      aLines, nLines, nLineC, nPosC

      nWCharF
      nWSublF
      aFonts
      aFontsPrn
      oPenNum

      nCaret
      lChgCaret
      lSetFocus
      bChangePos, bKeyDown, bClickDoub
      bAfter

      lMDown
      aPointC, aPointM1, aPointM2

      nTabLen
      lStripSpaces
      lVScroll
      nClientWidth
      nDocWidth

      nMaxUndo
      aUndo

      oHili
   
METHODS
      New( oWndParent, nId, nStyle, nLeft, nTop, nWidth, nHeight, oFont,
         bInit, bSize, bPaint, tcolor, bcolor, bGfocus, bLfocus, lNoVScroll, lNoBorder )
      Open( cFileName, cPageIn, cPageOut )
      Activate()
      Init()
      SetHili( xGroup, oFont, tColor, bColor )
      onEvent( msg, wParam, lParam )
      Paint( lReal )
      PaintLine( hDC, yPos, nLine, lUse_aWrap )
      MarkLine( nLine, lReal, nSubLine )
      End()
      Convert( cPageIn, cPageOut )
      SetText( xText, cPageIn, cPageOut )
      SAVE( cFileName )
      AddFont( oFont, name, width, height , weight,
         CharSet, Italic, Underline, StrikeOut )
      SetFont( oFont )
      SetCaretPos( nType, p1, p2 )
      onKeyDown( nKeyCode, lParam, nCtrl )
      PutChar( nKeyCode )
      LineDown()
      LineUp()
      PageDown()
      PageUp()
      Top()
      Bottom()
      GOTO( nLine )
      onVScroll( wParam )
      PCopy( Psource, Pdest )
      PCmp( P1, P2 )
      GetText( P1, P2 )
      InsText( aPoint, cText, lOver, lChgPos )
      DelText( P1, P2, lChgPos )
      AddLine( nLine )
      DelLine( nLine )
      Refresh()
      SetWrap( lWrap, lInit )
      SetPadding( nValue )
      SetBorder( nThick, nColor )
      Highlighter( oHili )
      Scan()
      Undo( nLine1, nPos1, nLine2, nPos2, nOper, cText )
      Print( nDocFormat, nDocOrient, nMarginL, nMarginR, nMarginT, nMarginB )
      PrintLine( oPrinter, yPos, nL )
   

HColumn
DATA
      block
      heading
      footing
      width
      type
      length
      dec
      nJusHead, nJusLin 
      tcolor, bcolor, brush 
      lEditable 
      aList 
      oStyleHead               - An HStyle object to draw the header
      aPaintCB                 - An array with codeblocks to paint column items
      aBitmaps 
      bValid,bWhen 
      bEdit 
      Picture
      cGrid 
      lSpandHead 
      lSpandFoot 
      bHeadClick
      bColorBlock
   
METHODS
     New( cHeading, block, type, length, dec, lEditable, nJusHead, nJusLin,
        cPict, bValid, bWhen, aItem, bColorBlock, bHeadClick )
     SetPaintCB( nId, block, cId )
   

HRadioGroup
DATA
      CLASS VAR oGroupCurrent 
      aButtons 
      nValue 
      bSetGet
      oHGroup
   
METHODS
      New( vari,bSetGet )
      NewRg( oWndParent, nId, nStyle, vari, bSetGet, nLeft, nTop, nWidth, nHeight,
         cCaption, oFont, bInit, bSize, tcolor, bColor )
      EndGroup( nSelected )
      Value( nValue ) SETGET
      Refresh()
   

HFont
DATA
     CLASS VAR aFonts 
     handle 
     name, width, height ,weight 
     charset, italic, Underline, StrikeOut 
     nCounter
   
METHODS
      Add( fontName, nWidth, nHeight ,fnWeight, fdwCharSet, fdwItalic,
         fdwUnderline, fdwStrikeOut, nHandle )
      Select( oFont )
      SetFontStyle( lBold, nCharSet, lItalic, lUnder, lStrike, nHeight )
      Release()
   

HPen
DATA
     CLASS VAR aPens 
     handle 
     style, width, color 
     nCounter
   
METHODS
      Add( style, width, color )
      Get( nStyle,nWidth,nColor )
      Release()
   

HBrush
DATA
     CLASS VAR aBrushes 
     handle 
     color 
     nHatch 
     nCounter
   
METHODS
      Add( color,nHatch )
      Release()
   

HBitmap
DATA
     CLASS VAR cPath SHARED
     CLASS VAR lSelFile
     CLASS VAR aBitmaps 
     handle 
     name 
     nFlags
     nWidth, nHeight 
     nCounter
   
METHODS
      AddResource( name, nFlags, lOEM, nWidth, nHeight )
      AddStandard( nId )
      AddFile( name, hDC, lTranparent, nWidth, nHeight )
      AddString( name, cVal )
      AddWindow( oWnd,lFull )
      Draw( hDC, x1, y1, width, height )
      Release()
   

HIcon
DATA
      CLASS VAR cPath SHARED
      CLASS VAR aIcons 
      CLASS VAR lSelFile
      handle 
      name 
      nWidth, nHeight
      nCounter
   
METHODS
      AddResource( name, nWidth, nHeight, nFlags, lOEM )
      AddFile( name, nWidth, nHeight )
      Draw( hDC, x, y )
      Release()
   

HPrinter
DATA
      CLASS VAR aPaper
      hDCPrn 
      hDC 
      cPrinterName 
      hPrinter 
      lPreview 
      cMetaName 
      nWidth, nHeight 
      nPWidth, nPHeight 
      nHRes, nVRes 
      nOrient
      lmm 
      nPage

      lBuffPrn
      lUseMeta
      aPages, aJob
      aFonts
      aPens, aBitmaps
      oFont, oPen
      cScriptFile

      lmm
      nCurrPage, oTrackV, oTrackH
      nZoom, xOffset, yOffset, x1, y1, x2, y2

      FormType
      BinNumber
      Copies
      PaperLength
      PaperWidth
      TopMargin
      BottomMargin
      LeftMargin
      RightMargin
   
METHODS
      New( cPrinter, lmm, nFormType, nBin, lLandScape, nCopies, lProprierties, hDCPrn )
      SetMode( nOrientation, nDuplex )
      AddFont( fontName, nHeight ,lBold, lItalic, lUnderline, nCharset )
      SetFont( oFont )
      StartDoc( lPreview,cMetaName ) - Starts printing of a document.
      EndDoc()                  - End of a document printing.
      StartPage()
      EndPage()
      LoadScript( cScriptFile )
      SaveScript( cScriptFile )
      ReleaseMeta()
      PaintDoc( oWnd )
      PrintDoc( nPage )
      PrintDlg()
      PrintScript( hDC, nPage, x1, y1, x2, y2 )
      Preview( cTitle, aBitmaps, aTooltips, aBootUser )
      End()                     - Releasing the printer.
      Box( x1,y1,x2,y2,oPen )
      Line( x1,y1,x2,y2,oPen )
      Say( cString,x1,y1,x2,y2,nOpt,oFont )
      Bitmap( x1,y1,x2,y2,nOpt,hBitmap )
      GetTextWidth( cString, oFont )
   

HTreeNode
DATA
      CLASS VAR winclass 
      aItems 
      handle 
      oTree, oParent 
      bAction 
   
METHODS
      New( oTree, oParent, oPrev, oNext, cTitle, bAction,aImages ) 
      AddNode( cTitle, oPrev, oNext, bAction, aImages ) 
      Delete() 
      FindChild( handle ) 
      GetText() 
      SetText(cText)
   

HTimer
DATA
      CLASS VAR aTimers 
      objname
      id 
      value 
      lOnce
      oParent 
      bAction
   
METHODS
      New( oParent, id, value, bAction, lOnce )
      End()
   

HFreeImage

This class is similar to HBitmap, HIcon classes, it allows to load, save and draw an image in BMP, JPEG, PNG and some other formats. It uses FreeImage library (http://freeimage.sourceforge.net>) - so, if you include it in your application, you need to have FreeImage.dll.

DATA
      CLASS VAR aImages 
      handle 
      hBitmap 
      name 
      nWidth, nHeight 
      nCounter
   
METHODS
      AddFile( name )           - Load the image from a file
      AddFromVar( cImage,cType )
      FromBitmap( oBitmap )     - Create an image from a bitmap
      Draw( hDC, nLeft, nTop, nWidth, nHeight )
      Release()                 - Unload the image
   
The example of using this class you may find in samples/viewer/viewer.prg.
HSplash
METHODS
    Create( cFile,oTime,oResource )
   

HPrintDos
DATA
      cCompr, cNormal, oText, cDouble, cBold, cUnBold
      oPorta, oPicture
      orow, oCol
      cEject, nProw, nPcol, fText, gText
      oTopMar
      oLeftMar
      oAns2Oem
      LastError
      oPrintStyle
      colorPreview
      nStartPage
      nEndPage
      nCopy
   
METHODS
      New( oPorta )
      Say( oProw, oCol, oTexto, oPicture )
      SetCols( nRow, nCol )
      gWrite( oText )
      NewLine()
      Eject()
      Compress()
      Double()
      DesCompress()
      Bold()
      UnBold()
      Comando()
      SetPrc( x, y )
      PrinterFile( oFile )
      TxttoGraphic( oFile, osize, oPreview )
      Preview( fname, cTitle )
      END()
   


HWinPrn
DATA
      CLASS VAR nStdHeight SHARED
      CLASS VAR cPrinterName SHARED
      oPrinter
      nFormType
      oFont
      nLineHeight, nLined
      nCharW
      x, y
      cPseudo
      lElite
      lCond
      nLineInch
      lBold
      lItalic
      lUnder
      nLineMax
      lChanged

      cpFrom, cpTo
      nTop
      nBottom
      nLeft
      nRight
   
METHODS
      New( cPrinter, cpFrom, cpTo, nFormType )
      InitValues( lElite, lCond, nLineInch, lBold, lItalic, lUnder, nLineMax  )
      SetMode( lElite, lCond, nLineInch, lBold, lItalic, lUnder, nLineMax  )
      StartDoc( lPreview,cMetaName )
      NextPage()
      PrintLine( cLine,lNewLine )
      PrintText( cText )
      PutCode( cText )
      EndDoc()
      End()
   

HFormTmpl
DATA
      CLASS VAR aForms
      CLASS VAR maxId
      CLASS VAR oActive
      oDlg
      aControls
      aProp
      aMethods
      aVars
      aNames
      pVars
      aFuncs
      id
      cId
      nContainer
      nCtrlId
      lDebug
      lNoModal
      bDlgExit, bFormExit
      cargo
   
METHODS
      Read( fname, cId )
      Show( nMode, params )
      ShowMain( params )
      ShowModal( params )
      Close()
      F( id, n )
      Find( cId )
   

HRepTmpl
DATA
      CLASS VAR aReports
      CLASS VAR maxId
      CLASS VAR aFontTable
      aControls
      aProp
      aMethods
      aVars
      aFuncs
      lDebug
      id
      cId

      nKoefX, nKoefY, nKoefPix
      nTOffset, nAOffSet, ny
      lNextPage, lFinish
      oPrinter
   
METHODS
      READ( fname, cId )
      PRINT( printer, lPreview, p1, p2, p3, p4, p5 )
      PrintAsPage( printer, nPageType, lPreview, p1, p2, p3, p4, p5 )
      PrintItem( oItem )
      ReleaseObj( aControls )
      Find( cId )
      CLOSE()
   

HBinC

This class implements a binary container - an one-file repository for different files, which you need to use in your program - an images, for example. It gets rid off directories with icons, images and other supplementary files, which are included in the distribution of your application, replacing them all with one file.

The binary container may serve as a cross-platform alternative for a resources file. GTK doesn't support Windows-like resources (*.rc, *.res). Using a binary container, we are able to write a code, which works identically in both versions, especially there are means in HwGUI to use operations with a binary container as a substitute for operations with resources. If you call hwg_SetResContainer( cName ) function, files will be retrieved from this container instead of resources:

     hwg_SetResContainer( cPath + "myapp.bin" )
     ...
     // The bitmap will retrieve from myapp.bin
     oBitmap := HBitmap():AddResource( "open" )
     ...
     // and here, too!
     @ x, y OWNERBUTTON OF oToolBar ON CLICK {||Test()} ;
        SIZE 32, 32 BITMAP "TEST" FROM RESOURCE

There is a special HwGUI utility for creating the binary container and filling it with files. It is placed in hwgui/utils/bincnt - Binary container manager.

DATA
      cName                       - the name of a file of a binary container;
      handle                      - a handle of a file of a binary container;
      lWriteAble                  - opening mode (.T. - it is writeable);
      nVerHigh, nVerLow           - a version of a binary container;
      nItems                      - a number of elements in a container;
      nCntLen                     - a length of a table of contents of a file in bytes;
      nCntBlocks                  - a number of blocks in a table of contents;
      nPassLen                    - a password length;
      nFileLen                    - a file length;
      aObjects                    - an array of elements.
   
METHODS
      Create( cName, n )          - creates a file of a binary container;
      Open( cName, lWr )          - opens a file of a binary container;
      Close()                     - closes a file of a binary container;
      Add( cObjName, cType, cVal )- adds an element to a container;
      Del( cObjName, cType )      - removes an element from a container;
      Pack()                      - packs the container;
      Exist( cObjName )           - checks, if the element exisis in a container;
      Get( cObjName )             - retrieves an element from a container.
   

HStyle

This class defines a style, painting parameters of a rectangular area, in particular - of some widget. It is possible to define a bacground color, an array of colors - in this case a gradient will be drawn. A direction of a gradient, a thickness and color of a border (if needed) may be specified in HStyle object. You can set a bitmap instead of background colors - it will fill the backgroung (look at hwg_SpreadBitmap() function). The corners may be drawn rounded, each corner - with a specified radius.

You may create at first an HStyle object with the help of HStyle():New(), and the to use it for different controls. Look for the samples of using HStyle in the Tutorial, chapter "Advanced using of controls".

DATA
      CLASS VAR aStyles    - an array with all defined styles, it is filled
                             automatically;
      id                   - a style id, it is created automatically;
      nOrient              - a gradient direction (look at hwg_DrawGradient());
      aColors              - an array of background colors, if few are defined, a
                             gradient is drawn;
      oBitmap              - an object of HBitmap class - a bitmap to fill background;
      nBorder              - a thickness of a border in pixels. If it is absent,
                             the border will not be drawn;
      tColor               - a color of a border;
      oPen                 - an object of HPen class, it is created automatically;
      aCorners             - an array with corners radiuses (look at
                hwg_DrawGradient()).
   
METHODS
      New( aColors, nOrient, aCorners, nBorder, tColor, oBitmap )
      Draw( hDC, nTop, nLeft, nWidth, nHeight )
   

HilightBase

Do not create instances of HilightBase. It serves as a base class for other syntax hilighting classes.

DATA
      oEdit   
      lCase
      aLineStru, nItems, nLine
   
METHODS
      New()
      End()
      Do()
   

Hilight

Syntax hilighting class, it is intended to be used together with an editor class HCEdit.

DATA
      cCommands                - A list of keywords (commands), divided by space
      cFuncs                   - A list of keywords (functions), divided by space
      cScomm                   - A string, which starts single line comments
      cMcomm1, cMcomm2         - Start and end strings for multiline comments

      lMultiComm
      aDop, nDopChecked
   
METHODS
      New( cFile, cSection )
      Set( oEdit )
      Do( nLine, lCheck )
      UpdSource( nLine )
      AddItem( nPos1, nPos2, nType )
   

HXMLNode
DATA
      CLASS VAR nLastErr SHARED
      title
      type
      aItems
      aAttr
      cargo
   
METHODS
      New( cTitle, type, aAttr )
      Add( xItem )
      GetAttribute( cName, cType, xDefault )
      SetAttribute( cName,cValue )
      DelAttribute( cName )
      Save( handle,level )
      Find( cTitle,nStart )
   

HXMLDoc
DATA
   
METHODS
      New( encoding )
      Read( fname )
      ReadString( buffer )
      Save( fname,lNoHeader )
      Save2String()
   

prev table of contents next
functions   qhtm integration