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

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