xref: /haiku/src/apps/haikudepot/util/AppUtils.h (revision 410ed2fbba58819ac21e27d3676739728416761d)
1 /*
2  * Copyright 2018-2021, 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 	static	status_t		GetAppVersionString(BString& result);
27 };
28 
29 
30 #endif // APP_UTILS_H
31