Modified ButtonBar::append to be universal for all widgets
This commit is contained in:
parent
3769719f7e
commit
d3d703e200
2 changed files with 5 additions and 14 deletions
|
|
@ -35,9 +35,9 @@ ButtonBar::ButtonBar()
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ButtonBar::append(SeparatorToolItem &seperator)
|
ButtonBar::append(Widget &widget)
|
||||||
{
|
{
|
||||||
pack_start(seperator, PACK_SHRINK);
|
pack_start(widget, Gtk::PACK_SHRINK);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // widgets
|
} // widgets
|
||||||
|
|
|
||||||
|
|
@ -43,13 +43,10 @@ public:
|
||||||
ButtonBar();
|
ButtonBar();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Append a button to the button bar.
|
* Append a widget to the button bar.
|
||||||
* @param button The button to append.
|
* @param widget The button to append.
|
||||||
**/
|
**/
|
||||||
template<class T> void append(MiniWrapper<T>& button)
|
void append(Widget &widget);
|
||||||
{
|
|
||||||
pack_start(button, Gtk::PACK_SHRINK);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Append a button to the button bar, and connect a click event.
|
* Append a button to the button bar, and connect a click event.
|
||||||
|
|
@ -62,12 +59,6 @@ public:
|
||||||
button.signal_clicked().connect(clicked_slot);
|
button.signal_clicked().connect(clicked_slot);
|
||||||
append(button);
|
append(button);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Append a sererator item.
|
|
||||||
* @param seperator The seperator to append.
|
|
||||||
**/
|
|
||||||
void append(Gtk::SeparatorToolItem &seperator);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // gui
|
} // gui
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue