HwGUI 2.23 reference manual  
prev Alexander S.Kresin, October 2023 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.

Variables, marked as (RW), may be set and read, (R) - read only, those, which are not marked, shouldn't be used in programs.


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
     objName                  (RW) a name of an object to identify it in user programs
     cargo                    (RW) a variable, which you may use as you need
   

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
     title                    (RW) a title/caption of a window or a control 
     nTop, nLeft              (RW) coordinates of a top left corner
     nWidth, nHeight          (RW) a size: width and height
     tcolor, bcolor           (RW) text and background color, respectively,
     oFont                    (RW) a font, an object of HFont class
     bInit                    (RW) codeblock, performed during initialization
     bDestroy                 (RW) codeblock, performed during destroying
     bSize                    (RW) codeblock, performed when a size is changed
     bPaint                   (RW) codeblock, which paints the element
     bGetFocus                (RW) codeblock, executed when it receives focus
     bLostFocus               (RW) codeblock, executed when it looses focus
     bOther                   (RW) codeblock, executed for all messages

     handle                    (R) handle of a GUI element
     oParent                   (R) an object of a parent window or control
     type                      (R)
     brush                     (R)
     style                     (R) WinAPI style
     extstyle                  (R) extended WinAPI style
     lHide                     (R) .T., if the element is hidden
     aControls                 (R) an array with controls objects, belonged to this
                                    window or container
  Internal:
     aEvents, aNotify 
     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 )
     Refresh()
  Internal:
     onEvent( msg, wParam, lParam )
     OnError()
     End()
   

HWindow

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

DATA
      CLASS VAR aWindows       (R)
      CLASS VAR szAppName      (R)
      CLASS VAR aKeysGlobal    (R)
      lUpdated                (RW) .F., if any of GET items is changed
      lClipper                (RW)
      oBmp                    (RW)
      bCloseQuery             (RW)
      bActivate               (RW) codeblock, performed one time while window activation
      tColorinFocus           (RW) text color for an Edit control, which has focus
      bColorinFocus           (RW) background color for an Edit control, which has focus
      bScroll                 (RW) codeblock, performed during window scrolling
      menu                     (R)
      oIcon                    (R)
      GetList                  (R)
      KeyList                  (R)
      nLastKey                 (R)
      aOffset
      oEmbedded
      oPopup, hAccel 
   
METHODS
      New( oIcon, clr, nStyle, x, y, width, height, cTitle, cMenu, nPos,
         oFont, bInit, bExit, bSize, bPaint, bGfocus, bLfocus, bOther,
         cAppName, oBmp, cHelp, nHelpId, bColor ) 
      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
      EvalKeyList( nKey, bPressed )
      Close()                     - closes windows, deletes it with all controls
  Internal:
      AddItem( oWnd ) 
      DelItem( oWnd ) 
   

HMainWindow

A class of a main window. The corresponding command is 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, bColor, nExclude ) 
      Activate( lShow, lMaximized,           - Activates a window, the corresponding
         lMinimized, lCentered, bActivate )    command is ACTIVATE WINDOW
      InitTray( oNotifyIcon, bNotify, oNotifyMenu ) (Windows only, on GTK available, but empty with no function) 
      GetMdiActive()                         - returns an active MDI child window object
      DEICONIFY()   (LINUX/GTK only)         - maximize
      ICONIFY()     (LINUX/GTK only)         - minimize
  Internal:
      onEvent( msg, wParam, lParam ) 
   

Special information for methods DEICONIFY() and InitTray():
The behavior of tray applications differ.
For details see sample programs
samples/gtk_samples/testtray.prg and samples/testtray.prg .


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, bColor )
      Activate( lShow, lMaximized, lMinimized, lCentered, bActivate )
  Internal:
      onEvent( msg, wParam, lParam )
   

HDialog

A class of a dialog window. The corresponding command is INIT DIALOG

DATA
      CLASS VAR aDialogs       (R)
      CLASS VAR aModalDialogs  (R)
      lResult                 (RW)
      lClipper                (RW) IF .T., ENTER allows to move between GET items
      lExitOnEnter            (RW)
      lExitOnEsc              (RW)
      lClosable                (R)
      lModal
      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 )
     FindDialog( hWnd ) 
     GetActive()      - returns a GET element object of this dialog, which owns input focus
     Close()
  Internal:
     AddItem() 
     DelItem() 
     onEvent( msg, wParam, lParam ) 
   

HControl

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

DATA
      Anchor                  (RW) a numeric value, which determines autoresizing
                                    of a control due to a parent window resizing
      tooltip                  (R)
      id                       (R)
  Internal:
      lInit
   
METHODS
      New( oWndParent,nId,nStyle,nLeft,nTop,nWidth,nHeight,oFont,bInit, 
         bSize,bPaint,ctoolt,tcolor,bcolor ) 
      Disable() 
      Enable() 
      Enabled() 
      SetFocus() 
      GetText() 
      SetText( c )
      Refresh()       - virtual method
      SetTooltip()
  Internal:
      Init() 
      NewId() 
      End()
   

HBrowse

The corresponding command is @ <x>,<y> BROWSE

DATA
      active                  (RW)
      lChanged                (RW)
      lDispHead               (RW) Should I display headers ?
      lDispSep                (RW) Should I display separators ?
      lBuffering              (RW)
      freeze                  (RW) Number of columns to freeze
      aArray                  (RW) An array to browse
      oStyleHead              (RW) A HStyle object to draw the header
      oStyleFoot              (RW) A HStyle object to draw the footer
      oStyleCell              (RW) A HStyle object to draw the cell
      headColor               (RW) Header text color
      sepColor                (RW) Separators color
      aPadding                (RW)
      aHeadPadding            (RW)
      lInFocus                (RW)
      tcolorSel, bcolorSel    (RW) Text and backgound color of a selected row
      httColor, htbColor      (RW) Text and backgound color of a selected cell
      bSkip, bGoTo, bGoTop    (RW)
      bGoBot, bEof, bBof      (RW)
      bRcou, bRecno, bRecnoLog(RW)
      bPosChanged, bLineOut,  (RW)
      bScrollPos, bHScrollPos (RW)
      bEnter                  (RW)
      bKeyDown                (RW)
      bUpdate                 (RW)
      bRClick                 (RW)
      lEditable               (RW)
      lAppable                (RW)
      lAppMode                (RW)
      lAutoEdit               (RW)
      lAdjRight               (RW) Adjust last column to right
      winclass                 (R)
      aColumns                 (R) HColumn's array
      nRecords                 (R) Number of records in browse
      nCurrent                 (R) Number of a current record in a browse
      nRowHeight               (R) Predefined height of a row
      nRowTextHeight           (R) A max text height in a row
      rowCount                 (R) Number of visible data rows
      rowPos                   (R) Current row position
      rowCurrCount             (R) Current number of rows
      colPos                   (R) Current column position
      nColumns                 (R) Number of visible data columns
      nLeftCol                 (R) Leftmost column
      nHeadRows                (R) Rows in header
      nFootRows                (R) Rows in footer
      recCurr                  (R)
      lUpdated                 (R)
      lAppended                (R)
      oPenSep, oPenHdr, oPen3d (R)
      brushSel                 (R)
      lSep3d                   (R)
      aSelected                (R)
      nPaintRow, nPaintCol     (R) Row/Col being painted
      alias                    (R) Alias name of browsed database
      x1,y1,x2,y2              (R)
      width,height             (R)
      aColAlias
      aRelation
      lResizing
      lCtrlPress
      DATA nHCCharset INIT -1      Charset for MEMO EDIT, -1 for use default (set default value = 0)
                                   For compatibiltity purposes, do not modify
                                   with UTF-8 (0).
                                   For Windows:     
                                   204: Russian
                                   15 : IBM 858 with Euro currency sign (€)                                  
      --- International Language Support for internal dialogs ---
      cTextTitME              (RW) "Memo Edit"   
      cTextClose              (RW) "Close"   // Button 
      cTextSave               (RW) "Save"
      cTextMod                (RW) "Memo was modified, save ?"
      cTextLockRec            (RW) "Can't lock the record!"
   
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 )
      DefaultLang()                // Reset of messages to default value English 
      Rebuild() 
      AddColumn( oColumn ) 
      InsColumn( oColumn,nPos ) 
      DelColumn( nPos ) 
      SetColumn( nCol ) 
      LineDown( lMouse ) 
      LineUp() 
      PageUp() 
      PageDown() 
      Bottom() 
      Top()
      Home()
      RefreshLine() 
      Refresh() 
      ShowSizes()
  Internal:
      Activate() 
      Paint() 
      DrawHeader( hDC, nColumn, x1, y1, x2, y2 )
      LineOut() 
      HeaderOut( hDC ) 
      FooterOut( hDC ) 
      DoHScroll( wParam ) 
      DoVScroll( wParam ) 
      ButtonDown( lParam ) 
      ButtonRDown( lParam ) 
      ButtonUp( lParam ) 
      ButtonDbl( lParam ) 
      MouseMove( wParam, lParam ) 
      MouseWheel( nKeys, nDelta, nXPos, nYPos ) 
      Edit( wParam,lParam ) 
      Append() 
      onEvent( msg, wParam, lParam ) 
      End()
   


HPanel
DATA
      bScroll                 (RW)
      oStyle                  (RW)
      lDragWin                (RW)
      winclass                 (R)
      oEmbedded                (R)
      oPaintCB                (RW) HPaintCB object
      lCaptured
      hCursor
   
METHODS
     New( oWndParent, nId, nStyle, nLeft, nTop, nWidth, nHeight, 
         bInit, bSize, bPaint, bColor, oStyle ) 
     Hide()
     Show()
     BackColor( bcolor )
  Internal:
     Activate() 
     onEvent( msg, wParam, lParam ) 
     DrawItems( hDC, aCoors )
     Paint() 
     Drag( xPos, yPos )
     Release()
   

HPanelSts
DATA
      aParts                   (R)
      aText                    (R)
   
METHODS
      New( oWndParent, nId, nHeight, oFont, bInit, bPaint, bcolor, oStyle, aParts )
      Write( cText, nPart, lRedraw )
      SetText( cText )
  Internal:
      PaintText( hDC )
      Paint()
   

HPanelHea
DATA
     xt, yt                   (RW)
     lMaximized
     lPreDef                  HIDDEN
   
METHODS
     New( oWndParent, nId, nHeight, oFont, bInit, bPaint, tcolor, bcolor, oStyle, ;
        cText, xt, yt, lBtnClose, lBtnMax, lBtnMin )
     SetText( c )
     SetSysbtnColor( tColor, bColor )
  Internal:
     PaintText( hDC )
     Paint()
   


HOwnButton
DATA
     CLASS VAR cPath SHARED
     lFlat                    (RW)
     aStyle                   (RW)
     bClick                   (RW)
     lCheck                   (RW)
     text                     (RW)
     tfont                    (RW)
     xt, yt, widtht, heightt  (RW)
     oBitmap                  (RW)
     xb, yb, widthb, heightb  (RW)
     lTransp, trColor         (RW)
     winclass                  (R)
     lEnabled                  (R)
     nOrder                    (R)
     state                     (R)
     lPress                    (R)
   
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, bColor )
     Press() 
     Release() 
     Enable()
     Disable()
  Internal:
     Activate() 
     onEvent( msg, wParam, lParam ) 
     Init() 
     Paint() 
     DrawItems( hDC )
     MouseMove( wParam, lParam ) 
     MDown() 
     MUp() 
     End()
   

HShadeButton

(Windows only)

DATA 
     hShade
   
METHODS
       New( oWndParent, nId, nStyle, nLeft, nTop, nWidth, nHeight, ;
                   bInit, bSize, bPaint, bClick, lflat,              ;
                   cText, color, font, xt, yt,                       ;
                   bmp, lResour, xb, yb, widthb, heightb, lTr, trColor, ;
                   cTooltip, lEnabled, shadeID, palette,         ;
                   granularity, highlight, coloring, shcolor )
  Internal:
       Paint()
       END()   
   

HNiceButton

(Windows only)

DATA
       winclass INIT "NICEBUTT"

       TEXT, id, nTop, nLeft, nwidth, nheight
       CLASSDATA oSelected INIT Nil
       State INIT 0
       ExStyle
       bClick, cTooltip
       lPress INIT .F.
       r INIT 30
       g INIT 90
       b INIT 90
       lFlat
       nOrder   
   
METHODS
       New( oWndParent, nId, nStyle, nStyleEx, nLeft, nTop, nWidth, nHeight, ;
                    bInit, bClick, ;
                    cText, cTooltip, r, g, b )
       Redefine( oWndParent, nId, nStyleEx, ;
                    bInit, bClick, ;
                    cText, cTooltip, r, g, b )

       Activate()
       INIT()
       Create( )
       Size( )
       Moving( )
       Paint()
       MouseMove( wParam, lParam )
       MDown()
       MUp()
       Press() INLINE( ::lPress := .T., ::MDown() )
       RELEASE()
       END ()   
   

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

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

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

HStaticLink
DATA
      m_bFireChild            (RW)
      m_hHyperCursor          (RW)
      m_bMouseOver            (RW)
      m_bVisited              (RW)
      m_oTextFont             (RW)
      m_csUrl                 (RW)
      m_sHoverColor           (RW)
      m_sLinkColor            (RW)
      m_sVisitedColor         (RW)
      state                    (R)
      dwFlags
   
METHODS
     New( oWndParent, nId, nStyle, nLeft, nTop, nWidth, nHeight, cCaption, oFont, bInit,
         bSize, bPaint, ctooltip, tcolor, bcolor, lTransp, cLink, vColor, lColor, hColor )
     SetLinkUrl( csUrl )
     GetLinkUrl()
     SetVisitedColor( sVisitedColor )
     SetHoverColor( cHoverColor )
     SetFireChild( lFlag )
     SetLinkColor( sLinkColor )
  Internal:
     Activate() 
     Init()
     onEvent( msg, wParam, lParam )
     GoToLinkUrl( csLink )
     OnClicked()
     Paint()
     OnMouseMove( nFlags, point )
   

HButton
DATA
     bClick                   (RW)
     CLASS VAR winclass        (R)
   
METHODS
     New( oWndParent, nId, nStyle, nLeft, nTop, nWidth, nHeight, cCaption, oFont, 
         bInit, bSize, bPaint, bClick, ctoolt, tcolor, bcolor )
     SetText( c )
     GetText()

  Internal:
     Activate() 
     Init()
   

HEdit
DATA
     CLASS VAR winclass        (R)
     oPicture                  (R)
     bSetGet                  (RW)
     bValid                   (RW)
     lNoPaste                 (RW)
     nMaxLength               (RW)
     bkeydown                 (RW)
     bkeyup                   (RW)
     bchange                  (RW)
     bColorBlock              (RW)
     lFirst                    (R)
     lChanged                  (R)
     lMultiLine                (R)
     cType                     (R)
     aColorOld                 (R)
   
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 )
     Refresh()
     Value( xValue ) SETGET
     SelStart( nStart ) SETGET
     SelLength( nLength ) SETGET
  Internal:
     Activate() 
     onEvent( msg, wParam, lParam ) 
     Init() 
   

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

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

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

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

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

HSayImage

Do not create instances of HSayImage. It serves as a base class for HSayBmp, HSayIcon, HSayFimage

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

HSayBmp
DATA
      lTransp                 (RW) Is the image transparent, .F. by default
      trcolor                 (RW) The transparent color value
      nStretch                (RW)
      nBorder                 (RW) A border width in pixels, 0 by default
      oPen                     (R)
      nOffsetV
      nOffsetH
      nZoom
   
METHODS
     New( oWndParent, nId, nLeft, nTop, nWidth, nHeight, Image, lRes, bInit, 
        bSize, ctoolt, bClick, bDblClick, lTransp, nStretch, trcolor )
     ReplaceBitmap( Image, lRes )
     Refresh()
  Internal:
     Paint( lpdis )
   

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

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

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

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

HTab
DATA
      CLASS VAR winclass       (R)
      bChange,bChange2        (RW)
      bAction                 (RW)
      aTabs                    (R)
      aPages                   (R)
      hIml, aImages, Image1, Image2 
      oTemp
      aTooltips               // Array with tooltips messages
                              // One element for every tab
                      
   
METHODS
      New( oWndParent, nId, nStyle, nLeft, nTop, nWidth, nHeight, oFont, bInit,
         bSize, bPaint, aTabs, bChange, aImages, lResour, nBC, bClick, bGetFocus,
         bLostFocus ) 
      GetActivePage( nFirst,nEnd )
      SetTab( n )
  Internal:
      Activate()
      Init()
      onEvent( msg, wParam, lParam )
      StartPage( cname , [cToolTip] )         // GTK
      StartPage( cName, oDlg , [ctooltip] )   // WinAPI
      EndPage()
      ChangePage( nPage )
      DeletePage( nPage )
      HidePage( nPage )
      ShowPage( nPage )
      Notify( lParam )
      SetTooltip( nhandle, ntab )  // WinAPI 
   

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

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

HProgressBar
DATA
      CLASS VAR winclass
      DATA  maxPos
      DATA  nRange (WinAPI only)
      DATA  lNewBox
      DATA  nCount INIT 0
      DATA  nLimit
      DATA  nAnimation  (WinAPI only)
      DATA  LabelBox  (WinAPI only)
      DATA  nPercent INIT 0  (WinAPI only)
      DATA  lPercent INIT .F.  (WinAPI only)
   
METHODS
      New( oWndParent, nId, nLeft, nTop, nWidth, nHeight, maxPos, nRange, bInit, bSize, bPaint, ctooltip, nAnimation, lVertical )
      NewBox( cTitle, nLeft, nTop, nWidth, nHeight, maxPos, nRange, bExit, bInit, bSize, bPaint, ctooltip )
      Init()    (WinAPI only)
      Activate()
      Increment() INLINE hwg_Updateprogressbar( ::handle )
      STEP()
      RESET( cTitle )    (Parameter cTitle WinAPI only)
      SET( cTitle, nPos )
      SetLabel( cCaption )   (WinAPI only)
      CLOSE()
      End() INLINE hwg_Destroywindow( ::handle )   (WinAPI only)
      Redefine( oWndParent, nId,  maxPos, nRange, bInit, bSize, bPaint, ctooltip, nAnimation, lVertical )  (WinAPI only)
   

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
   

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

This is outdated control. HTrack is recommended to use instead it.


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

HCEdit
DATA
      CLASS VAR winclass       (R)
      nMaxLines               (RW)
      cp, cpSource            (RW)
      lUtf8                   (RW)
      nDocFormat              (RW)
      nDocOrient              (RW)
      aDocMargins             (RW)

      lShowNumbers            (RW)
      lReadOnly               (RW)
      lInsert                 (RW)
      lNoPaste                (RW)

      nBoundL                 (RW)
      nBoundR                 (RW)
      nBoundT                 (RW)
      nMarginL                (RW)
      nMarginR                (RW)
      nMarginT                (RW)
      nMarginB                (RW)

      n4Number                (RW)
      n4Separ                 (RW)
      bColorCur               (RW)
      tcolorSel               (RW)
      bcolorSel               (RW)
      nClrDesk                (RW)
      nAlign                  (RW)
      nIndent                 (RW)
      bChangePos, bKeyDown    (RW)
      bClickDoub              (RW)
      bAfter                  (RW)
      nTabLen                 (RW)
      lStripSpaces            (RW)
      nMaxUndo                (RW)
      oHili                   (RW)

      hEdit                    (R)
      cFileName                (R)
      aText, nTextLen          (R)
      aWrap, nLinesAll         (R)
      nKoeffScr                (R)
      lUpdated                 (R)
      nShiftL                  (R)
      nDefFont                 (R)
      nLineF                   (R)
      nPosF                    (R)
      aLines, nLines           (R)
      nLineC, nPosC            (R)
      nWCharF                  (R)
      nWSublF                  (R)
      aFonts                   (R)
      aFontsPrn                (R)
      oPenNum                  (R)
      nCaret                   (R)
      lChgCaret                (R)
      lSetFocus                (R)
      lMDown                   (R)
      aPointC                  (R)
      aPointM1, aPointM2       (R)
      lVScroll                 (R)
      nClientWidth             (R)
      nDocWidth                (R)
      aUndo                    (R)
      nLastKey                 (R)
      // --- International Language Support for internal dialogs --  
      aLangTexts               (RW)  INIT {}  

   
METHODS
      New( oWndParent, nId, nStyle, nLeft, nTop, nWidth, nHeight, oFont,
         bInit, bSize, bPaint, tcolor, bcolor, bGfocus, bLfocus, lNoVScroll, lNoBorder )
      DefaultLang()
      Open( cFileName, cPageIn, cPageOut )
      SetHili( xGroup, oFont, tColor, bColor )
      SetText( xText, cPageIn, cPageOut )
      SAVE( cFileName )
      AddFont( oFont, name, width, height , weight,
         CharSet, Italic, Underline, StrikeOut )
      SetFont( oFont )
      SetCaretPos( nType, p1, p2 )
      PutChar( nKeyCode )
      LineDown()
      LineUp()
      PageDown()
      PageUp()
      Top()
      Bottom()
      GOTO( nLine )
      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 )
  Internal:
      Activate()
      Init()
      onEvent( msg, wParam, lParam )
      Paint( lReal )
      PaintLine( hDC, yPos, nLine, lUse_aWrap )
      MarkLine( nLine, lReal, nSubLine )
      End()
      Convert( cPageIn, cPageOut )
      onKeyDown( nKeyCode, lParam, nCtrl )
      onVScroll( wParam )
      Scan()
      Undo( nLine1, nPos1, nLine2, nPos2, nOper, cText )
      Print( nDocFormat, nDocOrient, nMarginL, nMarginR, nMarginT, nMarginB )
      PrintLine( oPrinter, yPos, nL )
   

HBoard

This widget is mainly used to place DRAWN widgets on it. It can be used also to draw on it with HwGUI's drawing functions.

The corresponding command is @ <x>,<y> BOARD

DATA
      winclass                (R)
      lMouseOver              (R)
      oInFocus                (R)
      aDrawn                  (R)
   
METHODS
      New( oWndParent, nId, nLeft, nTop, nWidth, nHeight,
        oFont, bInit, bSize, bPaint, cTooltip, tcolor, bColor )
      Refresh( x1, y1, x2, y2 )
  Internal:
      Activate()
      onEvent( msg, wParam, lParam )
      Init()
      Paint( hDC )
      End()
   

HLenta
DATA
      oDrawn                  (R)
   
METHODS
      New( oWndParent, nId, nLeft, nTop, nWidth, nHeight, oFont,
           bSize, bPaint, bClick, color, bcolor, aItems, nItemSize, aItemStyle )
      Move( x1, y1, width, height )
      aItems ( arr ) SETGET
      bClick ( b ) SETGET
      Value ( xValue ) SETGET
   

HTrack
DATA
      oDrawn                  (R)
   
METHODS
      New( oWndParent, nId, nLeft, nTop, nWidth, nHeight,
           bSize, bPaint, color, bcolor, nSize, oStyleBar, oStyleSlider, lAxis )
      Set( nSize, oStyleBar, oStyleSlider, lAxis, bPaint )
      Move( x1, y1, width, height )
      bChange ( b ) SETGET
      Value ( xValue ) SETGET
   


HGraph
DATA
      aValues                  (RW) Data array                                          
      nType                    (RW) Signs arrays for X and Y axes                       
      aSignX, aSignY           (RW) Number of lines in a line chart                     
      nGraphs                  (RW) Graph type: 1 - line chart, 2 - bar histogram       
      lGridX                   (RW) Should I draw grid lines for X axis                 
      lGridY                   (RW) Should I draw grid lines for Y axis                 
      lGridXMid                (RW) Should I shift X axis grid line to a middle of a bar
      lPositive                (RW)                                                     
      x1Def                    (RW) A left indent                                       
      x2Def                    (RW) A right indent                                      
      y1Def                    (RW) A top indent                                        
      y2Def                    (RW) A bottom indent                                     
      ymaxSet                  (RW)                      
      colorCoor                (RW) A color for signs                                   
      colorGrid                (RW) A color for axes and grid lines                     
      aColors                  (RW) Colors for each line           
      aPens                     (R)
      scaleX, scaleY            (R)
      tbrush                    (R)
      oPen, oPenGrid            (R)
   
METHODS
      New( oWndParent, nId, aValues, nLeft, nTop, nWidth, nHeight, oFont,
           bSize, ctooltip, tcolor, bcolor )
      Rebuild( aValues, nType )
  Internal:
      Activate()
      Init()
      CalcMinMax()
      Paint()
   

HCEditBasic
DATA
      oDrawn                  (R)
   
METHODS
      New( oWndParent, nId, nLeft, nTop, nWidth, nHeight, oFont,
         bInit, bSize, bPaint, tcolor, bcolor, bGfocus, bLfocus, xInitVal, cPicture )
      SetText( cText )
      Value( xValue ) SETGET
   

HDateSelect
DATA
   
METHODS
      New( oWndParent, nId, nLeft, nTop, nWidth, nHeight, color, bcolor, oFont,
           dValue, bSize, bPaint, bChange  )
      bChange( b ) SETGET
      Value( xValue ) SETGET
   

HColumn
DATA
      block                   (RW)
      heading                 (RW) Header text string
      footing                 (RW) Footer text string
      width                   (RW)
      type                    (RW)
      length                  (RW) column width in characters (or in pixels, if the value is negative)
      dec                     (RW)
      nJusHead                (RW) Header text alignment (0-left, 1-center, 2-right)
      nJusLin                 (RW) Cell text alignment (0-left, 1-center, 2-right)
      tcolor, bcolor          (RW)
      lEditable               (RW) Is the column editable
      lResizable              (RW) Is the column resizable
      aList                   (RW) Array of possible values for a column -
                                   combobox will be used while editing the cell
      oStyleHead              (RW) An HStyle object to draw the header
      oStyleFoot              (RW) An HStyle object to draw the footer
      oStyleCell              (RW) An HStyle object to draw the cell
      aBitmaps                (RW)
      oPaintCB                (RW) HPaintCB object
      bValid,bWhen            (RW)
      bEdit                   (RW) Codeblock, which performs cell editing, if defined
      Picture                 (RW)
      cGrid                   (RW)
      lSpandHead              (RW)
      lSpandFoot              (RW)
      bHeadClick              (RW) Codeblock, which executes after a mouse click on a header
      bColorBlock             (RW) Codeblock, which must return an array containing, at least,
                                   four colors values:
                                   { textColor, backColor, textColorRowSel, backColorRowSel
                                   [, textColorColSel, backColorColSel ] }
      brush
   
METHODS
     New( cHeading, block, type, length, dec, lEditable, nJusHead, nJusLin,
        cPict, bValid, bWhen, aItem, bColorBlock, bHeadClick )
   

HBrwCol
DATA
      block                   (RW)
      cHead, cFoot            (RW)
      nWidth                  (RW)
      dec                     (RW)
      nAlignHead, nAlignRow   (RW)
      tcolor, bcolor          (RW)
      oFont                   (RW)

      lEditable               (RW) Is the column editable
      cPicture, bValid        (RW)
      aList                   (RW) Array of possible values for a column
      nEditType               (RW)

      oPaintCB                (RW) HPaintCB object
      bHeadClick              (RW)
   
METHODS
      New( cHead, block, nWidth, nAlignRow, nAlignHead, lEditable )
   

HBrwData
DATA
      nCurrent                (R)
  Internal:
      lNeedBuf
      lNeedRefresh
   
METHODS
      Bof()      VIRTUAL
      Eof()      VIRTUAL
      Top()      VIRTUAL
      Bottom()   VIRTUAL
      Recno()    VIRTUAL
      RecnoLog() VIRTUAL
      GoTo( n )  VIRTUAL
      Count()    VIRTUAL
      Skip( nSkip ) VIRTUAL
      Block( x )    VIRTUAL
   

HDataArray
DATA
      aData                   (R)
   
METHODS
      Bof()
      Eof()
      Top()
      Bottom()
      Recno()
      RecnoLog()
      GoTo( n )
      Count()
      Skip( nSkip )
      Block( x )
   

HDataDbf
DATA
      cAlias                  (R)
   
METHODS
      Bof()
      Eof()
      Top()
      Bottom()
      Recno()
      RecnoLog()
      GoTo( n )
      Count()
      Skip( nSkip )
      Block( x )
   

HRadioGroup
DATA
      CLASS VAR oGroupCurrent 
      bSetGet                 (RW)
      aButtons                 (R)
      nValue                   (R)
      oHGroup                  (R)
   
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          (R)
     handle                    (R)
     name, width               (R)
     height ,weight            (R)
     charset, italic           (R)
     Underline, StrikeOut      (R)
     nCounter
   
METHODS
      Add( fontName, nWidth, nHeight ,fnWeight, fdwCharSet, fdwItalic,
         fdwUnderline, fdwStrikeOut, nHandle )
      Select( oFont )
      Props2Arr()
      PrintFont()
      SetFontStyle( lBold, nCharSet, lItalic, lUnder, lStrike, nHeight )
      Release()
   


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

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

HBitmap
DATA
     CLASS VAR cPath SHARED   (RW)
     CLASS VAR lSelFile       (RW)
     CLASS VAR aBitmaps        (R)
     handle                    (R)
     name                      (R)
     nFlags                    (R)
     nWidth, nHeight           (R)
     nCounter
   
METHODS
      AddResource( name, nFlags, lOEM, nWidth, nHeight )
      AddStandard( nId )
      AddFile( name, hDC, lTransparent, nWidth, nHeight )
      AddString( name, cVal )
      AddWindow( oWnd, x1, y1, width, height )  - Creates a bitmap from a given window.
      Draw( hDC, x1, y1, width, height )
      Release()
      OBMP2FILE( cfilename , name )  - Writes a bitmap object into file
   


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

Supported image formats:
Windows: ico
LINUX: bmp, jpg, png, ico


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

      lBuffPrn                 (R)
      lUseMeta                 (R)
      aPages, aJob             (R)
      aFonts                   (R)
      aPens, aBitmaps          (R)
      oFont, oPen              (R)
      cScriptFile              (R)

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

      FormType                 (R)
      BinNumber                (R)
      Copies                   (R)
      PaperLength              (R)
      PaperWidth               (R)
      TopMargin               (RW)
      BottomMargin            (RW)
      LeftMargin              (RW)
      RightMargin             (RW)
      // --- International Language Support for internal dialogs --
      aLangTexts              (RW) 
      // Print Preview Dialog with sub dialog:
      // The messages and control text's are delivered by other classes, calling
      // the method Preview() in Parameter aTooltips as an array.
      // After call of Init method, you can update the array with messages in your
      // desired language.
      // Sample: Preview( , , aTooltips, )
      // Structure of array look at 
      // METHOD SetLanguage(apTooltips) CLASS HWinPrn
      // in file hwinprn.prg.
      // List of classes calling print preview
      // HWINPRN, HRepTmpl , ...
      // For more details see inline comments in sample program "Winprn.prg" 
   
METHODS
      New( cPrinter, lmm, nFormType, nBin, lLandScape, nCopies, lProprierties, hDCPrn ) - Windows
      New( cPrinter, lmm, nFormType , cdp )                                             - GTK
      FUNCTION hwg_HPrinter_LangArray_EN()
      DefaultLang()
      SetMode( nOrientation, nDuplex )
      AddFont( fontName, nHeight ,lBold, lItalic, lUnderline, nCharset )
      SetFont( oFont )
      StartDoc( lPreview,cMetaName,lprbutton ) - Starts printing of a document.
      EndDoc()                  - End of a document printing.
      StartPage()
      EndPage()
      LoadScript( cScriptFile )
      SaveScript( cScriptFile )
      ReleaseMeta()
      PaintDoc( oWnd )
      PrintDoc( nPage )
      PrintDlg(aTooltips)
      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 )
   

Additional instructions:

Some more instructions see class HWINPRN.
Set lPreview in method StartDoc() to .T. to show the print preview dialog. Default is .F.
Otherwise the printing process starts immediately.
Set lprbutton to .F., if preview dialog does not show the print button.


HTreeNode
DATA
      CLASS VAR winclass       (R)
      aItems                   (R)
      handle                   (R)
      oTree, oParent           (R)
      bAction                 (RW)
   
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        (R)
      id                       (R)
      value                    (R)
      lOnce                    (R)
      oParent                  (R)
      bAction                 (RW)
   
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        (R)
      handle                   (R)
      hBitmap                  (R)
      name                     (R)
      nWidth, nHeight          (R)
      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
      // --- International Language Support for internal dialogs --
      aLangTexts  INIT {}
   
METHODS
      New( oPorta )
      DefaultLang()
      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   (R)
      CLASS VAR cPrinterName SHARED (R)
      oPrinter                 (R)
      nFormType                (R)
      oFont                    (R)
      nLineHeight, nLined      (R)
      nCharW                   (R)
      x, y                     (R)
      old_y                    (R)
      cPseudo                  (R)
      lElite                   (R)    INIT .F.
      lCond                    (R)    INIT .F.
      nLineInch                (R)    INIT 6
      lBold                    (R)    INIT .F.
      lItalic                  (R)    INIT .F.
      lUnder                   (R)    INIT .F.
      nLineMax                 (R)    INIT 0
      lChanged                 (R)    INIT .F.
      cpFrom                   (R)    INIT "EN"
      cpTo                     (R)    INIT "EN"
      nTop                     (R)
      nBottom                  (R)
      nLeft                    (R)
      nRight                   (R)
      nCharset                 (RW)  Printer Character Set, default is 0 (ANSI) "INIT 0".
                                     For allowed values see include file "prncharsets.ch".
    // --- International Language Support for internal dialogs --
      aTooltips                (RW) INIT {}  // Array with tooltips messages for print preview dialog
      aBootUser                (RW) INIT {}  // Array with control  messages for print preview dialog  (optional usage)
   
  
   
METHODS
      New( cPrinter, cpFrom, cpTo, nFormType )
      SetLanguage(apTooltips, apBootUser)
      InitValues( lElite, lCond, nLineInch, lBold, lItalic, lUnder, nLineMax  )
      SetMode( lElite, lCond, nLineInch, lBold, lItalic, lUnder, nLineMax  )
      SetDefaultMode()     // Should act like a "printer reset".
      SetCPTo(cpTo)         - GTK only, on Windows ignored, see nPrCharset
      SetCP(ccp)            - GTK only   
      SetCDPin(ccp)         - GTK only     
      StartDoc( lPreview,cMetaName,lprbutton )
      NextPage()
      NewLine()
      PrintLine( cLine,lNewLine )
      PrintLine2( cLine )  - GTK only, Special for German Umlaute and other characters
      PrintBitmap( xBitmap, nAlign , cBitmapName ) 
      PrintText( cText )
      SetX( nYvalue )
      SetY( nYvalue )
      PutCode( cText )
      EndDoc()
      End()
   

Default fonts:
GTK:   "monospace"
WinAPI: "Lucida Console"

Additional instructions:

Set lPreview in method StartDoc() to .T. to show the print preview dialog. Default is .F.
Otherwise the printing process starts immediately.
Set lprbutton to .F., if preview dialog does not show the print button.


HFormTmpl
DATA
      CLASS VAR aForms         (R)
      CLASS VAR maxId          (R)
      CLASS VAR oActive        (R)
      cFormName                (R)
      oDlg                     (R)
      aControls                (R)
      aProp                    (R)
      aMethods                 (R)
      aVars                    (R)
      aNames                   (R)
      pVars                    (R)
      aFuncs                   (R)
      id                       (R)
      cId                      (R)
      nContainer               (R)
      nCtrlId                  (R)
      lDebug                   (R)
      lNoModal                 (R)
      bDlgExit, bFormExit      (R)
      cargo                   (RW)
       // --- International Language Support for internal dialogs --
      cTextCantOpenF          (RW)  INIT "Can't open"
      cTextInvClMemb          (RW)  INIT "Invalid class member"
      cTextFrmRepDescnotF     (RW)  INIT "Form description isn't found"
      //  cTextRepDescnotF    (RW)  INIT "Report description isn't found" ==> Class HRepTmpl
   
METHODS
      DefaultLang()
      Read( fname, cId )
      Show( nMode, params )
      ShowMain( params )
      ShowModal( params )
      Close()
      F( id, n )
      Find( cId )
   

HRepTmpl
DATA
      CLASS VAR aReports       (R)
      CLASS VAR maxId          (R)
      CLASS VAR aFontTable     (R)
      cFormName                (R)
      aControls                (R)
      aProp                    (R)
      aMethods                 (R)
      aVars                    (R)
      aFuncs                   (R)
      lDebug                   (R)
      id                       (R)
      cId                      (R)

      nKoefX, nKoefY, nKoefPix
      nTOffset, nAOffSet, ny
      lNextPage, lFinish
      oPrinter
      // --- International Language Support for internal dialogs --
      cTextRepDescnotF         (RW)  INIT "Report description isn't found" 
   
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                   (RW) the name of a file of a binary container;
      lWriteAble              (RW) opening mode (.T. - it is writeable);
      handle                   (R) a handle of a file of a binary container;
      nVerHigh, nVerLow        (R) a version of a binary container;
      nItems                   (R) a number of elements in a container;
      nCntLen                  (R) a length of a table of contents of a file in bytes;
      nCntBlocks               (R) a number of blocks in a table of contents;
      nPassLen                 (R) a password length;
      nFileLen                 (R) a file length;
      aObjects                 (R) 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.
      GetPos( cObjName )          - retrieves the position of an item in the container (numeric)
      GetType( cObjName )         - retrieves the type of an item in the container (string)
   

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. The nBmpStyle value determines, how the bitmap will be used:
BMP_DRAW_SPREAD - it will fill the backgroung (look at hwg_SpreadBitmap() function)
BMP_DRAW_CENTER - it will be drawn in the center
BMP_DRAW_FULL - it will be resized to the size of appropriate surface.
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        (R) an array with all defined styles, it is filled
                                    automatically;
      id                       (R) a style id, it is created automatically;
      nOrient                 (RW) a gradient direction (look at hwg_DrawGradient());
      aColors                 (RW) an array of background colors, if few are defined, a
                                   gradient is drawn;
      oBitmap                 (RW) an object of HBitmap class - a bitmap to fill background;
      nBmpStyle               (RW) BMP_DRAW_SPREAD, BMP_DRAW_CENTER, BMP_DRAW_FULL
      nBorder                 (RW) a thickness of a border in pixels. If it is absent,
                                   the border will not be drawn;
      tColor                  (RW) a color of a border;
      oPen                     (R) an object of HPen class, it is created automatically;
      aCorners                (RW) an array with corners radiuses (look at
                                   hwg_DrawGradient()).
   
METHODS
      New( aColors, nOrient, aCorners, nBorder, tColor, oBitmap, nBmpStyle )
      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                    (R)
      lCase                    (R)
      aLineStru, nItems, nLine (R)
   
METHODS
      New()
      End()
      Do()
   

Hilight

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

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

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

HXMLNode
DATA
      CLASS VAR nLastErr SHARED  (R)
      title                    (R)
      type                     (R)
      aItems                   (R)
      aAttr                    (R)
      cargo                   (RW)
      aItems                  (RW)  INIT {}
   
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()
   

HPaintCB
DATA
      aCB                    (R)
   
METHODS
      New()  INLINE Self
      Set( nId, block, cId )
      Get( nId )
   

HPicture
DATA
      cPicFunc                (R)
      cPicMask                (R)
      lPicComplex             (R)
      cType                   (R)
      nMaxLength              (R)
   
METHODS
      New( cPicture, vari, nMaxLength )
      IsEditable( nPos )
      FirstEditable()
      LastEditable()
      KeyRight( nPos )
      KeyLeft( nPos )
      Delete( cText, nPos )
      Input( cChar, nPos )
      GetApplyKey( cText, nPos, cKey, lFirst, lIns )
      Transform( vari )
      UnTransform( cBuffer )
   

HDrawn
DATA
      CLASS VAR oDefParent    (R)
      oParent                 (RW)  Parent object
      title                   (RW)  A text - title, caption of this widget
      nTop, nLeft             (RW)  Coordinates of this widget relatively to parent HBoard widget
      nWidth, nHeight         (RW)  Width, height of this object
      aMargin                 (RW)  Margins for a text inside
      nTextStyle              (RW)  DT_LEFT, DT_CENTER (default), DT_RIGHT
      tcolor, bcolor          (RW)  Text and background colors
      tBorderColor            (RW)  Border color
      nCorner                 (RW)  The radius of a corner, if rounded
      oBrush                  (R)   A Brush object to fill background
      oPen                    (R)   A Pen object to draw border
      lHide                   (RW)  Flag of a "Hide" state
      lDisable                (RW)  Flag of a "Disable" state
      nState                  (R)   STATE_NORMAL, STATE_PRESSED, STATE_MOVER
      oFont                   (RW)  Font object
      aStyles                 (RW)  Array of HSTYLE objects for 3 possible states
      aDrawn                  (R)   Array of child drawn widgets
      cTooltip                (RW)  The text of a tooltip
      bPaint                  (RW)  Paint codeblock {|oDrawn,hDC| ... }
      bClick                  (RW)  On click codeblock {|oDrawn,nPosX,nPosY| ... }
      bChgState               (RW)  On change state codeblock {|oDrawn,nState| ... }
      bSize                   (RW)  On size codeblock {|oDrawn,nWidth,nHeight| ... }
  Internal:
      lStatePaint
      oTooltip                HDrawnTT object
      nMouseOn
      xValue                  The value, related to this widget
   
METHODS
      New( oWndParent, nLeft, nTop, nWidth, nHeight, tcolor, bColor, aStyles,
        title, oFont, bPaint, bClick, bChgState )
      Delete()                                   Delete object from a parent's :aDrawn array
      GetParentBoard()                           Returns a parent HBoard widget
      GetByPos( xPos, yPos [, oBoard] )          Returns a child drawn widget by position
      GetByState( nState, aDrawn, block, lAll )  Returns one or all child drawn widgets with nState
      Move( x1, y1, width, height, lRefresh )    Move/resize the widget
      SetState( nState, nPosX, nPosY )           Set widget state
      SetText( cText )                           Change the title and refresh
      Value( xValue ) SETGET                     Set/get a value, related to widget
      Refresh( [x1, y1, x2, y2] )                Repaint widget or a part of it on the screen
  Internal:
      Paint( hDC )
      onMouseMove( xPos, yPos )
      onMouseLeave()
      onButtonDown( msg, xPos, yPos )
      onButtonUp( xPos, yPos )     VIRTUAL
      onButtonDbl( xPos, yPos )  VIRTUAL
      onKey( msg, wParam, lParam ) VIRTUAL
      onKillFocus()  VIRTUAL
      End()          VIRTUAL
   

HDrawnTT
DATA
       CLASS VAR oFontDef     (RW) A default font for all drawn tooltips
       CLASS VAR tColorDef    (RW) A default text color for all drawn tooltips
       CLASS VAR bColorDef    (RW) A default background color for all drawn tooltips
  Internal:
       hBitmapTmp
   
METHODS
       New( oWndParent, title, tcolor, bColor, oFont )
       Show( cText, xPos, yPos )
       Hide()
  Internal:
       Paint( hDC )
       onMouseLeave()
   

HDrawnCheck
DATA
      cForTitle               (RW) A char to be displayed as a check mark
   
METHODS
      New( oWndParent, nLeft, nTop, nWidth, nHeight, tcolor, bColor, aStyles,
        title, oFont, bPaint, bClick, bChgState )
      SetState( nState, nPosX, nPosY )
   

HDrawnRadio
DATA
      cForTitle               (RW) A char to be displayed as a check mark
      xGroup                  (RW) A group for this radio widget (any char or number)
   
METHODS
      New( oWndParent, nLeft, nTop, nWidth, nHeight, tcolor, bColor, aStyles,
        title, oFont, bPaint, bClick, bChgState, xGroup, lInitVal )
      SetState( nState, nPosX, nPosY )
      GetGroupValue()         Get a value of appropriate group (number of selected radio widget)
      SetGroupValue( nVal )   Set a value of appropriate group (number of selected radio widget)
   

HDrawnEdit
DATA
      lUtf8                   (RW) Flag - UTF8 codepage is used
      lReadOnly               (RW) Flag - readonly mode
      lUpdated                (R)  Flag - was the text updated
      lInsert                 (RW) Flag - insert or overwrite
      lNoPaste                (RW) Flag - paste is forbidden

      nBoundL                 (RW) Left indent
      nBoundR                 (RW) Right indent
      nBoundT                 (RW) Top indent

      oPenBorder              (R)  A Pen to draw border
      nBorder                 (RW) Border thickness
      nBorderColor            (RW) Border color

      tcolorSel               (RW) text color of a selected fragment
      bcolorSel               (RW) background color of a selected fragment

      cType                   (R)  A type of an edited value (char, date, numeric)
      oPicture                (R)  HPicture object

      nAlign                  (RW)
      bKeyDown, bRClick       (RW)
      bGetFocus, bLostFocus   (RW)
  Internal:
      hEdit
      nPosF 
      nPosC 
      nInit
   
METHODS
      New( oWndParent, nLeft, nTop, nWidth, nHeight,
           tcolor, bcolor, oFont, xInitVal, cPicture, bPaint, bChgState )
      Value( xValue ) SETGET
      DelText( nPos1, nPos2 )
      InsText( nPosC, cText, lOver )
      SetFocus()
  Internal:
      Paint( hDC )
      SetCaretPos( nType, p1 )
      PutChar( wParam )
      onKey( msg, wParam, lParam )
      onMouseMove( xPos, yPos )
      onMouseLeave()
      onButtonDown( msg, xPos, yPos )
      onKillFocus()
      Skip( n )
      End()
   

HDrawnLenta
DATA
      lVertical               (R)
      aItems                  (RW)
      nItemSize               (RW)
      aItemStyle              (RW)
      oFont                   (RW)
      oPen                    (R)
      nFirst                  (RW)
      nSelected               (RW)
  Internal:
      lDrawNext 
      lPressed  
      lMoved    
      nOver     
      nShift    
      nDragKoef 
      xPos, yPos
      bCli
   
METHODS
      New( oWndParent, nLeft, nTop, nWidth, nHeight, oFont,
           bPaint, bClick, color, bcolor, aItems, nItemSize, aItemStyle )
      Value( nValue ) SETGET
  Internal:
      Paint( hDC )
      Drag( xPos, yPos )
      onMouseMove( xPos, yPos )
      onMouseLeave()
      onButtonDown( msg, xPos, yPos )
      onButtonUp( xPos, yPos )
   

HDrawnTrack
DATA
      lVertical               (RW)
      oStyleBar, oStyleSlider (RW)
      lAxis                   (RW)
      nFrom, nTo              (RW)
      nCurr, nSize            (RW)
      tColor2                 (RW)
      oPen1, oPen2            (R)
      bChange                 (RW)
      bEndDrag                (RW)
  Internal:
      lCaptured
   
METHODS
      New( oWndParent, nLeft, nTop, nWidth, nHeight,
           bPaint, tcolor, bcolor, nSize, oStyleBar, oStyleSlider, lAxis )
      Set( nSize, oStyleBar, oStyleSlider, lAxis, bPaint )
      Value ( xValue ) SETGET
      Move( x1, y1, width, height )
  Internal:
      Paint( hDC )
      Drag( xPos, yPos )
      onMouseMove( xPos, yPos )
      onMouseLeave()
      onButtonDown( msg, xPos, yPos )
      onButtonUp( xPos, yPos )
   

HDrawnBrw
DATA
      oData                   (RW)
      aColumns                (RW)

      nHeightRow              (RW)
      nHeightHead             (RW)
      nHeightFoot             (RW)
      aRowPadding             (RW)
      aHeadPadding            (RW)
      aFootPadding            (RW)

      tColorSel, bColorSel    (RW) Text and background colors of a selected row
      httColor, htbColor      (RW) Text and background colors of a selected cell
      bCellBlock              (RW) {|oBrw,nRow,nCol| Return { tColor, bColor, oFont } }
      sepColor                (RW) Separators color
      oPenSep, oPenBorder     (R)
      nBorder                 (RW)
      nBorderColor            (RW)
      oFontHead               (RW)
      oFontFoot               (RW)

      oStyleHead              (RW) A HStyle object to draw the header
      oStyleFoot              (RW) A HStyle object to draw the footer
      oStyleCell              (RW) A HStyle object to draw the cell

      nRowCount               (R) Number of visible data rows
      nRowCurr                (R) Row currently selected

      nColCount               (R) Number of visible data columns
      nColCurr                (R) Column currently selected
      nColFirst               (R) The leftmost column on the screen

      oTrackV, oTrackH        (R)
      nTrackWidth             (RW)
      oStyleBar, oStyleSlider (RW)

      bEnter, bKeyDown        (RW)
      bLostFocus, bRClick     (RW)
      oEdit                   (R)
      lSeleCell               (RW)
  Internal:
      lCaptured
      nColResize              The column to be resized
      aRows                   { { y1,y2 },... }
      lRebuild
   
METHODS
      New( oWndParent, nLeft, nTop, nWidth, nHeight, tcolor, bcolor, oFont
           bPaint, bChgState, lVScroll, lHScroll )

      Rebuild( hDC )
      DoRebuild()  INLINE  (::lRebuild := .T., ::Refresh())
      Cell( iCol )

      Move( [x1, y1, width, height] )
      Refresh( [x1, y1, x2, y2, lNeedRefresh] )
      AddColumn( cHead, block, nWidth, nAlignRow, nAlignHead, lEditable )
      Edit()
      SetFocus()

      Top()
      Skip( n )
      Selected( n )
      ShowTrackV( lShow )
      ShowTrackH( lShow )
  Internal:
      Paint( hDC )
      RowOut( hDC, nRow, x1, y1, x2 )
      HeaderOut( hDC, y1, y2, oStyle, aPadding, npAll, npBack, npItem )
      onKey( msg, wParam, lParam )
      onMouseMove( xPos, yPos )
      onMouseLeave()
      onButtonDown( msg, xPos, yPos )
      onButtonUp( xPos, yPos )
      onButtonDbl( xPos, yPos )
      onKillFocus()
   

HDrawnCombo
DATA
       aItems                       (RW)
       lText                        (RW)
       oText, oBtn, oList           (R)
       arrowColor                   (RW)
       arrowPen                     (R)
       nRowCount                    (RW)
       bChange                      (RW)
       lDlg                         (RW)
  Internal:
       hBitmapList
       oDlg
   
METHODS
      New( oWndParent, nLeft, nTop, nWidth, nHeight, tcolor, bcolor, aStyles,
           oFont, aItems, xValue, lText, bPaint, bChange, bChgState, nRowCount )
      Value( xValue ) SETGET
  Internal:
      Paint( hDC )
      ListShow()
      ListHide()
      onButtonDown( msg, xPos, yPos )
      onButtonUp( xPos, yPos )
   

HDrawnUpdown
DATA
       nLower                 (RW)
       nUpper                 (RW)
       arr                    (RW)

       oEdit, oBtnUp, oBtnDown (R)
       nPeriod                (RW)
       arrowColor             (RW)
       arrowPen               (R)
       oTimer
   
METHODS
    New( oWndParent, nLeft, nTop, nWidth, nHeight, tcolor, bcolor, aStyles,
         oFont, xInit, nLower, nUpper, bPaint, bChgState, arr )
    Value( xValue ) SETGET
  Internal:
    Paint( hDC )
    onKey( msg, wParam, lParam )
    onMouseMove( xPos, yPos )
    onMouseLeave()
    onButtonDown( msg, xPos, yPos )
    onButtonUp( xPos, yPos )
   

HDrawnDate
DATA
      oEdit, oBtn, oList
      oFontCalen
      arrowColor
      arrowPen
      bChange
   
METHODS
      New( oWndParent, nLeft, nTop, nWidth, nHeight, tcolor, bcolor, aStyles,
           oFont, dValue, bPaint, bChange, bChgState )
      Value( xValue ) SETGET
  Internal:
      Paint( hDC )
      ListShow()
      ListHide()
      onKey( msg, wParam, lParam )
      onButtonDown( msg, xPos, yPos )
      onButtonUp( xPos, yPos )
   

prev table of contents next
functions   qhtm integration