- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
class WindowStateSelector { // helper class to share visibility between some DialogStates
public:
explicit WindowStateSelector(WindowState * current = NULL): mCurrent(current) {}
void Add(WindowState *windowState) { windowState->Show(windowState == mCurrent); }
virtual void Select(WindowState *windowState)
{
if (windowState == mCurrent) return;
if (mCurrent != NULL) mCurrent->Show(false);
if (windowState != NULL) windowState->Show(true);
mCurrent = windowState;
}
WindowState * GetCurrent() { return mCurrent; }
protected:
WindowState * mCurrent;
};
Комментарии (0) RSS
Добавить комментарий