SetPane.c 1019 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /* Copyright Massachusetts Institute of Technology 1985 */
  2. #include "copyright.h"
  3. /*
  4. * XMenu: MIT Project Athena, X Window system menu package
  5. *
  6. * XMenuSetPane - Set a menu pane to be active or inactive.
  7. *
  8. * Author: Tony Della Fera, DEC
  9. * August, 1985
  10. *
  11. */
  12. #include "XMenuInt.h"
  13. int
  14. XMenuSetPane(menu, p_num, active)
  15. register XMenu *menu; /* Menu object to be modified. */
  16. register int p_num; /* Pane number to be modified. */
  17. register int active; /* Make selection active? */
  18. {
  19. register XMPane *p_ptr; /* XMPane pointer. */
  20. /*
  21. * Find the right pane.
  22. */
  23. p_ptr = _XMGetPanePtr(menu, p_num);
  24. if (p_ptr == NULL) return(XM_FAILURE);
  25. /*
  26. * Set its active switch.
  27. */
  28. p_ptr->active = active;
  29. if (p_ptr->active == False) p_ptr->activated = False;
  30. /*
  31. * Return the pane number just set.
  32. */
  33. _XMErrorCode = XME_NO_ERROR;
  34. return(p_num);
  35. }
  36. /* arch-tag: 90bc8d90-031d-41a2-a2c6-04bf94efbc90
  37. (do not change this comment) */