home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / cmd / xfe / XfeWidgets / Xfe / ToolBar.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  3.8 KB  |  106 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/ToolBar.h>                                            */
  21. /* Description:    XfeToolBar widget public header file.                    */
  22. /* Author:        Ramiro Estrugo <ramiro@netscape.com>                    */
  23. /*                                                                        */
  24. /*----------------------------------------------------------------------*/
  25.  
  26.  
  27. #ifndef _XfeToolBar_h_                            /* start ToolBar.h        */
  28. #define _XfeToolBar_h_
  29.  
  30. #include <Xfe/Oriented.h>
  31. #include <Xfe/Cascade.h>
  32.  
  33. #ifdef __cplusplus                                /* start C++            */
  34. extern "C" {
  35. #endif
  36.  
  37. /*----------------------------------------------------------------------*/
  38. /*                                                                        */
  39. /* XmRToolBarSelectionType                                                */
  40. /*                                                                        */
  41. /*----------------------------------------------------------------------*/
  42. enum
  43. {
  44.     XmTOOL_BAR_SELECT_NONE,
  45.     XmTOOL_BAR_SELECT_SINGLE,
  46.     XmTOOL_BAR_SELECT_MULTIPLE
  47. };
  48. /*----------------------------------------------------------------------*/
  49.  
  50. /*----------------------------------------------------------------------*/
  51. /*                                                                        */
  52. /* ToolBar callback structure                                            */
  53. /*                                                                        */
  54. /*----------------------------------------------------------------------*/
  55. typedef struct
  56. {
  57.     int            reason;                    /* Reason why CB was invoked    */
  58.     XEvent *    event;                    /* Event that triggered CB        */
  59.     Widget        button;                    /* Button that invoked callback    */
  60.     Boolean        armed;                    /* Button armed ?                */
  61.     Boolean        selected;                /* Button selected ?            */
  62. } XfeToolBarCallbackStruct;
  63.  
  64. /*----------------------------------------------------------------------*/
  65. /*                                                                        */
  66. /* XfeBox class names                                                    */
  67. /*                                                                        */
  68. /*----------------------------------------------------------------------*/
  69. externalref WidgetClass xfeToolBarWidgetClass;
  70.  
  71. typedef struct _XfeToolBarClassRec *        XfeToolBarWidgetClass;
  72. typedef struct _XfeToolBarRec *                XfeToolBarWidget;
  73.  
  74. /*----------------------------------------------------------------------*/
  75. /*                                                                        */
  76. /* XfeBox subclass test macro                                            */
  77. /*                                                                        */
  78. /*----------------------------------------------------------------------*/
  79. #define XfeIsToolBar(w)    XtIsSubclass(w,xfeToolBarWidgetClass)
  80.  
  81. /*----------------------------------------------------------------------*/
  82. /*                                                                        */
  83. /* XfeToolBar Public Methods                                            */
  84. /*                                                                        */
  85. /*----------------------------------------------------------------------*/
  86. extern Widget
  87. XfeCreateToolBar                (Widget        pw,
  88.                                  String        name,
  89.                                  Arg *        av,
  90.                                  Cardinal    ac);
  91. /*----------------------------------------------------------------------*/
  92. extern Boolean
  93. XfeToolBarSetActiveButton        (Widget        w,
  94.                                  Widget        button);
  95. /*----------------------------------------------------------------------*/
  96. extern Boolean
  97. XfeToolBarSetSelectedButton        (Widget        w,
  98.                                  Widget        button);
  99. /*----------------------------------------------------------------------*/
  100.  
  101. #ifdef __cplusplus                                /* end C++                */
  102. }
  103. #endif
  104.  
  105. #endif                                            /* end ToolBar.h        */
  106.