forked from cafeberry/cafeberry
29 lines
588 B
C++
29 lines
588 B
C++
#pragma once
|
|
|
|
#include <stdint.h>
|
|
|
|
class UIControl_TextInput;
|
|
class UIControl;
|
|
|
|
namespace DirectTextEdit
|
|
{
|
|
typedef int (*CommitCallback)(LPVOID param, bool accepted);
|
|
|
|
typedef void (*LineNavCallback)(LPVOID param, int dir);
|
|
|
|
void Begin(UIControl_TextInput *ctrl, UIControl *parent,
|
|
const wchar_t *initialText,
|
|
unsigned int maxChars, int keyboardMode,
|
|
CommitCallback callback, LPVOID param);
|
|
|
|
bool IsActive();
|
|
|
|
void Tick();
|
|
|
|
void Finish(bool accepted);
|
|
|
|
bool TakeText(uint16_t *outText, unsigned int outCapacity);
|
|
|
|
void SetLineNav(LineNavCallback callback, LPVOID param);
|
|
};
|