mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 06:27:45 +00:00
LibCore+LibGUI: Remove leftover gunk after Inspector removal
Just some functions in Core::Object and GUI::Widget that aren't called from anywhere anymore.
This commit is contained in:
parent
26647f2b10
commit
887dfd72b9
4 changed files with 0 additions and 43 deletions
|
@ -192,20 +192,6 @@ bool Object::is_visible_for_timer_purposes() const
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Object::increment_inspector_count(Badge<InspectorServerConnection>)
|
|
||||||
{
|
|
||||||
++m_inspector_count;
|
|
||||||
if (m_inspector_count == 1)
|
|
||||||
did_begin_inspection();
|
|
||||||
}
|
|
||||||
|
|
||||||
void Object::decrement_inspector_count(Badge<InspectorServerConnection>)
|
|
||||||
{
|
|
||||||
--m_inspector_count;
|
|
||||||
if (!m_inspector_count)
|
|
||||||
did_end_inspection();
|
|
||||||
}
|
|
||||||
|
|
||||||
void Object::set_event_filter(Function<bool(Core::Event&)> filter)
|
void Object::set_event_filter(Function<bool(Core::Event&)> filter)
|
||||||
{
|
{
|
||||||
m_event_filter = move(filter);
|
m_event_filter = move(filter);
|
||||||
|
|
|
@ -20,8 +20,6 @@
|
||||||
|
|
||||||
namespace Core {
|
namespace Core {
|
||||||
|
|
||||||
class InspectorServerConnection;
|
|
||||||
|
|
||||||
enum class TimerShouldFireWhenNotVisible {
|
enum class TimerShouldFireWhenNotVisible {
|
||||||
No = 0,
|
No = 0,
|
||||||
Yes
|
Yes
|
||||||
|
@ -158,11 +156,6 @@ public:
|
||||||
|
|
||||||
virtual bool is_visible_for_timer_purposes() const;
|
virtual bool is_visible_for_timer_purposes() const;
|
||||||
|
|
||||||
bool is_being_inspected() const { return m_inspector_count; }
|
|
||||||
|
|
||||||
void increment_inspector_count(Badge<InspectorServerConnection>);
|
|
||||||
void decrement_inspector_count(Badge<InspectorServerConnection>);
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
explicit Object(Object* parent = nullptr);
|
explicit Object(Object* parent = nullptr);
|
||||||
|
|
||||||
|
@ -174,14 +167,10 @@ protected:
|
||||||
// NOTE: You may get child events for children that are not yet fully constructed!
|
// NOTE: You may get child events for children that are not yet fully constructed!
|
||||||
virtual void child_event(ChildEvent&);
|
virtual void child_event(ChildEvent&);
|
||||||
|
|
||||||
virtual void did_begin_inspection() { }
|
|
||||||
virtual void did_end_inspection() { }
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Object* m_parent { nullptr };
|
Object* m_parent { nullptr };
|
||||||
DeprecatedString m_name;
|
DeprecatedString m_name;
|
||||||
int m_timer_id { 0 };
|
int m_timer_id { 0 };
|
||||||
unsigned m_inspector_count { 0 };
|
|
||||||
Vector<NonnullRefPtr<Object>> m_children;
|
Vector<NonnullRefPtr<Object>> m_children;
|
||||||
Function<bool(Core::Event&)> m_event_filter;
|
Function<bool(Core::Event&)> m_event_filter;
|
||||||
};
|
};
|
||||||
|
|
|
@ -415,11 +415,6 @@ void Widget::handle_paint_event(PaintEvent& event)
|
||||||
Painter painter(*this);
|
Painter painter(*this);
|
||||||
painter.draw_rect(rect(), Color::Red);
|
painter.draw_rect(rect(), Color::Red);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_being_inspected()) {
|
|
||||||
Painter painter(*this);
|
|
||||||
painter.draw_rect(rect(), Color::Magenta);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Widget::set_layout(NonnullRefPtr<Layout> layout)
|
void Widget::set_layout(NonnullRefPtr<Layout> layout)
|
||||||
|
@ -1089,16 +1084,6 @@ Gfx::Palette Widget::palette() const
|
||||||
return Gfx::Palette(*m_palette);
|
return Gfx::Palette(*m_palette);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Widget::did_begin_inspection()
|
|
||||||
{
|
|
||||||
update();
|
|
||||||
}
|
|
||||||
|
|
||||||
void Widget::did_end_inspection()
|
|
||||||
{
|
|
||||||
update();
|
|
||||||
}
|
|
||||||
|
|
||||||
void Widget::set_grabbable_margins(Margins const& margins)
|
void Widget::set_grabbable_margins(Margins const& margins)
|
||||||
{
|
{
|
||||||
if (m_grabbable_margins == margins)
|
if (m_grabbable_margins == margins)
|
||||||
|
|
|
@ -404,9 +404,6 @@ protected:
|
||||||
virtual void screen_rects_change_event(ScreenRectsChangeEvent&);
|
virtual void screen_rects_change_event(ScreenRectsChangeEvent&);
|
||||||
virtual void applet_area_rect_change_event(AppletAreaRectChangeEvent&);
|
virtual void applet_area_rect_change_event(AppletAreaRectChangeEvent&);
|
||||||
|
|
||||||
virtual void did_begin_inspection() override;
|
|
||||||
virtual void did_end_inspection() override;
|
|
||||||
|
|
||||||
void show_or_hide_tooltip();
|
void show_or_hide_tooltip();
|
||||||
|
|
||||||
void add_focus_delegator(Widget*);
|
void add_focus_delegator(Widget*);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue