2016-06-07 06:13:03 +03:00
|
|
|
namespace ImGui
|
|
|
|
{
|
|
|
|
ImString::ImString()
|
|
|
|
: Ptr(NULL)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
ImString::ImString(const ImString& rhs)
|
|
|
|
: Ptr(NULL)
|
|
|
|
{
|
|
|
|
if (NULL != rhs.Ptr
|
2016-06-07 06:25:58 +03:00
|
|
|
&& 0 != strcmp(rhs.Ptr, ""))
|
2016-06-07 06:13:03 +03:00
|
|
|
{
|
|
|
|
Ptr = ImStrdup(rhs.Ptr);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
ImString::ImString(const char* rhs)
|
|
|
|
: Ptr(NULL)
|
|
|
|
{
|
|
|
|
if (NULL != rhs
|
2016-06-07 06:25:58 +03:00
|
|
|
&& 0 != strcmp(rhs, ""))
|
2016-06-07 06:13:03 +03:00
|
|
|
{
|
|
|
|
Ptr = ImStrdup(rhs);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
ImString::~ImString()
|
|
|
|
{
|
|
|
|
Clear();
|
|
|
|
}
|
|
|
|
|
|
|
|
ImString& ImString::operator=(const ImString& rhs)
|
|
|
|
{
|
|
|
|
if (this != &rhs)
|
|
|
|
{
|
|
|
|
*this = rhs.Ptr;
|
|
|
|
}
|
|
|
|
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
|
|
|
ImString& ImString::operator=(const char* rhs)
|
|
|
|
{
|
|
|
|
if (Ptr != rhs)
|
|
|
|
{
|
|
|
|
Clear();
|
|
|
|
|
|
|
|
if (NULL != rhs
|
2016-06-07 06:25:58 +03:00
|
|
|
&& 0 != strcmp(rhs, ""))
|
2016-06-07 06:13:03 +03:00
|
|
|
{
|
|
|
|
Ptr = ImStrdup(rhs);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
|
|
|
void ImString::Clear()
|
|
|
|
{
|
|
|
|
if (NULL != Ptr)
|
|
|
|
{
|
|
|
|
MemFree(Ptr);
|
|
|
|
Ptr = NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
bool ImString::IsEmpty() const
|
|
|
|
{
|
|
|
|
return NULL == Ptr;
|
|
|
|
}
|
|
|
|
} // namespace
|
|
|
|
|
|
|
|
|
2016-06-07 04:17:40 +03:00
|
|
|
#include "widgets/file_list.inl"
|
2016-05-28 22:12:59 +03:00
|
|
|
#include "widgets/memory_editor.inl"
|
2016-08-28 02:44:09 +03:00
|
|
|
#include "widgets/gizmo.inl"
|