DUDS
Distributed Update of Data from Something
MenuErrors.hpp
Go to the documentation of this file.
1
/*
2
* This file is part of the DUDS project. It is subject to the BSD-style
3
* license terms in the LICENSE file found in the top-level directory of this
4
* distribution and at https://github.com/jjackowski/duds/blob/master/LICENSE.
5
* No part of DUDS, including this file, may be copied, modified, propagated,
6
* or distributed except according to the terms contained in the LICENSE file.
7
*
8
* Copyright (C) 2019 Jeff Jackowski
9
*/
10
#include <boost/exception/exception.hpp>
11
#include <boost/exception/info.hpp>
12
#include <exception>
13
#include <memory>
14
15
namespace
duds
{
namespace
ui {
namespace
menu {
16
17
class
Menu;
18
class
MenuItem;
19
23
struct
MenuError
:
virtual
std::exception,
virtual
boost::exception { };
24
28
struct
MenuNoItemError
:
MenuError
{ };
29
33
struct
MenuBoundsError
:
MenuError
{ };
34
38
struct
MenuItemDoesNotExist
:
MenuError
{ };
39
44
struct
MenuItemNotVisible
:
MenuError
{ };
45
50
struct
MenuItemDisabled
:
MenuError
{ };
51
56
struct
MenuItemNotAToggle
:
MenuError
{ };
57
62
struct
MenuItemLacksValue
:
MenuError
{ };
63
67
struct
MenuViewAlreadyAttached
:
MenuError
{ };
68
72
struct
MenuOutputNotAttached
:
MenuError
{ };
73
79
struct
MenuTooSmall
:
MenuError
{ };
80
84
typedef
boost::error_info<struct Info_MenuItemIndex, std::size_t>
85
MenuItemIndex
;
86
87
// may need to add functions to output names for menus and items to ostream
88
// for the following types to work well. also include menu size.
89
93
typedef
boost::error_info< struct Info_MenuItem, std::shared_ptr<const MenuItem> >
94
MenuItemObject
;
95
99
typedef
boost::error_info< struct Info_Menu, std::shared_ptr<const Menu> >
100
MenuObject
;
101
102
} } }
duds::ui::menu::MenuItemNotAToggle
A request was made to change the toggle state of a MenuItem that is not a toggle item.
Definition:
MenuErrors.hpp:56
duds::ui::menu::MenuNoItemError
A required MenuItem object is missing.
Definition:
MenuErrors.hpp:28
duds
Definition:
Constants.hpp:15
duds::ui::menu::MenuItemIndex
boost::error_info< struct Info_MenuItemIndex, std::size_t > MenuItemIndex
The index (position) of the MenuItem involved in an error.
Definition:
MenuErrors.hpp:85
duds::ui::menu::MenuItemLacksValue
A request was made to change the value of a MenuItem that does not have a value.
Definition:
MenuErrors.hpp:62
duds::ui::menu::MenuObject
boost::error_info< struct Info_Menu, std::shared_ptr< const Menu > > MenuObject
The Menu object that is involved in an error.
Definition:
MenuErrors.hpp:100
duds::ui::menu::MenuOutputNotAttached
Attempted use of a MenuOutput object that hasn't been attached to a MenuView.
Definition:
MenuErrors.hpp:72
duds::ui::menu::MenuError
The base exception type for all errors about menus.
Definition:
MenuErrors.hpp:23
duds::ui::menu::MenuBoundsError
An attempt was made to inset a MenuItem beyond the bounds of the menu.
Definition:
MenuErrors.hpp:33
duds::ui::menu::MenuItemObject
boost::error_info< struct Info_MenuItem, std::shared_ptr< const MenuItem > > MenuItemObject
The MenuItem object that is involved in an error.
Definition:
MenuErrors.hpp:94
duds::ui::menu::MenuItemNotVisible
An operation was attempted on an invisible MenuItem that requires a visible item. ...
Definition:
MenuErrors.hpp:44
duds::ui::menu::MenuItemDoesNotExist
The specified MenuItem does not exist in the Menu.
Definition:
MenuErrors.hpp:38
duds::ui::menu::MenuTooSmall
There is inadequate room to render the menu.
Definition:
MenuErrors.hpp:79
duds::ui::menu::MenuItemDisabled
An operation was attempted on a disabled MenuItem that requires a non-disabled item.
Definition:
MenuErrors.hpp:50
duds::ui::menu::MenuViewAlreadyAttached
MenuView::attach() was called more than once on a MenuView object.
Definition:
MenuErrors.hpp:67
duds
ui
menu
MenuErrors.hpp
Generated on Sat Mar 23 2024 19:12:03 for DUDS by
1.8.13