mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 04:17:35 +00:00
LibGUI: Remove more header dependencies from Widget.h
This commit is contained in:
parent
69400c2ca1
commit
e1ff4fa034
12 changed files with 26 additions and 8 deletions
|
@ -30,11 +30,12 @@
|
|||
#include <AK/HashMap.h>
|
||||
#include <AK/NonnullOwnPtrVector.h>
|
||||
#include <AK/NonnullRefPtrVector.h>
|
||||
#include <LibCore/ElapsedTimer.h>
|
||||
#include <LibCore/Timer.h>
|
||||
#include <LibGfx/TextAlignment.h>
|
||||
#include <LibGUI/ScrollableWidget.h>
|
||||
#include <LibGUI/TextDocument.h>
|
||||
#include <LibGUI/TextRange.h>
|
||||
#include <LibGfx/TextAlignment.h>
|
||||
|
||||
namespace GUI {
|
||||
|
||||
|
@ -89,11 +90,11 @@ public:
|
|||
void scroll_position_into_view(const TextPosition&);
|
||||
size_t line_count() const { return document().line_count(); }
|
||||
int line_spacing() const { return m_line_spacing; }
|
||||
int line_height() const { return font().glyph_height() + m_line_spacing; }
|
||||
int line_height() const;
|
||||
TextPosition cursor() const { return m_cursor; }
|
||||
TextRange normalized_selection() const { return m_selection.normalized(); }
|
||||
// FIXME: This should take glyph spacing into account, no?
|
||||
int glyph_width() const { return font().glyph_width('x'); }
|
||||
int glyph_width() const;
|
||||
|
||||
void insert_at_cursor_or_replace_selection(const StringView&);
|
||||
bool write_to_file(const StringView& path);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue