mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:07:34 +00:00
LibGUI+Playground: Move GMLAutocompleteProvider to LibGUI
This commit is contained in:
parent
4c17f389db
commit
2b5566d7cc
5 changed files with 13 additions and 5 deletions
27
Userland/Libraries/LibGUI/GMLAutocompleteProvider.h
Normal file
27
Userland/Libraries/LibGUI/GMLAutocompleteProvider.h
Normal file
|
@ -0,0 +1,27 @@
|
|||
/*
|
||||
* Copyright (c) 2020, Andreas Kling <kling@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "AutocompleteProvider.h"
|
||||
|
||||
namespace GUI {
|
||||
|
||||
class GMLAutocompleteProvider final : public virtual GUI::AutocompleteProvider {
|
||||
public:
|
||||
GMLAutocompleteProvider() { }
|
||||
virtual ~GMLAutocompleteProvider() override { }
|
||||
|
||||
private:
|
||||
static bool can_have_declared_layout(const StringView& class_name)
|
||||
{
|
||||
return class_name.is_one_of("GUI::Widget", "GUI::Frame");
|
||||
}
|
||||
|
||||
virtual void provide_completions(Function<void(Vector<Entry>)> callback) override;
|
||||
};
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue