ClientWindow.h 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. /*
  2. * The contents of this file are subject to the Mozilla Public
  3. * License Version 1.1 (the "License"); you may not use this file
  4. * except in compliance with the License. You may obtain a copy of
  5. * the License at http://www.mozilla.org/MPL/
  6. *
  7. * Software distributed under the License is distributed on an "AS
  8. * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
  9. * implied. See the License for the specific language governing
  10. * rights and limitations under the License.
  11. *
  12. * The Original Code is Vision.
  13. *
  14. * The Initial Developer of the Original Code is The Vision Team.
  15. * Portions created by The Vision Team are
  16. * Copyright (C) 1999, 2000, 2001 The Vision Team. All Rights
  17. * Reserved.
  18. *
  19. * Contributor(s): Wade Majors <wade@ezri.org>
  20. * Rene Gollent
  21. * Todd Lair
  22. * Andrew Bazan
  23. * Jamie Wilkinson
  24. */
  25. #ifndef _CLIENTWINDOW_H_
  26. #define _CLIENTWINDOW_H_
  27. #include <Window.h>
  28. #include <String.h>
  29. #define STATUS_SERVER 0
  30. #define STATUS_LAG 1
  31. #define STATUS_NICK 2
  32. #define STATUS_USERS 3
  33. #define STATUS_OPS 4
  34. #define STATUS_MODES 5
  35. #define STATUS_META 6
  36. class BMenu;
  37. class BMenuBar;
  38. class BMenuItem;
  39. class BScrollView;
  40. class BView;
  41. class BMessageRunner;
  42. class ClientWindowDock;
  43. class NotifyList;
  44. class NotifyListItem;
  45. class ResizeView;
  46. class ServerAgent;
  47. class StatusView;
  48. class TIconMenu;
  49. class WindowList;
  50. class WindowListItem;
  51. class ClientWindow : public BWindow
  52. {
  53. protected:
  54. BMenuBar *fMenuBar;
  55. BMenu *fServer,
  56. *fEdit,
  57. *fWindow;
  58. TIconMenu *fApp;
  59. public:
  60. ClientWindow (BRect);
  61. virtual ~ClientWindow (void);
  62. virtual void FrameMoved (BPoint);
  63. virtual void FrameResized (float width, float height);
  64. virtual void MessageReceived (BMessage *);
  65. virtual bool QuitRequested (void);
  66. virtual void ScreenChanged (BRect, color_space);
  67. virtual void Show (void);
  68. // accessors that add/remove menus to the main Vision menu bar
  69. void AddMenu (BMenu *);
  70. void RemoveMenu (BMenu *);
  71. ServerAgent *GetTopServer (WindowListItem *) const;
  72. bool ServerBroadcast (BMessage *) const;
  73. void SetEditStates(bool);
  74. BView *bgView;
  75. BRect *AgentRect (void) const;
  76. WindowList *pWindowList (void) const;
  77. NotifyList *pNotifyList (void) const;
  78. ClientWindowDock *pCwDock (void) const;
  79. StatusView *pStatusView (void) const;
  80. BString joinStrings; // used to keep track of channel
  81. // keys on u2 ircds
  82. private:
  83. void Init (void);
  84. bool fShutdown_in_progress;
  85. bool fWait_for_quits;
  86. bool fAltw_catch;
  87. BMessageRunner *fAltwRunner;
  88. BRect *fAgentrect;
  89. StatusView *fStatus;
  90. ClientWindowDock *fCwDock;
  91. ResizeView *fResize;
  92. };
  93. #endif