// TitleFrame Example #include <ivplus/box.h> #include <ivplus/banner.h> #include <ivplus/frame.h> #include <ivplus/glue.h> #include <ivplus/message.h> #include <ivplus/world.h> int main(int argc, char **argv) { // Create the world to get the connection with the display. World* world = new World("MyApp", argc, argv); Message* msg1 = new Message("TitleFrame is a ShowFrame that\n" "outlines another interactor and\n" "places a banner above the it."); // Create a banner with three header strings and reversed video. Banner* banner = new Banner(" Ver1.0 ", " TitleFrame ", " Page 1 "); banner->highlight = true; // Create a title frame with the banner and the message created above. TitleFrame* tframe = new TitleFrame(banner, msg1, 3); // Create glues with natural size of 10 and infinite stretchability. VGlue* vglue = new VGlue(10); HGlue* hglue = new HGlue(10); // Enclose the framed msg in a box with glues around it. VBox* mainbox = new VBox(new VGlue(10), new HBox(new VGlue(10), tframe, new VGlue(10)), new VGlue(10)); // Map the window. world->InsertApplication(new Frame(mainbox, 1, BevelOut)); // Enter the event loop. world->Run(); return 0; }
frame.h frame.C