1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 01:07:36 +00:00

HackStudio: Display identifiers as clickable

This extends the "navigate to include" feature to also display
identifiers as clickable when they're hovered over while left control
is pressed.
This commit is contained in:
Itamar 2021-02-20 09:48:54 +02:00 committed by Andreas Kling
parent adb6db9774
commit 50f887c9d5
2 changed files with 26 additions and 21 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2018-2021, Andreas Kling <kling@serenityos.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -76,6 +76,7 @@ private:
void show_documentation_tooltip_if_available(const String&, const Gfx::IntPoint& screen_location);
void navigate_to_include_if_available(String);
void on_navigatable_link_click(const GUI::TextDocumentSpan&);
Gfx::IntRect breakpoint_icon_rect(size_t line_number) const;
static const Gfx::Bitmap& breakpoint_icon_bitmap();
@ -109,7 +110,7 @@ private:
String m_last_parsed_token;
GUI::TextPosition m_previous_text_position { 0, 0 };
bool m_hovering_editor { false };
bool m_hovering_link { false };
bool m_hovering_clickable { false };
bool m_autocomplete_in_focus { false };
OwnPtr<LanguageClient> m_language_client;