1
// -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*-
3
* Copyright (C) 2013 Canonical Ltd
5
* This program is free software: you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License version 3 as
7
* published by the Free Software Foundation.
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
14
* You should have received a copy of the GNU General Public License
15
* along with this program. If not, see <http://www.gnu.org/licenses/>.
17
* Authored by: Marco Trevisan (Treviño) <marco@ubuntu.com>
20
#include "SessionView.h"
22
#include <Nux/VLayout.h>
23
#include <UnityCore/GLibWrapper.h>
24
#include <glib/gi18n-lib.h>
25
#include "unity-shared/StaticCairoText.h"
31
NUX_IMPLEMENT_OBJECT_TYPE(View);
33
View::View(Manager::Ptr const& manager)
37
auto main_layout = new nux::VLayout();
38
int offset = style()->GetInternalOffset();
39
main_layout->SetPadding(offset + 20, offset + 28);
40
SetLayout(main_layout);
42
auto header = glib::String(g_strdup_printf(_("Goodbye %s! Would you like to…"), manager->RealName().c_str())).Str();
43
auto* header_view = new StaticCairoText(header);
44
header_view->SetFont("Ubuntu Light 12");
45
main_layout->AddView(header_view, 1 , nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_FULL);
48
nux::Geometry View::GetBackgroundGeometry()
53
void View::DrawOverlay(nux::GraphicsEngine& GfxContext, bool force_draw, nux::Geometry clip)
55
view_layout_->ProcessDraw(GfxContext, force_draw);
59
// Introspectable methods
61
std::string View::GetName() const
66
} // namespace session