ScopeMenu.hh 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. /* $XConsortium: ScopeMenu.hh /main/4 1996/10/02 08:27:11 cde-hal $ */
  2. /*
  3. * (c) Copyright 1996 Digital Equipment Corporation.
  4. * (c) Copyright 1996 Hewlett-Packard Company.
  5. * (c) Copyright 1996 International Business Machines Corp.
  6. * (c) Copyright 1996 Sun Microsystems, Inc.
  7. * (c) Copyright 1996 Novell, Inc.
  8. * (c) Copyright 1996 FUJITSU LIMITED.
  9. * (c) Copyright 1996 Hitachi.
  10. */
  11. /*
  12. * Copyright (c) 1994 HAL Computer Systems International, Ltd.
  13. * All rights reserved. Unpublished -- rights reserved under
  14. * the Copyright Laws of the United States. USE OF A COPYRIGHT
  15. * NOTICE IS PRECAUTIONARY ONLY AND DOES NOT IMPLY PUBLICATION
  16. * OR DISCLOSURE.
  17. *
  18. * THIS SOFTWARE CONTAINS CONFIDENTIAL INFORMATION AND TRADE
  19. * SECRETS OF HAL COMPUTER SYSTEMS INTERNATIONAL, LTD. USE,
  20. * DISCLOSURE, OR REPRODUCTION IS PROHIBITED WITHOUT THE
  21. * PRIOR EXPRESS WRITTEN PERMISSION OF HAL COMPUTER SYSTEMS
  22. * INTERNATIONAL, LTD.
  23. *
  24. * RESTRICTED RIGHTS LEGEND
  25. * Use, duplication, or disclosure by the Government is subject
  26. * to the restrictions as set forth in subparagraph (c)(l)(ii)
  27. * of the Rights in Technical Data and Computer Software clause
  28. * at DFARS 252.227-7013.
  29. *
  30. * HAL COMPUTER SYSTEMS INTERNATIONAL, LTD.
  31. * 1315 Dell Avenue
  32. * Campbell, CA 95008
  33. *
  34. */
  35. #include <WWL/WXmMenu.h>
  36. class WXmArrowButton;
  37. struct UpdateMenu;
  38. // A ScopeMenu is not a real menu, it's only an object responsible to update
  39. // the pulldown menu associated to the given option menu (make sure they both
  40. // are already created before creating such an object.
  41. class ScopeMenu : public WWL,
  42. public UAS_Receiver<ScopeCreated>,
  43. public UAS_Receiver<ScopeDeleted>,
  44. public UAS_Receiver<ScopeRenamed>,
  45. public UAS_Receiver<UpdateMenu>
  46. {
  47. public:
  48. ScopeMenu (Widget option_menu, bool requires_current_section = FALSE);
  49. virtual ~ScopeMenu();
  50. UAS_SearchScope *current_scope()
  51. { return (f_current_scope); }
  52. private:
  53. void fill_menu();
  54. void set_scope (WCallback *);
  55. void destroy_scope (WCallback *);
  56. void receive (ScopeCreated &, void *client_data);
  57. void receive (ScopeDeleted &, void *client_data);
  58. void receive (ScopeRenamed &, void *client_data);
  59. void receive (UpdateMenu &, void *client_data);
  60. private:
  61. UAS_SearchScope *f_current_scope;
  62. bool f_use_current_section ;
  63. Widget f_option_menu;
  64. Widget f_pull_menu;
  65. };