UserInfoWindow.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /*
  2. * Copyright 2012, Casalinuovo Dario. All rights reserved.
  3. * Copyright 2021, Jaidyn Levesque. All rights reserved.
  4. * Distributed under the terms of the MIT License.
  5. *
  6. * Authors:
  7. * Casalinuovo Dario
  8. * Jaidyn Levesque <jadedctrl@teknik.io>
  9. */
  10. #ifndef _USER_INFO_WINDOW_H
  11. #define _USER_INFO_WINDOW_H
  12. #include <Window.h>
  13. #include <TextView.h>
  14. #include <StringView.h>
  15. #include "AppConstants.h"
  16. #include "Observer.h"
  17. class BitmapView;
  18. class User;
  19. class UserInfoWindow: public BWindow, public Observer {
  20. public:
  21. UserInfoWindow(User* user);
  22. ~UserInfoWindow();
  23. virtual void MessageReceived(BMessage* message);
  24. virtual void ObserveString(int32 what, BString string);
  25. virtual void ObserveInteger(int32 what, int32 num);
  26. virtual void ObservePointer(int32 what, void* ptr);
  27. private:
  28. void _InitInterface();
  29. void _UpdateStatusViews(UserStatus status);
  30. User* fUser;
  31. BitmapView* fAvatar;
  32. BStringView* fNameLabel;
  33. BTextView* fIdLabel;
  34. BitmapView* fStatusIcon;
  35. BStringView* fStatusLabel;
  36. BStringView* fTextStatusLabel;
  37. };
  38. #endif // _USER_INFO_WINDOW_H