// ShadowFrame Example #include <ivplus/box.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); // Create three messages. Message* msg1 = new Message("Hello"); Message* msg2 = new Message("Hello World"); Message* msg3 = new Message("This is Line 1\nThis is Line 2"); // Enclose msg1 in a shadow frame with default settings h=1, v=1. ShadowFrame* sframe1 = new ShadowFrame(msg1); // Enclose msg2 in a shadow frame with both horizontal and vertical // thickness = 5. ShadowFrame* sframe2 = new ShadowFrame(msg2, 5, 5); // Enclose msg3 in a shadow frame with horizontal thickness = 2 and vertical // thickness = 8. ShadowFrame* sframe3 = new ShadowFrame(msg3, 2, 8); // Enclose all of these frames in a vbox. VBox* appbox = new VBox(sframe1, new VGlue(), sframe2, new VGlue(), sframe3); // Map the window. world->InsertApplication(new Frame(appbox, 1, BevelOut)); // Enter the event loop. world->Run(); return 0; }
frame.h frame.C