#include <infowin.h>
Inheritance diagram for InfoWindow:
Public Methods | |
InfoWindow () | |
void | Init (Display *d, int x, int y) |
void | Draw () |
Message | Dispatch (Message &) |
|
Definition at line 24 of file infowin.c. References Window::BkColor, Window::BorderColor, Window::ClientD, Window::CliX1, Window::CliX2, Window::CliY1, Window::CliY2, ScrnObj::Drawn, False, InfoXDim, InfoYDim, Window::Title, Window::TitleColor, Window::TitleD, Window::TX1, Window::TX2, Window::TY1, Window::TY2, Window::XDim, and Window::YDim.
00025 { 00026 XDim = InfoXDim; YDim = InfoYDim; 00027 CliX1 = CliY1 = CliX2 = CliY2 = 0; 00028 TX1 = TY1 = TX2 = TY2 = 0; 00029 BorderColor = RED; 00030 BkColor = LIGHTGRAY; 00031 TitleColor = WHITE; 00032 Title = NULL; 00033 // Title = new char [15]; 00034 // assert (Title != 0); 00035 // strcpy (Title, "Mark's Mind"); 00036 ClientD = TitleD = NULL; 00037 Drawn = False; 00038 } |
|
Reimplemented from Window. Definition at line 22 of file infowin.h.
00022 { return NullMsg; } |
|
Reimplemented from Window. Definition at line 62 of file infowin.c. References Viewport::Clear(), Window::ClientD, ScrnObj::Disp, Viewport::Done(), Display::Draw(), Window::DrawBorder(), ScrnObj::Drawn, Window::DrawTitle(), Viewport::FastDraw(), Viewport::GetMaxX(), Viewport::OutTextXY(), Window::PrepScreen(), Viewport::SetColor(), Viewport::SetTextStyle(), Viewport::TextWidth(), and True.
00063 { 00064 char buf[40]; 00065 00066 if (!Drawn) 00067 { 00068 assert (Disp != NULL); 00069 Disp->FastDraw (); 00070 PrepScreen (); 00071 DrawBorder (); 00072 if (TitleD) 00073 DrawTitle (); 00074 ClientD->Clear (); 00075 ClientD->Draw (); 00076 Disp->Done (); 00077 Drawn = True; 00078 00079 // Add text to window 00080 ClientD->SetColor(BLACK); 00081 ClientD->SetTextStyle(GOTHIC_FONT, HORIZ_DIR, 1); 00082 strcpy(buf, "Scotland Yard"); 00083 ClientD->OutTextXY(ClientD->GetMaxX()/2-ClientD->TextWidth(buf)/2,10, buf); 00084 ClientD->SetColor(RED); 00085 strcpy(buf, "London, 1869"); 00086 ClientD->OutTextXY(ClientD->GetMaxX()/2-ClientD->TextWidth(buf)/2+4,33, buf); 00087 00088 } 00089 } |
|