MythScreenStack *stack = new MythScreenStack(); MythScreen *screen = new MythScreen(); stack->AddScreen(screen, true);
MythScreenStack *stack = new MythScreenStack(); MythScreen *currentScreen = stack->GetCurrentScreen(); MythScreen *newScreen = new MythScreen(); stack->AddScreen(newScreen, false);In this example, a new MythScreenStack object is created, and the GetCurrentScreen() method is used to obtain a pointer to the current screen on the stack. A new MythScreen object is then created, and the AddScreen() method is called on the stack with the new screen and a boolean value of false to insert it below the current screen. Overall, the MythScreenStack class and its AddScreen() method are part of the MythTV library for building user interfaces in C++.