Inv(#1020): reorganise tooltips and accelerators
This commit is contained in:
parent
1b9a45930b
commit
f8d8a89220
2 changed files with 31 additions and 11 deletions
|
|
@ -81,29 +81,40 @@ namespace panel {
|
||||||
buttons_.set_layout(Gtk::BUTTONBOX_START);
|
buttons_.set_layout(Gtk::BUTTONBOX_START);
|
||||||
|
|
||||||
// buttons to trigger experiments
|
// buttons to trigger experiments
|
||||||
button_1_.set_label("Experiment _1");
|
button_1_.set_label("_place");
|
||||||
button_1_.set_tooltip_text("place new child widget\nat random position on the canvas");
|
button_1_.set_use_underline();
|
||||||
|
button_1_.set_tooltip_markup("<b>Experiment 1</b>:\nplace new child widget\nat random position on the canvas");
|
||||||
button_1_.signal_clicked().connect(
|
button_1_.signal_clicked().connect(
|
||||||
mem_fun(*this, &TimelinePanel::experiment_1));
|
mem_fun(*this, &TimelinePanel::experiment_1));
|
||||||
buttons_.add(button_1_);
|
buttons_.add(button_1_);
|
||||||
|
|
||||||
button_2_.set_label("Experiment _2");
|
button_2_.set_label("_move");
|
||||||
button_2_.set_tooltip_text("move all child widgets randomly");
|
button_2_.set_use_underline();
|
||||||
|
button_2_.set_tooltip_markup("<b>Experiment 2</b>:\nmove all child widgets randomly");
|
||||||
button_2_.signal_clicked().connect(
|
button_2_.signal_clicked().connect(
|
||||||
mem_fun(*this, &TimelinePanel::experiment_2));
|
mem_fun(*this, &TimelinePanel::experiment_2));
|
||||||
buttons_.add(button_2_);
|
buttons_.add(button_2_);
|
||||||
|
|
||||||
button_3_.set_label("Experiment _3");
|
button_3_.set_label("a_lign");
|
||||||
button_3_.set_tooltip_text("align all child widgets in a row\nwith silight random vertical offset");
|
button_3_.set_use_underline();
|
||||||
|
button_3_.set_tooltip_markup("<b>Experiment 3</b>:\nalign all child widgets in a row\nwith silight random vertical offset");
|
||||||
button_3_.signal_clicked().connect(
|
button_3_.signal_clicked().connect(
|
||||||
mem_fun(*this, &TimelinePanel::experiment_3));
|
mem_fun(*this, &TimelinePanel::experiment_3));
|
||||||
buttons_.add(button_3_);
|
buttons_.add(button_3_);
|
||||||
|
|
||||||
button_4_.set_label("Experiment _4");
|
button_4_.set_label("kill");
|
||||||
button_4_.set_tooltip_text("kill arbitrary child widget");
|
button_4_.set_use_underline();
|
||||||
|
button_4_.set_tooltip_markup("<b>Experiment 4</b>:\nkill arbitrary child widget");
|
||||||
button_4_.signal_clicked().connect(
|
button_4_.signal_clicked().connect(
|
||||||
mem_fun(*this, &TimelinePanel::experiment_4));
|
mem_fun(*this, &TimelinePanel::experiment_4));
|
||||||
buttons_.add(button_4_);
|
buttons_.add(button_4_);
|
||||||
|
|
||||||
|
button_5_.set_label("_kill");
|
||||||
|
button_5_.set_use_underline();
|
||||||
|
button_5_.set_tooltip_markup("<b>Experiment 5</b>:\nkill arbitrary child widget");
|
||||||
|
button_5_.signal_clicked().connect(
|
||||||
|
mem_fun(*this, &TimelinePanel::experiment_5));
|
||||||
|
buttons_.add(button_5_);
|
||||||
//(End)buttons...
|
//(End)buttons...
|
||||||
|
|
||||||
frame_.add(scroller_);
|
frame_.add(scroller_);
|
||||||
|
|
@ -158,7 +169,7 @@ namespace panel {
|
||||||
void
|
void
|
||||||
TimelinePanel::experiment_1()
|
TimelinePanel::experiment_1()
|
||||||
{
|
{
|
||||||
frame_.set_label("Experiment 1...");
|
frame_.set_label("Experiment 1... PLACE");
|
||||||
|
|
||||||
ChildEx* chld = makeChld();
|
ChildEx* chld = makeChld();
|
||||||
childz_.push_back(chld);
|
childz_.push_back(chld);
|
||||||
|
|
@ -173,7 +184,7 @@ namespace panel {
|
||||||
void
|
void
|
||||||
TimelinePanel::experiment_2()
|
TimelinePanel::experiment_2()
|
||||||
{
|
{
|
||||||
frame_.set_label("Experiment 2...");
|
frame_.set_label("Experiment 2... MOVE");
|
||||||
for (Widget* chld : childz_)
|
for (Widget* chld : childz_)
|
||||||
{
|
{
|
||||||
uint x = canvas_.child_property_x(*chld);
|
uint x = canvas_.child_property_x(*chld);
|
||||||
|
|
@ -192,7 +203,7 @@ namespace panel {
|
||||||
void
|
void
|
||||||
TimelinePanel::experiment_3()
|
TimelinePanel::experiment_3()
|
||||||
{
|
{
|
||||||
frame_.set_label("Experiment 3...");
|
frame_.set_label("Experiment 3... ALIGN");
|
||||||
uint pos=0;
|
uint pos=0;
|
||||||
for (Widget* chld : childz_)
|
for (Widget* chld : childz_)
|
||||||
{
|
{
|
||||||
|
|
@ -210,6 +221,13 @@ namespace panel {
|
||||||
TimelinePanel::experiment_4()
|
TimelinePanel::experiment_4()
|
||||||
{
|
{
|
||||||
frame_.set_label("Experiment 4...");
|
frame_.set_label("Experiment 4...");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
TimelinePanel::experiment_5()
|
||||||
|
{
|
||||||
|
frame_.set_label("Experiment 5... KILL");
|
||||||
uint killPos = rand() % childz_.size();
|
uint killPos = rand() % childz_.size();
|
||||||
ChildV::iterator killThat(&childz_[killPos]);
|
ChildV::iterator killThat(&childz_[killPos]);
|
||||||
ChildEx* victim = *killThat;
|
ChildEx* victim = *killThat;
|
||||||
|
|
|
||||||
|
|
@ -109,6 +109,7 @@ namespace panel {
|
||||||
Gtk::Button button_2_;
|
Gtk::Button button_2_;
|
||||||
Gtk::Button button_3_;
|
Gtk::Button button_3_;
|
||||||
Gtk::Button button_4_;
|
Gtk::Button button_4_;
|
||||||
|
Gtk::Button button_5_;
|
||||||
Gtk::Frame frame_;
|
Gtk::Frame frame_;
|
||||||
Gtk::ScrolledWindow scroller_;
|
Gtk::ScrolledWindow scroller_;
|
||||||
Gtk::Layout canvas_;
|
Gtk::Layout canvas_;
|
||||||
|
|
@ -124,6 +125,7 @@ namespace panel {
|
||||||
void experiment_2();
|
void experiment_2();
|
||||||
void experiment_3();
|
void experiment_3();
|
||||||
void experiment_4();
|
void experiment_4();
|
||||||
|
void experiment_5();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue