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 |
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); |
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( |
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 |
|
} |