MCPcopy Create free account
hub / github.com/dhewm/dhewm3 / Parse

Method Parse

neo/ui/Window.cpp:2280–2698  ·  view source on GitHub ↗

================ idWindow::Parse ================ */

Source from the content-addressed store, hash-verified

2278================
2279*/
2280bool idWindow::Parse( idParser *src, bool rebuild) {
2281 idToken token, token2, token3, token4, token5, token6, token7;
2282 idStr work;
2283
2284 if (rebuild) {
2285 CleanUp();
2286 }
2287
2288 drawWin_t dwt;
2289
2290 timeLineEvents.Clear();
2291 transitions.Clear();
2292
2293 namedEvents.DeleteContents( true );
2294
2295 src->ExpectTokenType( TT_NAME, 0, &token );
2296
2297 SetInitialState(token);
2298
2299 src->ExpectTokenString( "{" );
2300 src->ExpectAnyToken( &token );
2301
2302 bool ret = true;
2303
2304 // attach a window wrapper to the window if the gui editor is running
2305#ifdef ID_ALLOW_TOOLS
2306 if ( com_editors & EDITOR_GUI ) {
2307 new rvGEWindowWrapper ( this, rvGEWindowWrapper::WT_NORMAL );
2308 }
2309#endif
2310
2311 while( token != "}" ) {
2312 // track what was parsed so we can maintain it for the guieditor
2313 src->SetMarker ( );
2314
2315 if ( token == "windowDef" || token == "animationDef" ) {
2316 if (token == "animationDef") {
2317 visible = false;
2318 rect = idRectangle(0,0,0,0);
2319 }
2320 src->ExpectTokenType( TT_NAME, 0, &token );
2321 token2 = token;
2322 src->UnreadToken(&token);
2323 drawWin_t *dw = FindChildByName(token2.c_str());
2324 if (dw && dw->win) {
2325 SaveExpressionParseState();
2326 dw->win->Parse(src, rebuild);
2327 RestoreExpressionParseState();
2328 } else {
2329 idWindow *win = new idWindow(dc, gui);
2330 SaveExpressionParseState();
2331 win->Parse(src, rebuild);
2332 RestoreExpressionParseState();
2333 win->SetParent(this);
2334 dwt.simp = NULL;
2335 dwt.win = NULL;
2336 if (win->IsSimple()) {
2337 idSimpleWindow *simple = new idSimpleWindow(win);

Callers 8

Map_LoadFileFunction · 0.45
ParseMaterialTextMethod · 0.45
LoadDMapFileFunction · 0.45
BuildMethod · 0.45
BuildReachabilityMethod · 0.45
NewWindowMethod · 0.45
ParseScriptMethod · 0.45
InitFromFileMethod · 0.45

Calls 15

vaFunction · 0.85
SetMarkerMethod · 0.80
IsSimpleMethod · 0.80
GetStringFromMarkerMethod · 0.80
ToLowerMethod · 0.80
AddRegMethod · 0.80
GetDesktopMethod · 0.80
idRectangleClass · 0.70
ClearMethod · 0.45
DeleteContentsMethod · 0.45
ExpectTokenTypeMethod · 0.45
ExpectTokenStringMethod · 0.45

Tested by

no test coverage detected