mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-05 06:32:30 +02:00
LibGUI: Put all classes in the GUI namespace and remove the leading G
This took me a moment. Welcome to the new world of GUI::Widget! :^)
This commit is contained in:
Notes:
sideshowbarker
2024-07-19 09:41:33 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/c5bd9d4ed1d
@@ -26,15 +26,17 @@
|
||||
|
||||
#include <LibGUI/GUndoStack.h>
|
||||
|
||||
GUndoStack::GUndoStack()
|
||||
namespace GUI {
|
||||
|
||||
UndoStack::UndoStack()
|
||||
{
|
||||
}
|
||||
|
||||
GUndoStack::~GUndoStack()
|
||||
UndoStack::~UndoStack()
|
||||
{
|
||||
}
|
||||
|
||||
void GUndoStack::undo()
|
||||
void UndoStack::undo()
|
||||
{
|
||||
if (!can_undo())
|
||||
return;
|
||||
@@ -57,7 +59,7 @@ void GUndoStack::undo()
|
||||
m_stack_index++;
|
||||
}
|
||||
|
||||
void GUndoStack::redo()
|
||||
void UndoStack::redo()
|
||||
{
|
||||
if (!can_redo())
|
||||
return;
|
||||
@@ -73,7 +75,7 @@ void GUndoStack::redo()
|
||||
m_stack_index--;
|
||||
}
|
||||
|
||||
void GUndoStack::push(NonnullOwnPtr<GCommand>&& command)
|
||||
void UndoStack::push(NonnullOwnPtr<Command>&& command)
|
||||
{
|
||||
if (m_stack.is_empty()) {
|
||||
auto undo_commands_container = make<UndoCommandsContainer>();
|
||||
@@ -92,7 +94,7 @@ void GUndoStack::push(NonnullOwnPtr<GCommand>&& command)
|
||||
m_stack[0].m_undo_vector.prepend(move(command));
|
||||
}
|
||||
|
||||
void GUndoStack::finalize_current_combo()
|
||||
void UndoStack::finalize_current_combo()
|
||||
{
|
||||
if (m_stack.is_empty())
|
||||
return;
|
||||
@@ -112,3 +114,5 @@ void GUndoStack::finalize_current_combo()
|
||||
|
||||
m_last_updated_undo_vector_size = undo_vector.size();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user