Ardour  8.7-15-gadf511264b
entrycompletion.h
Go to the documentation of this file.
1 // -*- c++ -*-
2 // Generated by gmmproc 2.45.3 -- DO NOT MODIFY!
3 #ifndef _GTKMM_ENTRYCOMPLETION_H
4 #define _GTKMM_ENTRYCOMPLETION_H
5 
6 
7 #include <glibmm/ustring.h>
8 #include <sigc++/sigc++.h>
9 
10 /* $Id: entrycompletion.hg,v 1.24 2006/07/19 16:58:50 murrayc Exp $ */
11 
12 /* Copyright (C) 2003 The gtkmm Development Team
13  *
14  * This library is free software; you can redistribute it and/or
15  * modify it under the terms of the GNU Lesser General Public
16  * License as published by the Free Software Foundation; either
17  * version 2.1 of the License, or (at your option) any later version.
18  *
19  * This library is distributed in the hope that it will be useful,
20  * but WITHOUT ANY WARRANTY; without even the implied warranty of
21  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22  * Lesser General Public License for more details.
23  *
24  * You should have received a copy of the GNU Lesser General Public
25  * License along with this library; if not, write to the Free
26  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
27  */
28 
29 #include <gtkmm/widget.h>
30 #include <gtkmm/treemodel.h>
31 
32 
33 #ifndef DOXYGEN_SHOULD_SKIP_THIS
36 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
37 
38 
39 #ifndef DOXYGEN_SHOULD_SKIP_THIS
40 namespace Gtk
41 { class EntryCompletion_Class; } // namespace Gtk
42 #endif //DOXYGEN_SHOULD_SKIP_THIS
43 
44 namespace Gtk
45 {
46 
47 class Entry;
48 
49 //TODO: This should derive+implement from CellLayout, when we can break ABI.
50 //Then we should add "It derives from the Gtk::CellLayout, to allow the user to add extra cells to the Gtk::TreeView with completion matches".
51 
79 class EntryCompletion : public Glib::Object
80 {
81 
82 #ifndef DOXYGEN_SHOULD_SKIP_THIS
83 
84 public:
85  typedef EntryCompletion CppObjectType;
86  typedef EntryCompletion_Class CppClassType;
87  typedef GtkEntryCompletion BaseObjectType;
88  typedef GtkEntryCompletionClass BaseClassType;
89 
90 private: friend class EntryCompletion_Class;
91  static CppClassType entrycompletion_class_;
92 
93 private:
94  // noncopyable
96  EntryCompletion& operator=(const EntryCompletion&);
97 
98 protected:
99  explicit EntryCompletion(const Glib::ConstructParams& construct_params);
100  explicit EntryCompletion(GtkEntryCompletion* castitem);
101 
102 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
103 
104 public:
105  virtual ~EntryCompletion();
106 
109  static GType get_type() G_GNUC_CONST;
110 
111 #ifndef DOXYGEN_SHOULD_SKIP_THIS
112 
113 
114  static GType get_base_type() G_GNUC_CONST;
115 #endif
116 
118  GtkEntryCompletion* gobj() { return reinterpret_cast<GtkEntryCompletion*>(gobject_); }
119 
121  const GtkEntryCompletion* gobj() const { return reinterpret_cast<GtkEntryCompletion*>(gobject_); }
122 
125 
126 private:
127 
128 
129 protected:
131 
132 public:
133 
134  static Glib::RefPtr<EntryCompletion> create();
135 
136 
137  //Careful, this actually returns a GtkWidget*, so it might not always be a GtkEntry in future GTK+ versions.
138 
144 
149  const Entry* get_entry() const;
150 
151 
158  void set_model(const Glib::RefPtr<TreeModel>& model);
159 
166  Glib::RefPtr<TreeModel> get_model();
167 
174  Glib::RefPtr<const TreeModel> get_model() const;
175 
180  void unset_model();
181 
183  typedef sigc::slot<bool, const Glib::ustring&, const TreeModel::const_iterator&> SlotMatch;
184 
185  void set_match_func(const SlotMatch& slot);
186 
187 
196 
202 
207  void complete();
208 
209 
213 
214  //We reordered the parameters, compared to the C version, so that we can have method overloads without the index.
215 
216  // TODO: We would really like an insert() which before-inserts an iterator, like ListStore::insert(),
217  // but there is no EntryCompletion::insert_before() for us to use.
218  void insert_action_text(const Glib::ustring& text, int index);
219  void prepend_action_text(const Glib::ustring& text);
220  //TODO: Add append_action_text() somehow? It would be slow if we count the children each time. murrayc.
221 
222  void insert_action_markup(const Glib::ustring& markup, int index);
223  void prepend_action_markup(const Glib::ustring& markup);
224 
225 
226  //TODO: Change default - it would be nicer to delete the last action instead of the first.
227 
232  void delete_action(int index = 0);
233 
234 
240  void set_inline_completion(bool inline_completion = true);
241 
247  bool get_inline_completion() const;
248 
254  void set_inline_selection(bool inline_selection = true);
255 
260  bool get_inline_selection() const;
261 
266  void set_popup_completion(bool popup_completion = true);
267 
272  bool get_popup_completion() const;
273 
274 
280  void set_popup_set_width(bool popup_set_width = true);
281 
288  bool get_popup_set_width() const;
289 
290 
291 #ifndef GTKMM_DISABLE_DEPRECATED
292 
303  void set_popup_single_width(bool popup_single_match = true);
304 #endif // GTKMM_DISABLE_DEPRECATED
305 
306 
315  void set_popup_single_match(bool popup_single_match = true);
316 
317 
325 
331  Glib::ustring get_completion_prefix() const;
332 
333 
346 
358  void set_text_column(int column);
359 
360 #ifndef GTKMM_DISABLE_DEPRECATED
361 
369 #endif // GTKMM_DISABLE_DEPRECATED
370 
371 
376  int get_text_column() const;
377 
378 
388  Glib::SignalProxy1< void,int > signal_action_activated();
389 
390 
391  //We completely hand-code these signals because we want to change how the parameters are wrapped,
392  //because we need both the iter and the model to make the C++ iter.
393 
394 
416  Glib::SignalProxy1< bool, const TreeModel::iterator& > signal_match_selected();
417 
430  Glib::SignalProxy1< bool, const TreeModel::iterator& > signal_cursor_on_match();
431 
432 
433  //We use no_default_handler for these signals, because we can not add a new vfunc without breaking ABI.
434  //TODO: Remove no_default_handler when we do an ABI-break-with-parallel-install.
435 
436 
454  Glib::SignalProxy1< bool,const Glib::ustring& > signal_insert_prefix();
455 
456 
462  Glib::PropertyProxy< Glib::RefPtr<Gtk::TreeModel> > property_model() ;
463 
469  Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gtk::TreeModel> > property_model() const;
470 
476  Glib::PropertyProxy< int > property_minimum_key_length() ;
477 
483  Glib::PropertyProxy_ReadOnly< int > property_minimum_key_length() const;
484 
490  Glib::PropertyProxy< int > property_text_column() ;
491 
497  Glib::PropertyProxy_ReadOnly< int > property_text_column() const;
498 
504  Glib::PropertyProxy< bool > property_inline_completion() ;
505 
511  Glib::PropertyProxy_ReadOnly< bool > property_inline_completion() const;
512 
518  Glib::PropertyProxy< bool > property_popup_completion() ;
519 
525  Glib::PropertyProxy_ReadOnly< bool > property_popup_completion() const;
526 
532  Glib::PropertyProxy< bool > property_popup_set_width() ;
533 
539  Glib::PropertyProxy_ReadOnly< bool > property_popup_set_width() const;
540 
546  Glib::PropertyProxy< bool > property_popup_single_match() ;
547 
553  Glib::PropertyProxy_ReadOnly< bool > property_popup_single_match() const;
554 
560  Glib::PropertyProxy< bool > property_inline_selection() ;
561 
567  Glib::PropertyProxy_ReadOnly< bool > property_inline_selection() const;
568 
569 
570 protected:
571 
572  //Default Signal Handler:
573  virtual bool on_match_selected(const TreeModel::iterator& iter);
574  //No default handler for on_cursor_on_match(), to preserver ABI. TODO: Add this when we can break ABI.
575 
576 
577 public:
578 
579 public:
580  //C++ methods used to invoke GTK+ virtual functions:
581 
582 protected:
583  //GTK+ Virtual Functions (override these to change behaviour):
584 
585  //Default Signal Handlers::
587  virtual void on_action_activated(int index);
588 
589 
590 };
591 
592 } // namespace Gtk
593 
594 
595 namespace Glib
596 {
605  Glib::RefPtr<Gtk::EntryCompletion> wrap(GtkEntryCompletion* object, bool take_copy = false);
606 }
607 
608 
609 #endif /* _GTKMM_ENTRYCOMPLETION_H */
610 
Glib::PropertyProxy< bool > property_inline_completion()
sigc::slot< bool, const Glib::ustring &, const TreeModel::const_iterator & > SlotMatch
For example, bool on_match(const Glib::ustring& key, const TreeModel::const_iterator& iter);.
int get_minimum_key_length() const
Glib::PropertyProxy_ReadOnly< Glib::RefPtr< Gtk::TreeModel > > property_model() const
Glib::PropertyProxy< bool > property_inline_selection()
Glib::RefPtr< const TreeModel > get_model() const
const GtkEntryCompletion * gobj() const
Provides access to the underlying C GObject.
void set_popup_single_match(bool popup_single_match=true)
bool get_inline_completion() const
void set_match_func(const SlotMatch &slot)
Glib::RefPtr< TreeModel > get_model()
Glib::RefPtr< Gtk::EntryCompletion > wrap(GtkEntryCompletion *object, bool take_copy=false)
GtkEntryCompletion * gobj_copy()
Provides access to the underlying C instance. The caller is responsible for unrefing it....
Glib::PropertyProxy< bool > property_popup_single_match()
Glib::PropertyProxy< int > property_text_column()
void set_popup_set_width(bool popup_set_width=true)
const Entry * get_entry() const
Glib::PropertyProxy< Glib::RefPtr< Gtk::TreeModel > > property_model()
virtual bool on_match_selected(const TreeModel::iterator &iter)
void set_inline_completion(bool inline_completion=true)
void insert_action_markup(const Glib::ustring &markup, int index)
Glib::PropertyProxy_ReadOnly< bool > property_popup_completion() const
Glib::PropertyProxy< bool > property_popup_completion()
bool get_popup_single_match() const
Glib::PropertyProxy_ReadOnly< bool > property_popup_single_match() const
Glib::SignalProxy1< bool, const TreeModel::iterator & > signal_match_selected()
virtual ~EntryCompletion()
void set_inline_selection(bool inline_selection=true)
void insert_action_text(const Glib::ustring &text, int index)
void prepend_action_markup(const Glib::ustring &markup)
void set_popup_completion(bool popup_completion=true)
Glib::SignalProxy1< void, int > signal_action_activated()
void set_minimum_key_length(int length)
Glib::SignalProxy1< bool, const Glib::ustring & > signal_insert_prefix()
Glib::PropertyProxy< int > property_minimum_key_length()
Glib::SignalProxy1< bool, const TreeModel::iterator & > signal_cursor_on_match()
Glib::PropertyProxy< bool > property_popup_set_width()
Glib::ustring get_completion_prefix() const
Glib::PropertyProxy_ReadOnly< bool > property_popup_set_width() const
void set_text_column(int column)
bool get_popup_completion() const
static GType get_type() G_GNUC_CONST
void set_popup_single_width(bool popup_single_match=true)
Glib::PropertyProxy_ReadOnly< int > property_minimum_key_length() const
Glib::PropertyProxy_ReadOnly< bool > property_inline_selection() const
virtual void on_action_activated(int index)
This is a default handler for the signal signal_action_activated().
GtkEntryCompletion * gobj()
Provides access to the underlying C GObject.
void set_text_column(const TreeModelColumnBase &column)
bool get_popup_set_width() const
void set_model(const Glib::RefPtr< TreeModel > &model)
bool get_inline_selection() const
Glib::PropertyProxy_ReadOnly< bool > property_inline_completion() const
Glib::PropertyProxy_ReadOnly< int > property_text_column() const
void prepend_action_text(const Glib::ustring &text)
void delete_action(int index=0)
int get_text_column() const
static Glib::RefPtr< EntryCompletion > create()
PBD::PropertyDescriptor< timecnt_t > length
Definition: ardour_ui.h:188