diff --git a/ChangeLog b/ChangeLog index 7ae8c352..46704180 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +2020-04-28 Markus Gans + * Adding the missing method getClientSize() + 2020-04-15 Markus Gans * Better support of general arrow keys * Improved event handling code diff --git a/doc/first-steps.md b/doc/first-steps.md index 2e7c5648..f419157e 100644 --- a/doc/first-steps.md +++ b/doc/first-steps.md @@ -940,6 +940,7 @@ absolute geometry values as a `FRect` object, you can call the method ```cpp const FSize getSize() const; +const FSize getClientSize() const; const FRect& getGeometry() const; const FRect& getTermGeometry(); const FSize& getShadow() const; diff --git a/src/fvterm.cpp b/src/fvterm.cpp index f329aba4..7efb05e5 100644 --- a/src/fvterm.cpp +++ b/src/fvterm.cpp @@ -981,7 +981,7 @@ void FVTerm::getArea (const FRect& box, const FTermArea* area) } //---------------------------------------------------------------------- -void FVTerm::putArea (FTermArea* area) +void FVTerm::putArea (const FTermArea* area) { // Add area changes to the virtual terminal diff --git a/src/include/final/fvterm.h b/src/include/final/fvterm.h index 9add61ad..ed55fbf9 100644 --- a/src/include/final/fvterm.h +++ b/src/include/final/fvterm.h @@ -358,7 +358,7 @@ class FVTerm , bool, FTermArea* ); static void getArea (const FPoint&, const FTermArea*); static void getArea (const FRect&, const FTermArea*); - void putArea (FTermArea*); + void putArea (const FTermArea*); static void putArea (const FPoint&, const FTermArea*); void scrollAreaForward (FTermArea*); void scrollAreaReverse (FTermArea*); diff --git a/src/include/final/fwidget.h b/src/include/final/fwidget.h index 83d91fc0..10945f6c 100644 --- a/src/include/final/fwidget.h +++ b/src/include/final/fwidget.h @@ -220,6 +220,7 @@ class FWidget : public FVTerm, public FObject int getRightPadding() const; std::size_t getClientWidth() const; std::size_t getClientHeight() const; + const FSize getClientSize() const; std::size_t getMaxWidth() const; std::size_t getMaxHeight() const; const FSize& getShadow() const; @@ -724,6 +725,10 @@ inline std::size_t FWidget::getClientWidth() const inline std::size_t FWidget::getClientHeight() const { return wclient_offset.getHeight(); } +//---------------------------------------------------------------------- +inline const FSize FWidget::getClientSize() const +{ return wclient_offset.getSize(); } + //---------------------------------------------------------------------- inline std::size_t FWidget::getMaxWidth() const { return woffset.getWidth(); }