TDE graphics utilities
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. /**
  2. * Copyright (C) 2001-2002 the KGhostView authors. See file AUTHORS.
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License as published by
  6. * the Free Software Foundation; either version 2 of the License, or
  7. * (at your option) any later version.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with this program; if not, write to the Free Software
  16. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  17. */
  18. #ifndef KGVPAGEDECORATOR_H
  19. #define KGVPAGEDECORATOR_H
  20. #include <tqhbox.h>
  21. class KGVPageDecorator : public TQHBox
  22. {
  23. public:
  24. KGVPageDecorator( TQWidget* parent = 0, const char* name = 0 );
  25. ~KGVPageDecorator() { ; }
  26. unsigned int margin() const;
  27. unsigned int borderWidth() const;
  28. /**
  29. * Reimplemented from TQObject to let mouse events from child widgets
  30. * appear to come from this widget.
  31. */
  32. bool eventFilter( TQObject*, TQEvent* );
  33. protected:
  34. /**
  35. * Reimplemented from TQObject to automatically insert an event filter
  36. * on child widgets.
  37. */
  38. virtual void childEvent( TQChildEvent* );
  39. /**
  40. * Reimplemented from TQFrame to draw a pageshadow like frame.
  41. */
  42. virtual void drawFrame( TQPainter* );
  43. /**
  44. * Draw the mask of both the frame and the contents in order to create a
  45. * partially transparent frame.
  46. */
  47. virtual void drawMask( TQPainter* );
  48. /**
  49. * Reimplemented from TQWidget. It uses @ref drawMask() to draw the mask
  50. * of the frame when transparency is required.
  51. */
  52. virtual void updateMask();
  53. private:
  54. unsigned int _margin;
  55. unsigned int _borderWidth;
  56. TQPoint _shadowOffset;
  57. };
  58. inline unsigned int KGVPageDecorator::margin() const
  59. {
  60. return _margin;
  61. }
  62. inline unsigned int KGVPageDecorator::borderWidth() const
  63. {
  64. return _borderWidth;
  65. }
  66. #endif
  67. // vim:sw=4:sts=4:ts=8:noet