forked from SerenityOS/serenity
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
LibGUI: Rename ScrollableWidget => AbstractScrollableWidget
- Loading branch information
1 parent
6212579
commit d47f15a
Showing
26 changed files
with
95 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
* Copyright (c) 2018-2020, Andreas Kling <[email protected]> | ||
* Copyright (c) 2018-2021, Andreas Kling <[email protected]> | ||
* | ||
* SPDX-License-Identifier: BSD-2-Clause | ||
*/ | ||
|
@@ -11,10 +11,11 @@ | |
|
||
namespace GUI { | ||
|
||
class ScrollableWidget : public Frame { | ||
C_OBJECT(ScrollableWidget) | ||
class AbstractScrollableWidget : public Frame { | ||
C_OBJECT_ABSTRACT(AbstractScrollableWidget); | ||
|
||
public: | ||
virtual ~ScrollableWidget() override; | ||
virtual ~AbstractScrollableWidget() override; | ||
|
||
Gfx::IntSize content_size() const { return m_content_size; } | ||
int content_width() const { return m_content_size.width(); } | ||
|
@@ -63,7 +64,7 @@ class ScrollableWidget : public Frame { | |
Gfx::IntRect to_widget_rect(const Gfx::IntRect& content_rect) const { return { to_widget_position(content_rect.location()), content_rect.size() }; } | ||
|
||
protected: | ||
ScrollableWidget(); | ||
AbstractScrollableWidget(); | ||
virtual void custom_layout() override; | ||
virtual void resize_event(ResizeEvent&) override; | ||
virtual void mousewheel_event(MouseEvent&) override; | ||
|
@@ -72,11 +73,11 @@ class ScrollableWidget : public Frame { | |
void set_size_occupied_by_fixed_elements(const Gfx::IntSize&); | ||
|
||
private: | ||
class ScrollableWidgetScrollbar final : public Scrollbar { | ||
C_OBJECT(ScrollableWidgetScrollbar); | ||
class AbstractScrollableWidgetScrollbar final : public Scrollbar { | ||
C_OBJECT(AbstractScrollableWidgetScrollbar); | ||
|
||
protected: | ||
explicit ScrollableWidgetScrollbar(ScrollableWidget& owner, Gfx::Orientation orientation) | ||
explicit AbstractScrollableWidgetScrollbar(AbstractScrollableWidget& owner, Gfx::Orientation orientation) | ||
: Scrollbar(orientation) | ||
, m_owner(owner) | ||
{ | ||
|
@@ -88,15 +89,15 @@ class ScrollableWidget : public Frame { | |
} | ||
|
||
private: | ||
ScrollableWidget& m_owner; | ||
AbstractScrollableWidget& m_owner; | ||
}; | ||
friend class ScrollableWidgetScrollbar; | ||
|
||
void update_scrollbar_ranges(); | ||
void handle_wheel_event(MouseEvent&, Widget&); | ||
|
||
RefPtr<ScrollableWidgetScrollbar> m_vertical_scrollbar; | ||
RefPtr<ScrollableWidgetScrollbar> m_horizontal_scrollbar; | ||
RefPtr<AbstractScrollableWidgetScrollbar> m_vertical_scrollbar; | ||
RefPtr<AbstractScrollableWidgetScrollbar> m_horizontal_scrollbar; | ||
RefPtr<Widget> m_corner_widget; | ||
Gfx::IntSize m_content_size; | ||
Gfx::IntSize m_size_occupied_by_fixed_elements; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.