PanelS.c 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  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. /**---------------------------------------------------------------------
  24. ***
  25. *** file: PanelS.c
  26. ***
  27. *** project: MotifPlus Widgets
  28. ***
  29. *** description: Source code for DtPanelShell class.
  30. ***
  31. ***
  32. *** (c) Copyright 1992 by Hewlett-Packard Company.
  33. ***
  34. ***
  35. ***-------------------------------------------------------------------*/
  36. /*-------------------------------------------------------------
  37. ** Include Files
  38. */
  39. #include <Xm/XmP.h>
  40. #include <X11/Xatom.h>
  41. #include <X11/StringDefs.h>
  42. #include <X11/Shell.h>
  43. #include <X11/ShellP.h>
  44. #include <Dt/DtStrDefs.h>
  45. #include "PanelSP.h"
  46. /******** Public Function Declarations ********/
  47. /******** End Public Function Declarations ********/
  48. /******** Static Function Declarations ********/
  49. /******** End Static Function Declarations ********/
  50. /*-------------------------------------------------------------
  51. ** Resource List
  52. */
  53. #define R_Offset(field) \
  54. XtOffset (DtPanelShellWidget, panel.field)
  55. static XtResource panelResources[]=
  56. {
  57. {
  58. XmNresolution,
  59. XmCDimension, XmRDimension, sizeof (Dimension),
  60. R_Offset (resolution), XmRImmediate, (XtPointer) 0
  61. },
  62. {
  63. XmNhighResFontList,
  64. XmCHighResFontList, XmRFontList, sizeof (XmFontList),
  65. R_Offset (high_res_font_list), XmRString, (XtPointer) "fixed"
  66. },
  67. {
  68. XmNmediumResFontList,
  69. XmCMediumResFontList, XmRFontList, sizeof (XmFontList),
  70. R_Offset (medium_res_font_list), XmRString, (XtPointer) "fixed"
  71. },
  72. {
  73. XmNlowResFontList,
  74. XmCLowResFontList, XmRFontList, sizeof (XmFontList),
  75. R_Offset (low_res_font_list), XmRString, (XtPointer) "fixed"
  76. }
  77. };
  78. /*-------------------------------------------------------------
  79. ** Class Record
  80. */
  81. static CompositeClassExtensionRec compositeClassExtension =
  82. {
  83. /* next_extension */ NULL,
  84. /* record_type */ NULLQUARK,
  85. /* version */ XtCompositeExtensionVersion,
  86. /* record_size */ sizeof(CompositeClassExtensionRec),
  87. /* accepts_objects */ TRUE
  88. };
  89. DtPanelShellClassRec dtPanelShellClassRec =
  90. {
  91. /* Core Part
  92. */
  93. {
  94. /* superclass */ (WidgetClass) &topLevelShellClassRec,
  95. /* class_name */ "FrontPanel",
  96. /* size */ sizeof(DtPanelShellRec),
  97. /* Class Initializer */ NULL,
  98. /* class_part_initialize*/ NULL,
  99. /* Class init'ed ? */ FALSE,
  100. /* initialize */ NULL,
  101. /* initialize_notify */ NULL,
  102. /* realize */ XtInheritRealize,
  103. /* actions */ NULL,
  104. /* num_actions */ 0,
  105. /* resources */ panelResources,
  106. /* resource_count */ XtNumber(panelResources),
  107. /* xrm_class */ NULLQUARK,
  108. /* compress_motion */ FALSE,
  109. /* compress_exposure */ XtExposeCompressMaximal,
  110. /* compress_enterleave*/ FALSE,
  111. /* visible_interest */ FALSE,
  112. /* destroy */ NULL,
  113. /* resize */ XtInheritResize,
  114. /* expose */ NULL,
  115. /* set_values */ NULL,
  116. /* set_values_hook */ NULL,
  117. /* set_values_almost */ XtInheritSetValuesAlmost,
  118. /* get_values_hook */ NULL,
  119. /* accept_focus */ NULL,
  120. /* intrinsics version */ XtVersion,
  121. /* callback offsets */ NULL,
  122. /* tm_table */ XtInheritTranslations,
  123. /* query_geometry */ NULL,
  124. /* display_accelerator*/ NULL,
  125. /* extension */ NULL
  126. },
  127. /* Composite Part
  128. */
  129. {
  130. /* geometry_manager */ XtInheritGeometryManager,
  131. /* change_managed */ XtInheritChangeManaged,
  132. /* insert_child */ XtInheritInsertChild,
  133. /* delete_child */ XtInheritDeleteChild,
  134. /* extension */ (XtPointer)&compositeClassExtension
  135. },
  136. /* Constraint Part
  137. */
  138. {
  139. /* extension */ NULL
  140. },
  141. {
  142. /* extension */ NULL
  143. },
  144. {
  145. /* extension */ NULL
  146. },
  147. {
  148. /* extension */ NULL
  149. }
  150. };
  151. WidgetClass dtPanelShellWidgetClass = (WidgetClass) &dtPanelShellClassRec;
  152. /*-------------------------------------------------------------
  153. ** Private Procs
  154. **-------------------------------------------------------------
  155. */
  156. /*-------------------------------------------------------------
  157. ** Core Procs
  158. **-------------------------------------------------------------
  159. */