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

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

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

revision 2422 by persson, Sun Mar 6 07:51:04 2011 UTC revision 2423 by persson, Sun Feb 24 15:19:39 2013 UTC
# Line 1  Line 1 
1  /*  /*
2   * Copyright (C) 2006-2011 Andreas Persson   * Copyright (C) 2006-2013 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 86  NumEntry::NumEntry(const char* labelText Line 86  NumEntry::NumEntry(const char* labelText
86      scale(adjust),      scale(adjust),
87      spinbutton(adjust)      spinbutton(adjust)
88  {  {
89        scale.set_size_request(70);
90      spinbutton.set_digits(decimals);      spinbutton.set_digits(decimals);
91      spinbutton.set_value(0);      spinbutton.set_value(0);
92      scale.set_draw_value(false);      scale.set_draw_value(false);
# Line 188  void NumEntryPermille::set_value(uint16_ Line 189  void NumEntryPermille::set_value(uint16_
189  NoteEntry::NoteEntry(const char* labelText) :  NoteEntry::NoteEntry(const char* labelText) :
190      NumEntryTemp<uint8_t>(labelText)      NumEntryTemp<uint8_t>(labelText)
191  {  {
192        spinbutton.set_width_chars(4);
193      spinbutton.signal_input().connect(      spinbutton.signal_input().connect(
194          sigc::mem_fun(*this, &NoteEntry::on_input));          sigc::mem_fun(*this, &NoteEntry::on_input));
195      spinbutton.signal_output().connect(      spinbutton.signal_output().connect(
# Line 354  void StringEntryMultiLine::set_value(gig Line 356  void StringEntryMultiLine::set_value(gig
356          value.replace(i, 2, "\x0a");          value.replace(i, 2, "\x0a");
357      text_buffer->set_text(value);      text_buffer->set_text(value);
358  }  }
359    
360    
361    Table::Table(int x, int y) : Gtk::Table(x, y), rowno(0) {  }
362    
363    void Table::add(BoolEntry& boolentry)
364    {
365        attach(boolentry.widget, 0, 2, rowno, rowno + 1,
366               Gtk::FILL, Gtk::SHRINK);
367        rowno++;
368    }
369    
370    void Table::add(BoolEntryPlus6& boolentry)
371    {
372        attach(boolentry.widget, 0, 2, rowno, rowno + 1,
373               Gtk::FILL, Gtk::SHRINK);
374        rowno++;
375    }
376    
377    void Table::add(LabelWidget& prop)
378    {
379        attach(prop.label, 1, 2, rowno, rowno + 1,
380               Gtk::FILL, Gtk::SHRINK);
381        attach(prop.widget, 2, 3, rowno, rowno + 1,
382               Gtk::EXPAND | Gtk::FILL, Gtk::SHRINK);
383        rowno++;
384    }

Legend:
Removed from v.2422  
changed lines
  Added in v.2423

  ViewVC Help
Powered by ViewVC