31 #ifndef TBX_RES_RESEXCEPT_H_ 32 #define TBX_RES_RESEXCEPT_H_ 35 #include "../handles.h" 36 #include "../stringutils.h" 58 :
std::invalid_argument(
"Object " + object
60 +
" does not match assigned class " +
tbx::
to_string(check_id))
79 :
std::invalid_argument(
"Gadget with type id " +
tbx::
to_string(type_id)
80 +
" does not match assigned type id " +
tbx::
to_string(check_id))
97 :
std::invalid_argument(
"Resource '" + name
117 :
std::invalid_argument(
"Resource '" + name
118 +
"' already exists")
137 :
std::invalid_argument(
"Menu " + menu
138 +
" does not contain menu item " +
tbx::
to_string(component_id))
157 :
std::invalid_argument(
"Menu " + menu
158 +
" already contains menu item " +
tbx::
to_string(component_id))
177 :
std::invalid_argument(
"Window " + window
178 +
" does not contain gadget " +
tbx::
to_string(component_id))
198 :
std::invalid_argument(
"Window " + window
199 +
" already contains gadget " +
tbx::
to_string(component_id))
218 :
std::invalid_argument(
"Window " + window
219 +
" does not contain gadget " +
tbx::
to_string(key_code))
239 :
std::invalid_argument(
"Window " + window
240 +
" already contains gadget " +
tbx::
to_string(key_code))
ResGadgetNotFound(std::string window, tbx::ComponentId component_id)
Construct exception thrown when a gadget can not be found in a window resource.
Definition: resexcept.h:176
ResObjectExists(std::string name)
Construct exception thrown when a Toolbox object already exists in the editor.
Definition: resexcept.h:116
A library for creating RISC OS toolbox applications.
Definition: abouttobeshownlistener.cc:34
Exception thrown when a window resource already contains a shortcut with a key code.
Definition: resexcept.h:228
ResObjectClassMismatch(std::string object, int class_id, int check_id)
Construct a resource object mismatch exception.
Definition: resexcept.h:57
ResGadgetTypeMismatch(int type_id, int check_id)
Construct exception when resource gadget types do not match.
Definition: resexcept.h:78
ResShortcutExists(std::string window, int key_code)
Construct exception thrown when a shortcut already exists in a window resource.
Definition: resexcept.h:238
int ComponentId
Type for underlying toolbox component id.
Definition: handles.h:33
Exception thrown when a ResObject is assigned to a subclass with the wrong class id.
Definition: resexcept.h:47
Classes to use/edit toolbox resources in memory.
Exception thrown when a window resource already contains a gadget with a component id...
Definition: resexcept.h:187
Exception thrown when a shortcut key can't be found in a window.
Definition: resexcept.h:207
ResShortcutNotFound(std::string window, int key_code)
Construct exception thrown when a shortcut can not be found in a window resource. ...
Definition: resexcept.h:217
Exception thrown when an object can't be found in a ResEditor or ResFile.
Definition: resexcept.h:88
Exception thrown when the ResEditor already contains an object with a given name. ...
Definition: resexcept.h:107
std::string to_string(const T &value)
Convert a value to a string.
Definition: stringutils.h:44
ResObjectNotFound(std::string name)
Construct resource not found exception.
Definition: resexcept.h:96
ResGadgetExists(std::string window, tbx::ComponentId component_id)
Construct exception thrown when a gadget already exists in a window resource.
Definition: resexcept.h:197
Exception thrown when a ResObject is assigned to a subclass with the wrong class id.
Definition: resexcept.h:69
Exception thrown when a gadget can't be found in a window.
Definition: resexcept.h:166