2 Copyright (C) 2001-2006, William Joseph.
5 This file is part of GtkRadiant.
7 GtkRadiant is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
12 GtkRadiant is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with GtkRadiant; if not, write to the Free Software
19 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22 #include "textureentry.h"
26 template<class StringList>
27 void EntryCompletion<StringList>::connect(ui::Entry entry)
30 m_store = ui::ListStore::from(gtk_list_store_new(1, G_TYPE_STRING));
34 StringList().connect(IdleDraw::QueueDrawCaller(m_idleUpdate));
37 auto completion = ui::EntryCompletion::from(gtk_entry_completion_new());
38 gtk_entry_set_completion(entry, completion);
39 gtk_entry_completion_set_model(completion, m_store);
40 gtk_entry_completion_set_text_column(completion, 0);
43 template<class StringList>
44 void EntryCompletion<StringList>::append(const char *string)
46 m_store.append(0, string);
49 template<class StringList>
50 void EntryCompletion<StringList>::fill()
52 StringList().forEach(AppendCaller(*this));
55 template<class StringList>
56 void EntryCompletion<StringList>::clear()
61 template<class StringList>
62 void EntryCompletion<StringList>::update()
69 class EntryCompletion<TextureNameList>;
72 class EntryCompletion<ShaderList>;