home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / cmd / xfe / XfeWidgets / Xfe / Cascade.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  4.1 KB  |  116 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. /*                                                                        */
  20. /* Name:        <Xfe/Cascade.h>                                            */
  21. /* Description:    XfeCascade widget public header file.                    */
  22. /* Author:        Ramiro Estrugo <ramiro@netscape.com>                    */
  23. /*                                                                        */
  24. /*----------------------------------------------------------------------*/
  25.  
  26.  
  27. #ifndef _XfeCascade_h_                            /* start Cascade.h        */
  28. #define _XfeCascade_h_
  29.  
  30. #include <Xfe/Button.h>
  31.  
  32. #ifdef __cplusplus                                /* start C++            */
  33. extern "C" {
  34. #endif
  35.  
  36. /*----------------------------------------------------------------------*/
  37. /*                                                                        */
  38. /* XmRLocationType                                                        */
  39. /*                                                                        */
  40. /*----------------------------------------------------------------------*/
  41. enum
  42. {
  43.     XmLOCATION_EAST,
  44.     XmLOCATION_NORTH,
  45.     XmLOCATION_NORTH_EAST,
  46.     XmLOCATION_NORTH_WEST,
  47.     XmLOCATION_SOUTH,
  48.     XmLOCATION_SOUTH_EAST,
  49.     XmLOCATION_SOUTH_WEST,
  50.     XmLOCATION_WEST
  51. };
  52. /*----------------------------------------------------------------------*/
  53.  
  54. /*----------------------------------------------------------------------*/
  55. /*                                                                        */
  56. /* Cascade tear submenu callback structure                                */
  57. /*                                                                        */
  58. /*----------------------------------------------------------------------*/
  59. typedef struct
  60. {
  61.     int            reason;                    /* Reason why CB was invoked    */
  62.     XEvent *    event;                    /* Event that triggered CB        */
  63.     Boolean        torn;                    /* Cascade torn ?                */
  64. } XfeSubmenuTearCallbackStruct;
  65.  
  66. /*----------------------------------------------------------------------*/
  67. /*                                                                        */
  68. /* XfeCascade class names                                                */
  69. /*                                                                        */
  70. /*----------------------------------------------------------------------*/
  71. externalref WidgetClass xfeCascadeWidgetClass;
  72.     
  73. typedef struct _XfeCascadeClassRec *    XfeCascadeWidgetClass;
  74. typedef struct _XfeCascadeRec *            XfeCascadeWidget;
  75.  
  76. /*----------------------------------------------------------------------*/
  77. /*                                                                        */
  78. /* XfeCascade subclass test macro                                        */
  79. /*                                                                        */
  80. /*----------------------------------------------------------------------*/
  81. #define XfeIsCascade(w)    XtIsSubclass(w,xfeCascadeWidgetClass)
  82.  
  83. /*----------------------------------------------------------------------*/
  84. /*                                                                        */
  85. /* XfeCascade public functions                                            */
  86. /*                                                                        */
  87. /*----------------------------------------------------------------------*/
  88. extern Widget
  89. XfeCreateCascade            (Widget        parent,
  90.                              String        name,
  91.                              Arg *        args,
  92.                              Cardinal    num_args);
  93. /*----------------------------------------------------------------------*/
  94. extern void
  95. XfeCascadeDestroyChildren    (Widget        w);
  96. /*----------------------------------------------------------------------*/
  97. extern Boolean
  98. XfeCascadeArmAndPost        (Widget        w,
  99.                              XEvent *    event);
  100. /*----------------------------------------------------------------------*/
  101. extern Boolean
  102. XfeCascadeDisarmAndUnpost    (Widget        w,
  103.                              XEvent *    event);
  104. /*----------------------------------------------------------------------*/
  105. extern void
  106. XfeCascadeGetChildren        (Widget            w,
  107.                              WidgetList *    children,
  108.                              Cardinal *        num_children);
  109. /*----------------------------------------------------------------------*/
  110.  
  111. #ifdef __cplusplus                                /* end C++                */
  112. }
  113. #endif
  114.  
  115. #endif                                            /* end Cascade.h        */
  116.