#include #include #include #include #include #include #include #include "fontsample.h" static PropertyData properties[] = { { "tutorial*sample", "The quick brown fox..." }, { "tutorial*font", "*-*-helvetica-medium-r-normal-*-*-240-*-*-*-*-iso8859-1" }, { "tutorial*PushButton*font", "*-*-times-medium-i-normal-*-*-140-*-*-*-*-iso8859-1" }, { nil } }; static OptionDesc options[] = { { "-sample", "tutorial*sample", OptionValueNext }, { nil } }; int main (int argc, char* argv[]) { World* world = new World("tutorial", properties, options, argc, argv); ButtonState* quit = new ButtonState(false); FontSample* sample = new FontSample(world->GetAttribute("sample")); sample->ShowFont(world->GetAttribute("font")); Dialog* browser = new Dialog( quit, new HBox( new HGlue(round(0.5*inch), round(0.4*inch), round(2.0*inch)), new VBox( new VGlue(round(0.3*inch), round(0.2*inch), round(1.0*inch)), sample, new VGlue(round(0.3*inch), round(0.2*inch), 0), new HBox( new HGlue(round(0.3*inch), round(0.2*inch), hfil), new PushButton("Quit", quit, true) ), new VGlue(round(0.3*inch), round(0.2*inch), round(1.0*inch)) ), new HGlue(round(0.5*inch), round(0.4*inch), round(2.0*inch)) ) ); browser->SetName("InterViews font browser"); browser->SetIconName("ifb"); world->SetName("A World"); world->InsertApplication(browser); Tray* message = new Tray( new HBox( new HGlue(round(0.5*inch), round(0.4*inch), round(2.0*inch)), new VBox( new VGlue(round(0.3*inch), round(0.2*inch), round(1.0*inch)), new Message("Hi There"), new VGlue(round(0.3*inch), round(0.2*inch), round(1.0*inch)) ), new HGlue(round(0.5*inch), round(0.4*inch), round(2.0*inch)) ) ); message->SetName("Hi There"); world->InsertApplication(message); browser->Accept(); world->Remove(browser); world->Remove(message); delete browser; delete message; delete quit; delete world; return 0; }