Compare commits
2 Commits
abcf2adc56
...
a6814030ee
Author | SHA1 | Date | |
---|---|---|---|
a6814030ee | |||
9937a01042 |
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
namespace studio {
|
namespace studio {
|
||||||
|
|
||||||
studio::TaskState FileDialogManager::update(turbine::Context &ctx) noexcept {
|
TaskState FileDialogManager::update(turbine::Context &ctx) noexcept {
|
||||||
switch (m_state) {
|
switch (m_state) {
|
||||||
case UpdateProjectPathState::EnableSystemCursor: {
|
case UpdateProjectPathState::EnableSystemCursor: {
|
||||||
// switch to system cursor in this update and open file dialog in the next
|
// switch to system cursor in this update and open file dialog in the next
|
||||||
|
@ -34,7 +34,7 @@ void setClipboardText(Context &ctx, ox::StringViewCR text) noexcept;
|
|||||||
|
|
||||||
void setClipboardObject(Context &ctx, ox::UPtr<BaseClipboardObject> &&obj) noexcept;
|
void setClipboardObject(Context &ctx, ox::UPtr<BaseClipboardObject> &&obj) noexcept;
|
||||||
|
|
||||||
ox::Result<BaseClipboardObject*> getClipboardData(Context &ctx, ox::StringView typeId) noexcept;
|
ox::Result<BaseClipboardObject*> getClipboardData(Context &ctx, ox::StringViewCR typeId) noexcept;
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
ox::Result<T*> getClipboardObject(Context &ctx) noexcept {
|
ox::Result<T*> getClipboardObject(Context &ctx) noexcept {
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
#include <ox/std/string.hpp>
|
#include <ox/std/string.hpp>
|
||||||
|
|
||||||
#include <turbine/context.hpp>
|
#include <turbine/context.hpp>
|
||||||
|
#include <turbine/clipboard.hpp>
|
||||||
|
|
||||||
namespace turbine {
|
namespace turbine {
|
||||||
|
|
||||||
@ -15,4 +16,8 @@ ox::String getClipboardText(Context&) noexcept {
|
|||||||
void setClipboardText(Context&, ox::StringViewCR) noexcept {
|
void setClipboardText(Context&, ox::StringViewCR) noexcept {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ox::Result<BaseClipboardObject*> getClipboardData(Context&, ox::StringViewCR) noexcept {
|
||||||
|
return ox::Error{1, "not implemented"};
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -28,7 +28,7 @@ void setClipboardObject(Context &ctx, ox::UPtr<BaseClipboardObject> &&obj) noexc
|
|||||||
ctx.clipboard = std::move(obj);
|
ctx.clipboard = std::move(obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
ox::Result<BaseClipboardObject*> getClipboardData(Context &ctx, ox::StringView typeId) noexcept {
|
ox::Result<BaseClipboardObject*> getClipboardData(Context &ctx, ox::StringViewCR typeId) noexcept {
|
||||||
if (ctx.clipboard && ctx.clipboard->typeId() == typeId) {
|
if (ctx.clipboard && ctx.clipboard->typeId() == typeId) {
|
||||||
return ctx.clipboard.get();
|
return ctx.clipboard.get();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user