MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / CreateChildViews

Method CreateChildViews

editor/editorView.cpp:583–614  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

581}
582
583void CEditorView::CreateChildViews() {
584 RECT view_rect, wire_rect, texture_rect;
585
586 if (m_grwndCreated)
587 return;
588
589 GetClientRect(&view_rect);
590 SetRect(&texture_rect, 0, 0, 0, 0);
591
592 // if we tile windows, then texture window will be reset to default width, height
593 // wireframe window will be sized depending on the existance of the texture view.
594 if (D3EditState.texscr_visible) {
595 if (D3EditState.tile_views)
596 SetRect(&texture_rect, view_rect.left, view_rect.top, view_rect.left + CALC_PIXELS_WITH_ASPECTX(TEXSCREEN_WIDTH),
597 view_rect.top + CALC_PIXELS_WITH_ASPECTY(TEXSCREEN_HEIGHT));
598 else
599 SetRect(&texture_rect, D3EditState.texscr_x, D3EditState.texscr_y, D3EditState.texscr_x + D3EditState.texscr_w,
600 D3EditState.texscr_y + D3EditState.texscr_h);
601 m_grwndTexture.Create(texture_rect, !D3EditState.tile_views, this);
602 }
603
604 if (D3EditState.wirescr_visible) {
605 if (D3EditState.tile_views)
606 SetRect(&wire_rect, view_rect.left, view_rect.top + texture_rect.bottom + 2, view_rect.right, view_rect.bottom);
607 else
608 SetRect(&wire_rect, D3EditState.wirescr_x, D3EditState.wirescr_y, D3EditState.wirescr_x + D3EditState.wirescr_w,
609 D3EditState.wirescr_y + D3EditState.wirescr_h);
610 m_grwndWireframe.Create(wire_rect, !D3EditState.tile_views, this);
611 }
612
613 m_grwndCreated = TRUE;
614}
615
616#include "ddio.h"
617

Callers

nothing calls this directly

Calls 3

CALC_PIXELS_WITH_ASPECTXFunction · 0.85
CALC_PIXELS_WITH_ASPECTYFunction · 0.85
CreateMethod · 0.45

Tested by

no test coverage detected