mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:28:12 +00:00
LibGUI: Convert Vector<OwnPtr> to NonnullOwnPtrVector.
This is turning out really nice so far. :^)
This commit is contained in:
parent
90ea4918d6
commit
2196f17c10
7 changed files with 46 additions and 47 deletions
|
@ -2,8 +2,9 @@
|
|||
|
||||
#include <AK/Function.h>
|
||||
#include <AK/HashMap.h>
|
||||
#include <LibGUI/GScrollableWidget.h>
|
||||
#include <AK/NonnullOwnPtrVector.h>
|
||||
#include <LibDraw/TextAlignment.h>
|
||||
#include <LibGUI/GScrollableWidget.h>
|
||||
|
||||
class GAction;
|
||||
class GMenu;
|
||||
|
@ -193,8 +194,8 @@ private:
|
|||
void update_cursor();
|
||||
void set_cursor(int line, int column);
|
||||
void set_cursor(const GTextPosition&);
|
||||
Line& current_line() { return *m_lines[m_cursor.line()]; }
|
||||
const Line& current_line() const { return *m_lines[m_cursor.line()]; }
|
||||
Line& current_line() { return m_lines[m_cursor.line()]; }
|
||||
const Line& current_line() const { return m_lines[m_cursor.line()]; }
|
||||
GTextPosition text_position_at(const Point&) const;
|
||||
void insert_at_cursor(char);
|
||||
void insert_at_cursor(const StringView&);
|
||||
|
@ -208,7 +209,7 @@ private:
|
|||
|
||||
Type m_type { MultiLine };
|
||||
|
||||
Vector<OwnPtr<Line>> m_lines;
|
||||
NonnullOwnPtrVector<Line> m_lines;
|
||||
GTextPosition m_cursor;
|
||||
TextAlignment m_text_alignment { TextAlignment::CenterLeft };
|
||||
bool m_cursor_state { true };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue