Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /* Copyright (C) 2002-2005 RealVNC Ltd. All Rights Reserved.
  2. *
  3. * This is free software; you can redistribute it and/or modify
  4. * it under the terms of the GNU General Public License as published by
  5. * the Free Software Foundation; either version 2 of the License, or
  6. * (at your option) any later version.
  7. *
  8. * This software is distributed in the hope that it will be useful,
  9. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. * GNU General Public License for more details.
  12. *
  13. * You should have received a copy of the GNU General Public License
  14. * along with this software; if not, write to the Free Software
  15. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
  16. * USA.
  17. */
  18. //
  19. // InfoDialog.h
  20. //
  21. #ifndef __INFODIALOG_H__
  22. #define __INFODIALOG_H__
  23. #include "TXDialog.h"
  24. #include "TXLabel.h"
  25. #include "TXButton.h"
  26. extern char buildtime[];
  27. class InfoDialog : public TXDialog, public TXButtonCallback {
  28. public:
  29. InfoDialog(Display* dpy)
  30. : TXDialog(dpy, 1, 1, _("VNC connection info")),
  31. infoLabel(dpy, "", this, 1, 1, TXLabel::left),
  32. okButton(dpy, "OK", this, this, 60)
  33. {
  34. infoLabel.xPad = 8;
  35. infoLabel.move(0, yPad*4);
  36. setBorderWidth(1);
  37. }
  38. void setText(char* infoText) {
  39. infoLabel.setText(infoText);
  40. resize(infoLabel.width(),
  41. infoLabel.height() + okButton.height() + yPad*12);
  42. okButton.move((width() - okButton.width()) / 2,
  43. height() - yPad*4 - okButton.height());
  44. }
  45. virtual void buttonActivate(TXButton* b) {
  46. unmap();
  47. }
  48. TXLabel infoLabel;
  49. TXButton okButton;
  50. };
  51. #endif