2012-07-23 23:50:18 +02:00
|
|
|
/*
|
|
|
|
* Copyright 2012, Ingo Weinhold, ingo_weinhold@gmx.de.
|
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*/
|
|
|
|
#ifndef UI_UTILS_H
|
|
|
|
#define UI_UTILS_H
|
|
|
|
|
2012-11-17 17:57:02 -05:00
|
|
|
#include <size_t.h>
|
2012-07-23 23:50:18 +02:00
|
|
|
|
2012-11-22 10:56:26 -05:00
|
|
|
#include <image.h>
|
2012-11-17 17:57:02 -05:00
|
|
|
|
|
|
|
|
2012-12-10 23:13:40 -05:00
|
|
|
class BString;
|
2012-11-17 17:57:02 -05:00
|
|
|
class BVariant;
|
2012-11-22 10:56:26 -05:00
|
|
|
class StackFrame;
|
2012-11-22 23:41:11 -05:00
|
|
|
class Team;
|
2012-12-10 23:13:40 -05:00
|
|
|
class ValueNodeChild;
|
2012-07-23 23:50:18 +02:00
|
|
|
|
|
|
|
class UiUtils {
|
|
|
|
public:
|
|
|
|
static const char* ThreadStateToString(int state,
|
|
|
|
int stoppedReason);
|
2012-11-17 17:57:02 -05:00
|
|
|
|
|
|
|
static const char* VariantToString(const BVariant& value,
|
|
|
|
char* buffer, size_t bufferSize);
|
|
|
|
static const char* FunctionNameForFrame(StackFrame* frame,
|
|
|
|
char* buffer, size_t bufferSize);
|
2012-11-22 10:56:26 -05:00
|
|
|
static const char* ImageTypeToString(image_type type,
|
|
|
|
char* buffer, size_t bufferSize);
|
2012-11-22 23:41:11 -05:00
|
|
|
|
|
|
|
static const char* ReportNameForTeam(::Team* team,
|
|
|
|
char* buffer, size_t bufferSize);
|
2012-12-10 23:13:40 -05:00
|
|
|
|
|
|
|
// this function assumes the value nodes have already been resolved
|
|
|
|
// (if possible).
|
|
|
|
static void PrintValueNodeGraph(BString& _output,
|
|
|
|
ValueNodeChild* child,
|
|
|
|
int32 indentLevel, int32 maxDepth);
|
2012-07-23 23:50:18 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif // UI_UTILS_H
|