| 1 |
/* |
| 2 |
* InstrumentSelector.cpp |
| 3 |
* |
| 4 |
* Created on: 27 Dec 2016 |
| 5 |
* Author: jeremy |
| 6 |
*/ |
| 7 |
|
| 8 |
#include "InstrumentSelector.h" |
| 9 |
|
| 10 |
|
| 11 |
namespace Widgets |
| 12 |
{ |
| 13 |
|
| 14 |
InstrumentSelector::InstrumentSelector(const std::string& name) |
| 15 |
: instrumentName(name), preferencesButton(Gtk::StockID("gtk-preferences")), deleteButton(Gtk::StockID("gtk-remove")) |
| 16 |
{ |
| 17 |
|
| 18 |
this->set_column_homogeneous(true); |
| 19 |
this->set_border_width(4); |
| 20 |
|
| 21 |
this->attach(instrumentName, 0, 0, 1, 1); |
| 22 |
instrumentName.show(); |
| 23 |
|
| 24 |
this->attach_next_to(preferencesButton, instrumentName, Gtk::PositionType::POS_RIGHT, 1, 1); |
| 25 |
preferencesButton.show(); |
| 26 |
|
| 27 |
deleteButton.set_margin_left(4); |
| 28 |
this->attach_next_to(deleteButton, preferencesButton, Gtk::PositionType::POS_RIGHT, 1, 1); |
| 29 |
deleteButton.show(); |
| 30 |
|
| 31 |
|
| 32 |
this->show(); |
| 33 |
|
| 34 |
return; |
| 35 |
} |
| 36 |
|
| 37 |
|
| 38 |
} /* namespace Widgets */ |