1 /* 2 * Copyright 2018-2020, Andrew Lindesay <apl@lindesay.co.nz>. 3 * All rights reserved. Distributed under the terms of the MIT License. 4 */ 5 #ifndef APP_UTILS_H 6 #define APP_UTILS_H 7 8 9 #include "Menu.h" 10 11 12 class AppUtils { 13 14 public: 15 static void NotifySimpleError(const char* title, 16 const char* text); 17 18 static status_t MarkItemWithCodeInMenuOrFirst(const BString& code, 19 BMenu* menu); 20 static status_t MarkItemWithCodeInMenu(const BString& code, 21 BMenu* menu); 22 static int32 IndexOfCodeInMenu(const BString& code, BMenu* menu); 23 static status_t GetCodeAtIndexInMenu(BMenu* menu, int32 index, 24 BString* result); 25 }; 26 27 28 #endif // APP_UTILS_H 29