Holds and connects all of the screens used in the program in a list. Keeps track of the previous screen. Contains functions to move to the next or previous screens. More...
#include <ScreenList.hpp>
Collaboration diagram for BARE2D::ScreenList:Public Member Functions | |
| ScreenList () | |
| ~ScreenList () | |
| Destroys the screen list, "taking care" of the screen pointers it owns. More... | |
| void | addScreen (Screen *screen) |
| Adds a screen to the list of screens, AKA the screen list. Requires non-nullptr. Also, calls the screen's initScreen function. More... | |
| void | addEntryScreen (Screen *screen) |
| Adds a screen, and sets the current screen to this one. More... | |
| void | moveToNextScreen () |
| Moves to the next screen, updates needed variables. Also, exits old screen and enters new one. More... | |
| void | moveToPreviousScreen () |
| Moves to the previous screen. Similar to moveToNextScreen, in that it makes sure everything's good! More... | |
| Screen * | getCurrentScreen () |
Private Attributes | |
| std::vector< Screen * > | m_screens |
| Screen * | m_previousScreen = nullptr |
| Screen * | m_currentScreen = nullptr |
Holds and connects all of the screens used in the program in a list. Keeps track of the previous screen. Contains functions to move to the next or previous screens.
Definition at line 13 of file ScreenList.hpp.
| BARE2D::ScreenList::ScreenList | ( | ) |
Definition at line 7 of file ScreenList.cpp.
| BARE2D::ScreenList::~ScreenList | ( | ) |
Destroys the screen list, "taking care" of the screen pointers it owns.
| screen |
Definition at line 11 of file ScreenList.cpp.
References m_currentScreen, m_previousScreen, and m_screens.
| void BARE2D::ScreenList::addEntryScreen | ( | Screen * | screen | ) |
Adds a screen, and sets the current screen to this one.
| screen | A pointer to the entry screen. |
Definition at line 27 of file ScreenList.cpp.
References addScreen(), and m_currentScreen.
Here is the call graph for this function:| void BARE2D::ScreenList::addScreen | ( | Screen * | screen | ) |
Adds a screen to the list of screens, AKA the screen list. Requires non-nullptr. Also, calls the screen's initScreen function.
| screen | A pointer to the screen to be added. |
Definition at line 21 of file ScreenList.cpp.
References BARE2D::Screen::initScreen(), and m_screens.
Referenced by addEntryScreen().
Here is the call graph for this function:
Here is the caller graph for this function:| Screen * BARE2D::ScreenList::getCurrentScreen | ( | ) |
Definition at line 69 of file ScreenList.cpp.
References m_currentScreen.
| void BARE2D::ScreenList::moveToNextScreen | ( | ) |
Moves to the next screen, updates needed variables. Also, exits old screen and enters new one.
Definition at line 33 of file ScreenList.cpp.
References BARE2D::Screen::getNextScreenIndex(), m_currentScreen, m_screens, BARE2D::Screen::onEntry(), and BARE2D::Screen::onExit().
Here is the call graph for this function:| void BARE2D::ScreenList::moveToPreviousScreen | ( | ) |
Moves to the previous screen. Similar to moveToNextScreen, in that it makes sure everything's good!
Definition at line 50 of file ScreenList.cpp.
References m_currentScreen, m_previousScreen, BARE2D::Screen::onEntry(), and BARE2D::Screen::onExit().
Here is the call graph for this function:
|
private |
Definition at line 54 of file ScreenList.hpp.
Referenced by addEntryScreen(), getCurrentScreen(), moveToNextScreen(), moveToPreviousScreen(), and ~ScreenList().
|
private |
Definition at line 53 of file ScreenList.hpp.
Referenced by moveToPreviousScreen(), and ~ScreenList().
|
private |
Definition at line 52 of file ScreenList.hpp.
Referenced by addScreen(), moveToNextScreen(), and ~ScreenList().