home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ool.zip / OOL / include / xwebview.h < prev    next >
C/C++ Source or Header  |  1997-02-23  |  3KB  |  71 lines

  1. #ifndef __OOL_XWEBVIEW_H__
  2. #define __OOL_XWEBVIEW_H__
  3.  
  4. /*===========================================================================*/
  5. /* OOL ------------------- the Open Object Library ------------- OS/2 Beta 1 */
  6. /*===========================================================================*/
  7. /*                              class: XWebView                              */
  8. /*                       derived from: XControl                              */
  9. /*                        last update: 10/96                                 */
  10. /*                      programmed by: Stefan von Brauk (sbrauk@gwdg.de)     */
  11. /*===========================================================================*/
  12.  
  13. #include "XControl.h"
  14. #include "XString.h"
  15.  
  16. #ifdef OOL_FOR_OS2_X86
  17.    #define WEB_SUCCESS   0
  18.    #define WEB_ERROR     -1
  19.    #define WEB_CANCELLED 1
  20.  
  21.    #define WEB_CONNECT   1
  22.    #define WEB_WAIT      2
  23.    #define WEB_LOADDATA  3
  24.    #define WEB_RENDER    4
  25.  
  26.    #define WEB_FORMAT_BINARY 0
  27.    #define WEB_FORMAT_7BIT   1
  28.    #define WEB_FORMAT_8BIT   2
  29.  
  30.    #define WEB_POINTER_NORMAL  0
  31.    #define WEB_POINTER_WAIT    1
  32.    #define WEB_POINTER_ANCHOR  2
  33.    #define WEB_POINTER_UNKNOWN 3
  34.  
  35.    #define WEB_ANCHOR_DEFAULT 0
  36.    #define WEB_ANCHOR_VISITED 1
  37. #endif
  38.  
  39.  
  40. class _export_ XWebView: public XControl
  41. {
  42.    friend class webDefHandler;
  43.    public:
  44.       XWebView( const XWindow * owner, const XRect * rec, const USHORT id = 0);
  45.       virtual void ButtonPressed( SHORT num, SHORT x, SHORT y) { ;}
  46.       virtual void HandleError( ULONG msgID, char * errorMsg) {;}
  47.       BOOL IsLoading(void) const ;
  48.       virtual LONG Load( const char * url, const BOOL reload = FALSE);
  49.       virtual void LoadResult( LONG res) { ;}
  50.       virtual void LoadProgress( LONG status ) { ;}
  51.       BOOL GetAnchorState( const char * anchor, LONG& state);
  52.       BOOL GetDocAnchor( XString * buffer);
  53.       BOOL GetDocTitle( XString * buffer);
  54.       BOOL GetExtMap( const char * extension, XString * MIMEType, SHORT& format);
  55.       LONG GetLastError(void) const ;
  56.       LONG GetLastLoadError(void) const ;
  57.       OOL_POINTERHANDLE GetPointer( const LONG pointerType);
  58.       BOOL GetPos( const XPoint * mouse, XPoint * view);
  59.       BOOL GetViewer( const char * MIMEType, XString * program);
  60.       LONG SaveToFile( const char * url, const char * filePath, const BOOL reload = FALSE);
  61.       BOOL Search( const char * searchString, const XPoint * start, XPoint * resBuffer, const BOOL forward = TRUE);
  62.       BOOL SetAnchorState( const char * anchor, const LONG state);
  63.       BOOL SetExtMap( const char * extension, const char * MIMEType, const SHORT format = 0);
  64.       void SetOptions( const char * emailAdress, const char * newsSever=NULL);
  65.       BOOL SetPointer( const OOL_POINTERHANDLE pointer, const LONG pointerType);
  66.       BOOL SetViewer( const char * MIMEType, const char * program);
  67.       void StopLoading(void) const ;
  68. };
  69.  
  70. #endif
  71.