Package org.lwjgl.nuklear
Class NkTextEdit
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.nuklear.NkTextEdit
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,org.lwjgl.system.NativeResource
,org.lwjgl.system.Pointer
public class NkTextEdit extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResource
Layout
struct nk_text_edit {
struct nk_clipboard
clip;struct nk_str
string;nk_plugin_filter
filter;struct nk_vec2
scrollbar; int cursor; int select_start; int select_end; unsigned char mode; bool cursor_at_end_of_line; bool initialized; bool has_preferred_x; bool single_line; bool active; char[1]; float preferred_x;struct nk_text_undo_state
undo; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
NkTextEdit.Buffer
An array ofNkTextEdit
structs.
-
Field Summary
Fields Modifier and Type Field Description static int
ACTIVE
The struct member offsets.static int
ALIGNOF
The struct alignment in bytes.static int
CLIP
CURSOR
CURSOR_AT_END_OF_LINE
FILTER
HAS_PREFERRED_X
INITIALIZED
MODE
PREFERRED_X
SCROLLBAR
SELECT_END
SELECT_START
SINGLE_LINEThe struct member offsets.static int
SIZEOF
The struct size in bytes.static int
STRING
UNDOThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description NkTextEdit(java.nio.ByteBuffer container)
Creates aNkTextEdit
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
active()
Returns the value of theactive
field.static NkTextEdit
calloc()
Returns a newNkTextEdit
instance allocated withmemCalloc
.static NkTextEdit.Buffer
calloc(int capacity)
Returns a newNkTextEdit.Buffer
instance allocated withmemCalloc
.static NkTextEdit
callocStack()
Returns a newNkTextEdit
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static NkTextEdit.Buffer
callocStack(int capacity)
Returns a newNkTextEdit.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static NkTextEdit.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newNkTextEdit.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static NkTextEdit
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newNkTextEdit
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.NkClipboard
clip()
Returns aNkClipboard
view of theclip
field.static NkTextEdit
create()
Returns a newNkTextEdit
instance allocated withBufferUtils
.static NkTextEdit.Buffer
create(int capacity)
Returns a newNkTextEdit.Buffer
instance allocated withBufferUtils
.static NkTextEdit
create(long address)
Returns a newNkTextEdit
instance for the specified memory address.static NkTextEdit.Buffer
create(long address, int capacity)
Create aNkTextEdit.Buffer
instance at the specified memory.static NkTextEdit
createSafe(long address)
static NkTextEdit.Buffer
createSafe(long address, int capacity)
int
cursor()
Returns the value of thecursor
field.boolean
cursor_at_end_of_line()
Returns the value of thecursor_at_end_of_line
field.NkPluginFilter
filter()
Returns the value of thefilter
field.boolean
has_preferred_x()
Returns the value of thehas_preferred_x
field.boolean
initialized()
Returns the value of theinitialized
field.static NkTextEdit
malloc()
Returns a newNkTextEdit
instance allocated withmemAlloc
.static NkTextEdit.Buffer
malloc(int capacity)
Returns a newNkTextEdit.Buffer
instance allocated withmemAlloc
.static NkTextEdit
mallocStack()
Returns a newNkTextEdit
instance allocated on the thread-localMemoryStack
.static NkTextEdit.Buffer
mallocStack(int capacity)
Returns a newNkTextEdit.Buffer
instance allocated on the thread-localMemoryStack
.static NkTextEdit.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newNkTextEdit.Buffer
instance allocated on the specifiedMemoryStack
.static NkTextEdit
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newNkTextEdit
instance allocated on the specifiedMemoryStack
.byte
mode()
Returns the value of themode
field.static boolean
nactive(long struct)
Unsafe version ofactive()
.static NkClipboard
nclip(long struct)
Unsafe version ofclip()
.static int
ncursor(long struct)
Unsafe version ofcursor()
.static boolean
ncursor_at_end_of_line(long struct)
Unsafe version ofcursor_at_end_of_line()
.static NkPluginFilter
nfilter(long struct)
Unsafe version offilter()
.static boolean
nhas_preferred_x(long struct)
Unsafe version ofhas_preferred_x()
.static boolean
ninitialized(long struct)
Unsafe version ofinitialized()
.static byte
nmode(long struct)
Unsafe version ofmode()
.static float
npreferred_x(long struct)
Unsafe version ofpreferred_x()
.static NkVec2
nscrollbar(long struct)
Unsafe version ofscrollbar()
.static int
nselect_end(long struct)
Unsafe version ofselect_end()
.static int
nselect_start(long struct)
Unsafe version ofselect_start()
.static boolean
nsingle_line(long struct)
Unsafe version ofsingle_line()
.static NkStr
nstring(long struct)
Unsafe version ofstring()
.static NkTextUndoState
nundo(long struct)
Unsafe version ofundo()
.float
preferred_x()
Returns the value of thepreferred_x
field.NkVec2
scrollbar()
Returns aNkVec2
view of thescrollbar
field.int
select_end()
Returns the value of theselect_end
field.int
select_start()
Returns the value of theselect_start
field.boolean
single_line()
Returns the value of thesingle_line
field.int
sizeof()
NkStr
string()
Returns aNkStr
view of thestring
field.NkTextUndoState
undo()
Returns aNkTextUndoState
view of theundo
field.
-
-
-
Constructor Detail
-
NkTextEdit
public NkTextEdit(java.nio.ByteBuffer container)
Creates aNkTextEdit
instance at the current position of the specifiedByteBuffer
container. Changes to the buffer's content will be visible to the struct instance and vice versa.The created instance holds a strong reference to the container object.
-
-
Method Detail
-
sizeof
public int sizeof()
- Specified by:
sizeof
in classorg.lwjgl.system.Struct
-
clip
public NkClipboard clip()
Returns aNkClipboard
view of theclip
field.
-
filter
@Nullable public NkPluginFilter filter()
Returns the value of thefilter
field.
-
cursor
public int cursor()
Returns the value of thecursor
field.
-
select_start
public int select_start()
Returns the value of theselect_start
field.
-
select_end
public int select_end()
Returns the value of theselect_end
field.
-
mode
public byte mode()
Returns the value of themode
field.
-
cursor_at_end_of_line
public boolean cursor_at_end_of_line()
Returns the value of thecursor_at_end_of_line
field.
-
initialized
public boolean initialized()
Returns the value of theinitialized
field.
-
has_preferred_x
public boolean has_preferred_x()
Returns the value of thehas_preferred_x
field.
-
single_line
public boolean single_line()
Returns the value of thesingle_line
field.
-
active
public boolean active()
Returns the value of theactive
field.
-
preferred_x
public float preferred_x()
Returns the value of thepreferred_x
field.
-
undo
public NkTextUndoState undo()
Returns aNkTextUndoState
view of theundo
field.
-
malloc
public static NkTextEdit malloc()
Returns a newNkTextEdit
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static NkTextEdit calloc()
Returns a newNkTextEdit
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static NkTextEdit create()
Returns a newNkTextEdit
instance allocated withBufferUtils
.
-
create
public static NkTextEdit create(long address)
Returns a newNkTextEdit
instance for the specified memory address.
-
createSafe
@Nullable public static NkTextEdit createSafe(long address)
-
malloc
public static NkTextEdit.Buffer malloc(int capacity)
Returns a newNkTextEdit.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static NkTextEdit.Buffer calloc(int capacity)
Returns a newNkTextEdit.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static NkTextEdit.Buffer create(int capacity)
Returns a newNkTextEdit.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static NkTextEdit.Buffer create(long address, int capacity)
Create aNkTextEdit.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static NkTextEdit.Buffer createSafe(long address, int capacity)
-
mallocStack
public static NkTextEdit mallocStack()
Returns a newNkTextEdit
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static NkTextEdit callocStack()
Returns a newNkTextEdit
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static NkTextEdit mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newNkTextEdit
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static NkTextEdit callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newNkTextEdit
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static NkTextEdit.Buffer mallocStack(int capacity)
Returns a newNkTextEdit.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static NkTextEdit.Buffer callocStack(int capacity)
Returns a newNkTextEdit.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static NkTextEdit.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newNkTextEdit.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static NkTextEdit.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newNkTextEdit.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
nclip
public static NkClipboard nclip(long struct)
Unsafe version ofclip()
.
-
nfilter
@Nullable public static NkPluginFilter nfilter(long struct)
Unsafe version offilter()
.
-
nscrollbar
public static NkVec2 nscrollbar(long struct)
Unsafe version ofscrollbar()
.
-
ncursor
public static int ncursor(long struct)
Unsafe version ofcursor()
.
-
nselect_start
public static int nselect_start(long struct)
Unsafe version ofselect_start()
.
-
nselect_end
public static int nselect_end(long struct)
Unsafe version ofselect_end()
.
-
nmode
public static byte nmode(long struct)
Unsafe version ofmode()
.
-
ncursor_at_end_of_line
public static boolean ncursor_at_end_of_line(long struct)
Unsafe version ofcursor_at_end_of_line()
.
-
ninitialized
public static boolean ninitialized(long struct)
Unsafe version ofinitialized()
.
-
nhas_preferred_x
public static boolean nhas_preferred_x(long struct)
Unsafe version ofhas_preferred_x()
.
-
nsingle_line
public static boolean nsingle_line(long struct)
Unsafe version ofsingle_line()
.
-
nactive
public static boolean nactive(long struct)
Unsafe version ofactive()
.
-
npreferred_x
public static float npreferred_x(long struct)
Unsafe version ofpreferred_x()
.
-
nundo
public static NkTextUndoState nundo(long struct)
Unsafe version ofundo()
.
-
-