2
0

MenuButtonP.h 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. /*
  2. * CDE - Common Desktop Environment
  3. *
  4. * Copyright (c) 1993-2012, The Open Group. All rights reserved.
  5. *
  6. * These libraries and programs are free software; you can
  7. * redistribute them and/or modify them under the terms of the GNU
  8. * Lesser General Public License as published by the Free Software
  9. * Foundation; either version 2 of the License, or (at your option)
  10. * any later version.
  11. *
  12. * These libraries and programs are distributed in the hope that
  13. * they will be useful, but WITHOUT ANY WARRANTY; without even the
  14. * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  15. * PURPOSE. See the GNU Lesser General Public License for more
  16. * details.
  17. *
  18. * You should have received a copy of the GNU Lesser General Public
  19. * License along with these libraries and programs; if not, write
  20. * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
  21. * Floor, Boston, MA 02110-1301 USA
  22. */
  23. /* $XConsortium: MenuButtonP.h /main/3 1995/10/26 09:33:17 rswiston $ */
  24. /*
  25. * Copyright (C) 1986,1991 Sun Microsystems, Inc
  26. * All rights reserved.
  27. * Notice of copyright on this source code
  28. * product does not indicate publication.
  29. *
  30. * RESTRICTED RIGHTS LEGEND: Use, duplication, or disclosure by
  31. * the U.S. Government is subject to restrictions as set forth
  32. * in subparagraph (c)(1)(ii) of the Rights in Technical Data
  33. * and Computer Software Clause at DFARS 252.227-7013 (Oct. 1988)
  34. * and FAR 52.227-19 (c) (June 1987).
  35. *
  36. * Sun Microsystems, Inc., 2550 Garcia Avenue,
  37. * Mountain View, California 94043.
  38. *
  39. */
  40. #ifndef _DtMenuButtonP_h
  41. #define _DtMenuButtonP_h
  42. #include "MenuButton.h"
  43. #include <Xm/LabelP.h>
  44. #ifdef __cplusplus
  45. extern "C" {
  46. #endif
  47. /****************************************************************
  48. *
  49. * Message Defines
  50. *
  51. ****************************************************************/
  52. #define MB_POST DTWIDGET_GETMESSAGE( \
  53. MS_MenuButton, MENU_POST, _DtMsgMenuButton_0000)
  54. #define MB_PARENT DTWIDGET_GETMESSAGE( \
  55. MS_MenuButton, MENU_PARENT, _DtMsgMenuButton_0001)
  56. #define MB_SUBMENU DTWIDGET_GETMESSAGE( \
  57. MS_MenuButton, MENU_SUBMENU, _DtMsgMenuButton_0002)
  58. /* The MenuButton instance record */
  59. typedef struct
  60. { /* resources */
  61. XtCallbackList cascading_callback; /* Cascading callback */
  62. Widget submenu; /* the menu to pull down */
  63. Pixmap menu_pixmap; /* pixmap for the menu */
  64. /* internal fields */
  65. Boolean armed; /* armed flag */
  66. Boolean popped_up; /* submenu popped up flag*/
  67. XRectangle menu_rect; /* location of menu*/
  68. Time last_timestamp; /* last time submenu popped down */
  69. Boolean private_submenu;
  70. GC gc;
  71. } DtMenuButtonPart;
  72. /* Full instance record declaration */
  73. typedef struct _DtMenuButtonRec
  74. {
  75. CorePart core;
  76. XmPrimitivePart primitive;
  77. XmLabelPart label;
  78. DtMenuButtonPart menu_button;
  79. } DtMenuButtonRec;
  80. /* MenuButton class structure */
  81. typedef struct {
  82. XtPointer extension; /* Pointer to extension record */
  83. } DtMenuButtonClassPart;
  84. /* Full class record declaration for MenuButton class */
  85. typedef struct _DtMenuButtonClassRec {
  86. CoreClassPart core_class;
  87. XmPrimitiveClassPart primitive_class;
  88. XmLabelClassPart label_class;
  89. DtMenuButtonClassPart menu_button_class;
  90. } DtMenuButtonClassRec;
  91. extern DtMenuButtonClassRec dtMenuButtonClassRec;
  92. #ifdef __cplusplus
  93. } /* Close scope of 'extern "C"' declaration which encloses file. */
  94. #endif
  95. #endif /* _DtMenuButtonP_h */
  96. /* DON'T ADD STUFF AFTER THIS #endif */