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-12-27 00:01:50 +03:00
|
|
|
#include "widgets/color_picker.inl"
|
2017-06-24 00:36:52 +03:00
|
|
|
#include "widgets/color_wheel.inl"
|
2016-12-26 08:07:39 +03:00
|
|
|
#include "widgets/dock.inl"
|
2016-06-07 04:17:40 +03:00
|
|
|
#include "widgets/file_list.inl"
|
2016-08-28 02:44:09 +03:00
|
|
|
#include "widgets/gizmo.inl"
|
2019-01-31 20:47:32 +03:00
|
|
|
#include "widgets/markdown.inl"
|
2016-12-26 08:07:39 +03:00
|
|
|
#include "widgets/memory_editor.inl"
|
|
|
|
#include "widgets/range_slider.inl"
|