home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / lib / mariner / public / xptabnav.h < prev   
Encoding:
C/C++ Source or Header  |  1998-04-08  |  2.2 KB  |  65 lines

  1. /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  2.  *
  3.  * The contents of this file are subject to the Netscape Public License
  4.  * Version 1.0 (the "NPL"); you may not use this file except in
  5.  * compliance with the NPL.  You may obtain a copy of the NPL at
  6.  * http://www.mozilla.org/NPL/
  7.  *
  8.  * Software distributed under the NPL is distributed on an "AS IS" basis,
  9.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
  10.  * for the specific language governing rights and limitations under the
  11.  * NPL.
  12.  *
  13.  * The Initial Developer of this code under the NPL is Netscape
  14.  * Communications Corporation.  Portions created by Netscape are
  15.  * Copyright (C) 1998 Netscape Communications Corporation.  All Rights
  16.  * Reserved.
  17.  */
  18. /* 
  19.    xptabnav.h --- an API for XP HTML area tabbing.
  20.    Created: Chris Toshok <toshok@netscape.com>, 6-Nov-1997.
  21.  */
  22.  
  23.  
  24. #ifndef _xp_tabnav_h
  25. #define _xp_tabnav_h
  26.  
  27. #include "xp_mem.h"
  28. #include "xp_core.h"
  29. #include "ntypes.h"
  30. #include "lo_ele.h"
  31. #include "layout.h"
  32.  
  33. XP_BEGIN_PROTOS
  34.  
  35. /* To be called when creating a new context. */
  36. extern void XPTAB_InitTabData(MWContext *context);
  37.  
  38. /* To be called when destroying a context. */
  39. extern void XPTAB_DestroyTabData(MWContext *context);
  40.  
  41. /* Call when the user clicks the mouse to set the focus to a particular form element or anchor. */
  42. extern void XPTAB_SetFocusElement(MWContext *context, LO_Element *element);
  43.  
  44. extern LO_Element* XPTAB_GetFocusElement(MWContext *context);
  45. extern int32 XPTAB_GetFocusMapAreaIndex(MWContext *context);
  46. extern void XPTAB_GetFocusMapArea(MWContext *context, lo_MapAreaRec **map_area);
  47.  
  48. /* Call to clear the current tab focus. */
  49. extern void XPTAB_ClearTabFocus(MWContext *context);
  50.  
  51. /* these two functions should be invoked when the user pressed TAB (XPTAB_ToNext*Element)
  52.    and shift TAB (XPTAB_ToPrev*Element).
  53.  
  54.    they return TRUE if the tab actually resulted in focus going to a new element, and
  55.    FALSE otherwise. */
  56. extern Bool XPTAB_TabToNextElement(MWContext *context);
  57. extern Bool XPTAB_TabToPrevElement(MWContext *context);
  58.  
  59. extern Bool XPTAB_TabToNextFormElement(MWContext *context);
  60. extern Bool XPTAB_TabToPrevFormElement(MWContext *context);
  61.  
  62. XP_END_PROTOS
  63.  
  64. #endif /* _xp_tab_h */
  65.