Changeset View
Changeset View
Standalone View
Standalone View
abstract_client.h
Show First 20 Lines • Show All 629 Lines • ▼ Show 20 Line(s) | 324 | public: | |||
---|---|---|---|---|---|
630 | virtual void resizeWithChecks(int w, int h, ForceGeometry_t force = NormalGeometrySet) = 0; | 630 | virtual void resizeWithChecks(int w, int h, ForceGeometry_t force = NormalGeometrySet) = 0; | ||
631 | void resizeWithChecks(const QSize& s, ForceGeometry_t force = NormalGeometrySet); | 631 | void resizeWithChecks(const QSize& s, ForceGeometry_t force = NormalGeometrySet); | ||
632 | void keepInArea(QRect area, bool partial = false); | 632 | void keepInArea(QRect area, bool partial = false); | ||
633 | virtual QSize minSize() const; | 633 | virtual QSize minSize() const; | ||
634 | virtual QSize maxSize() const; | 634 | virtual QSize maxSize() const; | ||
635 | virtual void setFrameGeometry(int x, int y, int w, int h, ForceGeometry_t force = NormalGeometrySet) = 0; | 635 | virtual void setFrameGeometry(int x, int y, int w, int h, ForceGeometry_t force = NormalGeometrySet) = 0; | ||
636 | void setFrameGeometry(const QRect &rect, ForceGeometry_t force = NormalGeometrySet); | 636 | void setFrameGeometry(const QRect &rect, ForceGeometry_t force = NormalGeometrySet); | ||
637 | /// How to resize the window in order to obey constains (mainly aspect ratios) | 637 | /// How to resize the window in order to obey constains (mainly aspect ratios) | ||
638 | enum Sizemode { | 638 | enum SizeMode { | ||
639 | SizemodeAny, | 639 | SizeModeAny, | ||
640 | SizemodeFixedW, ///< Try not to affect width | 640 | SizeModeFixedW, ///< Try not to affect width | ||
641 | SizemodeFixedH, ///< Try not to affect height | 641 | SizeModeFixedH, ///< Try not to affect height | ||
642 | SizemodeMax ///< Try not to make it larger in either direction | 642 | SizeModeMax ///< Try not to make it larger in either direction | ||
643 | }; | 643 | }; | ||
644 | /** | 644 | /** | ||
645 | * Calculates the appropriate frame size for the given client size @p wsize. | 645 | * Calculates the appropriate frame size for the given client size @p wsize. | ||
646 | * | 646 | * | ||
647 | * @p wsize is adapted according to the window's size hints (minimum, maximum and incremental size changes). | 647 | * @p wsize is adapted according to the window's size hints (minimum, maximum and incremental size changes). | ||
648 | * | 648 | * | ||
649 | * Default implementation returns the passed in @p wsize. | 649 | * Default implementation returns the passed in @p wsize. | ||
650 | */ | 650 | */ | ||
651 | virtual QSize sizeForClientSize(const QSize &wsize, Sizemode mode = SizemodeAny, bool noframe = false) const; | 651 | virtual QSize sizeForClientSize(const QSize &wsize, SizeMode mode = SizeModeAny, bool noframe = false) const; | ||
652 | 652 | | |||
653 | /** | 653 | /** | ||
654 | * Adjust the frame size @p frame according to the window's size hints. | 654 | * Adjust the frame size @p frame according to the window's size hints. | ||
655 | */ | 655 | */ | ||
656 | QSize adjustedSize(const QSize&, Sizemode mode = SizemodeAny) const; | 656 | QSize adjustedSize(const QSize&, SizeMode mode = SizeModeAny) const; | ||
657 | QSize adjustedSize() const; | 657 | QSize adjustedSize() const; | ||
658 | 658 | | |||
659 | /** | 659 | /** | ||
660 | * Calculates the matching client position for the given frame position @p point. | 660 | * Calculates the matching client position for the given frame position @p point. | ||
661 | */ | 661 | */ | ||
662 | virtual QPoint framePosToClientPos(const QPoint &point) const; | 662 | virtual QPoint framePosToClientPos(const QPoint &point) const; | ||
663 | /** | 663 | /** | ||
664 | * Calculates the matching frame position for the given client position @p point. | 664 | * Calculates the matching frame position for the given client position @p point. | ||
▲ Show 20 Lines • Show All 704 Lines • Show Last 20 Lines |