/[svn]/gigedit/trunk/src/gigedit/paramedit.h
ViewVC logotype

Diff of /gigedit/trunk/src/gigedit/paramedit.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2446 by persson, Sun Apr 28 15:40:43 2013 UTC revision 2507 by persson, Sun Jan 12 19:37:55 2014 UTC
# Line 1  Line 1 
1  /*                                                         -*- c++ -*-  /*                                                         -*- c++ -*-
2   * Copyright (C) 2006-2013 Andreas Persson   * Copyright (C) 2006-2014 Andreas Persson
3   *   *
4   * This program is free software; you can redistribute it and/or   * This program is free software; you can redistribute it and/or
5   * modify it under the terms of the GNU General Public License as   * modify it under the terms of the GNU General Public License as
# Line 46  Line 46 
46  Glib::ustring gig_to_utf8(const gig::String& gig_string);  Glib::ustring gig_to_utf8(const gig::String& gig_string);
47  gig::String gig_from_utf8(const Glib::ustring& utf8_string);  gig::String gig_from_utf8(const Glib::ustring& utf8_string);
48    
49    int note_value(const Glib::ustring& note);
50    Glib::ustring note_str(int note);
51    
52    void spin_button_show_notes(Gtk::SpinButton& spin_button);
53    
54  class LabelWidget {  class LabelWidget {
55  public:  public:
# Line 207  public: Line 211  public:
211  template<typename T>  template<typename T>
212  ChoiceEntry<T>::ChoiceEntry(const char* labelText) :  ChoiceEntry<T>::ChoiceEntry(const char* labelText) :
213      LabelWidget(labelText, align),      LabelWidget(labelText, align),
214      align(0, 0, 0, 0)      align(0, 0, 0, 0),
215        values(0)
216  {  {
217      combobox.signal_changed().connect(sig_changed.make_slot());      combobox.signal_changed().connect(sig_changed.make_slot());
218      align.add(combobox);      align.add(combobox);
# Line 217  template<typename T> Line 222  template<typename T>
222  void ChoiceEntry<T>::set_choices(const char** texts, const T* values)  void ChoiceEntry<T>::set_choices(const char** texts, const T* values)
223  {  {
224      for (int i = 0 ; texts[i] ; i++) {      for (int i = 0 ; texts[i] ; i++) {
225  #if (GTKMM_MAJOR_VERSION == 2 && GTKMM_MINOR_VERSION < 90) || GTKMM_MAJOR_VERSION < 2  #if (GTKMM_MAJOR_VERSION == 2 && GTKMM_MINOR_VERSION < 24) || GTKMM_MAJOR_VERSION < 2
226          combobox.append_text(texts[i]);          combobox.append_text(texts[i]);
227  #else  #else
228          combobox.append(texts[i]);          combobox.append(texts[i]);
# Line 341  public: Line 346  public:
346  protected:  protected:
347      M* m;      M* m;
348      int update_model; // to prevent infinite update loops      int update_model; // to prevent infinite update loops
349      PropEditor() : update_model(0) { }      PropEditor() : m(0), update_model(0) { }
350      sigc::signal<void> sig_changed;      sigc::signal<void> sig_changed;
351    
352      template<class C, typename T>      template<class C, typename T>

Legend:
Removed from v.2446  
changed lines
  Added in v.2507

  ViewVC Help
Powered by ViewVC