//////////////////////////////////////////////////////////////// TEditorClient ------------- Constructor
| 283 | // Constructor |
| 284 | // |
| 285 | TEditorClient::TEditorClient (TWindow* parent, char *_levelName, |
| 286 | BOOL newLevel, const char far* title, |
| 287 | TModule* module): |
| 288 | TLayoutWindow(parent, title, module) |
| 289 | { |
| 290 | // Intialize level member |
| 291 | strcpy (LevelName, _levelName); |
| 292 | |
| 293 | LogMessage (": Editing %s...\n", LevelName); |
| 294 | |
| 295 | // Common file file flags and filters for Open/Save As dialogs. |
| 296 | // Filename and directory are computed in the member functions CmFileOpen, |
| 297 | // and CmFileSaveAs. |
| 298 | FileData.Flags = OFN_FILEMUSTEXIST | OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT; |
| 299 | FileData.SetFilter("Room Files (*.ROO)|*.ROO|All Files (*.*)|*.*|"); |
| 300 | |
| 301 | // |
| 302 | // ObjectWindows specific initializations |
| 303 | // |
| 304 | AutoLayout = TRUE ; |
| 305 | |
| 306 | // Override the default window style for TWindow. |
| 307 | Attr.Style |= WS_CLIPCHILDREN | WS_HSCROLL | |
| 308 | WS_VISIBLE | WS_VSCROLL; |
| 309 | |
| 310 | Scroller = new TEditScroller (this, 200, 200, MAP_X_SIZE, MAP_Y_SIZE) ; |
| 311 | |
| 312 | // Intialize info windows |
| 313 | pThingInfo = 0; |
| 314 | pVertexInfo = 0; |
| 315 | pLineDefInfo = 0; |
| 316 | pSideDef1Info = 0; |
| 317 | pSideDef2Info = 0; |
| 318 | pSectorInfo = 0; |
| 319 | |
| 320 | pThingInfo = new TInfoControl (this, 230, 5, "Thing"); |
| 321 | pLineDefInfo = new TInfoControl (this, 231, 7, "LineDef"); |
| 322 | pSideDef1Info = new TInfoControl (this, 232, 7, "First SideDef"); |
| 323 | pSideDef2Info = new TInfoControl (this, 233, 7, "Second SideDef"); |
| 324 | pVertexInfo = new TInfoControl (this, 234, 2, "Vertex"); |
| 325 | pSectorInfo = new TInfoControl (this, 235, 9, "Sector"); |
| 326 | |
| 327 | |
| 328 | // Retrieve pointer to status bar of MainFrame |
| 329 | TMainFrame *mainFrame = |
| 330 | TYPESAFE_DOWNCAST (GetApplication()->GetMainWindow(), TMainFrame); |
| 331 | |
| 332 | pStatusBar = mainFrame->GetStatusBar() ; |
| 333 | |
| 334 | // |
| 335 | // Level data initializations |
| 336 | // |
| 337 | |
| 338 | // Read editor needed data |
| 339 | // ReadWTextureInfo(); |
| 340 | // ReadFTextureInfo(); |
| 341 | InitUndo(); // Init UNDO/REDO feature |
| 342 |
nothing calls this directly
no test coverage detected