/* * This file illustrates the use of string browser with a scroll bar attached. * The string browser contains an indefinite list of strings that can be * selected and browsed. See the StringBrowser documentation for further * details. * * Also illustrated here is the horizontal scrollbar in a string browser. */ #include #include #include #include #include "strbrowser.h" main() { World* w = new World(); StringBrowser* sb = new StringBrowser(new ButtonState(), 10, 10); VScroller* vscrl = new VScroller(sb); HScroller* hscrl = new HScroller(sb); HBox* hb = new HBox(sb, vscrl); VBox* vb = new VBox(hb, hscrl); sb->Append("aaaaaa"); sb->Append("bbbbbb"); sb->Append("ccccc"); sb->Append("dddd"); sb->Append("eeeeeeee"); sb->Append("ffffffff"); sb->Append("ggg"); sb->Append("hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh"); sb->Append("iiiiii"); sb->Append("jjjjjj"); sb->Append("kkkkkk"); sb->Append("lllllllllllll"); sb->Append("mmmmmm"); sb->Append("nnnnnnnnnn"); w->InsertApplication(vb); w->Run(); delete w; }