1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 18:18:12 +00:00

LibGUI: Reduce header dependencies of ComboBox

This commit is contained in:
Andreas Kling 2020-02-23 10:42:43 +01:00
parent 45c25ffecd
commit 00bf68adc6
3 changed files with 28 additions and 8 deletions

View file

@ -26,7 +26,6 @@
#pragma once
#include <LibGUI/ListView.h>
#include <LibGUI/Widget.h>
namespace GUI {
@ -43,15 +42,15 @@ public:
void close();
void select_all();
Model* model() { return m_list_view->model(); }
const Model* model() const { return m_list_view->model(); }
Model* model();
const Model* model() const;
void set_model(NonnullRefPtr<Model>);
bool only_allow_values_from_model() const { return m_only_allow_values_from_model; }
void set_only_allow_values_from_model(bool);
int model_column() const { return m_list_view->model_column(); }
void set_model_column(int column) { m_list_view->set_model_column(column); }
int model_column() const;
void set_model_column(int);
Function<void(const String&, const ModelIndex&)> on_change;
Function<void()> on_return_pressed;
@ -61,7 +60,7 @@ protected:
virtual void resize_event(ResizeEvent&) override;
private:
RefPtr<TextEditor> m_editor;
RefPtr<TextBox> m_editor;
RefPtr<Button> m_open_button;
RefPtr<Window> m_list_window;
RefPtr<ListView> m_list_view;