Пример #1
0
 MyBrowserWindow(LFL::Window *W) : GUI(W),
 menu_atlas1(Fonts::Get("MenuAtlas1", "", 0, Color::black)),
 menu_atlas2(Fonts::Get("MenuAtlas2", "", 0, Color::black)),
 back   (this, &menu_atlas1->FindGlyph(20)->tex, 0, "", MouseController::CB([&](){ browser->BackButton(); })),
 forward(this, &menu_atlas1->FindGlyph(22)->tex, 0, "", MouseController::CB([&](){ browser->ForwardButton(); })),
 refresh(this, &menu_atlas2->FindGlyph(50)->tex, 0, "", MouseController::CB([&](){ browser->RefreshButton(); })),
 address_box(W, Fonts::Get(FLAGS_default_font, "", 12, Color::black)) {
     address_box.SetToggleKey(0, Toggler::OneShot);
     address_box.cmd_prefix.clear();
     address_box.deactivate_on_enter = true;
     address_box.runcb = [&](const string &t){ browser->Open(t); };
     refresh.AddClickBox(addressbar, MouseController::CB([&](){ address_box.active = true; }));
 }