GCC Code Coverage Report
Directory: src/ Exec Total Coverage
File: src/progs/manaplus/actions/tabs.cpp Lines: 0 30 0.0 %
Date: 2017-11-29 Branches: 0 12 0.0 %

Line Branch Exec Source
1
/*
2
 *  The ManaPlus Client
3
 *  Copyright (C) 2012-2017  The ManaPlus Developers
4
 *
5
 *  This file is part of The ManaPlus Client.
6
 *
7
 *  This program is free software; you can redistribute it and/or modify
8
 *  it under the terms of the GNU General Public License as published by
9
 *  the Free Software Foundation; either version 2 of the License, or
10
 *  any later version.
11
 *
12
 *  This program is distributed in the hope that it will be useful,
13
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
 *  GNU General Public License for more details.
16
 *
17
 *  You should have received a copy of the GNU General Public License
18
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
19
 */
20
21
#include "actions/tabs.h"
22
23
#include "actions/actiondef.h"
24
25
#include "gui/windows/inventorywindow.h"
26
#include "gui/windows/socialwindow.h"
27
#include "gui/windows/shortcutwindow.h"
28
29
#include "debug.h"
30
31
namespace Actions
32
{
33
34
impHandler0(prevSocialTab)
35
{
36
    if (socialWindow != nullptr)
37
    {
38
        socialWindow->prevTab();
39
        return true;
40
    }
41
    return false;
42
}
43
44
impHandler0(nextSocialTab)
45
{
46
    if (socialWindow != nullptr)
47
    {
48
        socialWindow->nextTab();
49
        return true;
50
    }
51
    return false;
52
}
53
54
impHandler0(nextShortcutsTab)
55
{
56
    if (itemShortcutWindow != nullptr)
57
    {
58
        itemShortcutWindow->nextTab();
59
        return true;
60
    }
61
    return false;
62
}
63
64
impHandler0(prevShortcutsTab)
65
{
66
    if (itemShortcutWindow != nullptr)
67
    {
68
        itemShortcutWindow->prevTab();
69
        return true;
70
    }
71
    return false;
72
}
73
74
impHandler0(nextCommandsTab)
75
{
76
    if (spellShortcutWindow != nullptr)
77
    {
78
        spellShortcutWindow->nextTab();
79
        return true;
80
    }
81
    return false;
82
}
83
84
impHandler0(prevCommandsTab)
85
{
86
    if (spellShortcutWindow != nullptr)
87
    {
88
        spellShortcutWindow->prevTab();
89
        return true;
90
    }
91
    return false;
92
}
93
94
impHandler0(nextInvTab)
95
{
96
    InventoryWindow::nextTab();
97
    return true;
98
}
99
100
impHandler0(prevInvTab)
101
{
102
    InventoryWindow::prevTab();
103
    return true;
104
}
105
106
}  // namespace Actions