/* * Class SimpleDialog is a sublass of InterViews Dialog that contains a single * interactor and a QuitButton. Typically the interactor will be a text * message displaying some information to the user. * * SimpleDialog provides two public functions -- the constructor and a Display * function. See below for specification of these. */ #ifndef simpledialogIncluded #define simpledialogIncluded #include #include #include #include class SimpleDialog : Dialog { public: SimpleDialog(Interactor* contents, int borderspace = 10); /* * Construct a simple dialog with the given interactor as the contents, in * addition to a quit button. The given border space value is in pixels, * and specifies how much whitespace goes around the contents within the * dialog display window. */ SimpleDialog(Interactor* contents, Font* quitbuttonfont, char* quitbuttonlabel = "Quit", int borderspace = 10); /* * Same as above, but specify the label and font of the quit button. */ void Display(World* w); /* * Insert this into the center of the given world and call Dialog::Accept. * When the quit button is pressed, this is removed from the world and * Display returns. */ protected: void MakeFullContents(Interactor* contents, int borderspace, Font* font, char* label); /* * Compose the given user-supplied Interactor into a box with the * approprate smathering of glue and a quit button. The quit button will * have the given font and label. */ }; #endif