2020-12-31 07:32:16 -08:00
|
|
|
// Copyright © 2008-2021 Pioneer Developers. See AUTHORS.txt for details
|
2012-09-15 17:59:15 -07:00
|
|
|
// Licensed under the terms of the GPL v3. See licenses/GPL-3.txt
|
2012-09-12 04:38:30 -07:00
|
|
|
|
2012-04-01 17:00:11 -07:00
|
|
|
#include "View.h"
|
|
|
|
#include "Pi.h"
|
2014-09-18 10:23:10 -07:00
|
|
|
|
2019-01-02 08:59:07 -08:00
|
|
|
View::View() :
|
|
|
|
Gui::Fixed(float(Gui::Screen::GetWidth()), float(Gui::Screen::GetHeight() - 64))
|
|
|
|
{
|
2012-04-01 17:00:11 -07:00
|
|
|
}
|
|
|
|
|
2019-01-02 08:59:07 -08:00
|
|
|
View::~View()
|
|
|
|
{
|
2012-04-01 17:00:11 -07:00
|
|
|
Gui::Screen::RemoveBaseWidget(this);
|
|
|
|
}
|
|
|
|
|
2019-01-02 08:59:07 -08:00
|
|
|
void View::Attach()
|
|
|
|
{
|
2012-09-22 23:44:36 -07:00
|
|
|
OnSwitchTo();
|
|
|
|
|
2012-04-01 17:00:11 -07:00
|
|
|
Gui::Screen::AddBaseWidget(this, 0, 0);
|
2012-09-14 19:17:33 -07:00
|
|
|
|
2012-09-20 14:27:40 -07:00
|
|
|
ShowAll();
|
2012-04-01 17:00:11 -07:00
|
|
|
}
|
|
|
|
|
2019-01-02 08:59:07 -08:00
|
|
|
void View::Detach()
|
|
|
|
{
|
2012-04-01 17:00:11 -07:00
|
|
|
Gui::Screen::RemoveBaseWidget(this);
|
2012-09-29 01:25:56 -07:00
|
|
|
OnSwitchFrom();
|
2012-04-01 17:00:11 -07:00
|
|
|
}
|