Top Description Inners Fields Constructors Methods
org.lwjgl.nuklear

public Class NkTextEdit

extends Struct<NkTextEdit>
implements NativeResource
Class Inheritance
All Implemented Interfaces
org.lwjgl.system.NativeResource, java.lang.AutoCloseable
Annotations
@NativeType:struct nk_text_edit
Imports
javax.annotation.*, java.nio.*, org.lwjgl.*, org.lwjgl.system.*

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 and Inner Type Summary

Modifier and TypeClass and Description
public static class
NkTextEdit.Buffer

An array of NkTextEdit structs.

Field Summary

Modifier and TypeField and Description
public static final int
ACTIVE

The struct member offsets.

public static final int
ALIGNOF

The struct alignment in bytes.

public static final int
CLIP

The struct member offsets.

public static final int
CURSOR

The struct member offsets.

public static final int
CURSOR_AT_END_OF_LINE

The struct member offsets.

public static final int
FILTER

The struct member offsets.

public static final int
HAS_PREFERRED_X

The struct member offsets.

public static final int
INITIALIZED

The struct member offsets.

public static final int
MODE

The struct member offsets.

public static final int
PREFERRED_X

The struct member offsets.

public static final int
SCROLLBAR

The struct member offsets.

public static final int
SELECT_END

The struct member offsets.

public static final int
SELECT_START

The struct member offsets.

public static final int
SINGLE_LINE

The struct member offsets.

public static final int
SIZEOF

The struct size in bytes.

public static final int
STRING

The struct member offsets.

public static final int
UNDO

The struct member offsets.

Inherited from org.lwjgl.system.Struct:
containerDEFAULT_ALIGN_ASDEFAULT_PACK_ALIGNMENT

Constructor Summary

AccessConstructor and Description
protected
NkTextEdit(long address, ByteBuffer container)

public
NkTextEdit(ByteBuffer container)

Creates a NkTextEdit instance at the current position of the specified ByteBuffer container.

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

the value of the active field.
active
()

public static NkTextEdit
calloc()

Returns a new NkTextEdit instance allocated with memCalloc.

public static NkTextEdit.Buffer
calloc(int
the buffer capacity
capacity
)

Returns a new NkTextEdit.Buffer instance allocated with memCalloc.

public static NkTextEdit
calloc(MemoryStack
the stack from which to allocate
stack
)

Returns a new NkTextEdit instance allocated on the specified MemoryStack and initializes all its bits to zero.

public static NkTextEdit.Buffer
calloc(int
the buffer capacity
capacity
,
MemoryStack
the stack from which to allocate
stack
)

Returns a new NkTextEdit.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.

public static NkTextEdit
callocStack()

Deprecated
Deprecated for removal in 3.4.0.
public static NkTextEdit
callocStack(MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
public static NkTextEdit.Buffer
callocStack(int capacity)

Deprecated
Deprecated for removal in 3.4.0.
public static NkTextEdit.Buffer
callocStack(int capacity, MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
public NkClipboard

Returns:

a NkClipboard view of the clip field.
clip
()

protected NkTextEdit
create(long
the struct memory address
address
,
ByteBuffer
an optional container buffer, to be referenced strongly by the struct instance.
container
)

Implements abstract org.lwjgl.system.Struct.create.

Similar to the constructor, but returns the exact type of the Struct subclass.
public static NkTextEdit
create()

Returns a new NkTextEdit instance allocated with BufferUtils.

public static NkTextEdit
create(long address)

Returns a new NkTextEdit instance for the specified memory address.

public static NkTextEdit.Buffer
create(int
the buffer capacity
capacity
)

Returns a new NkTextEdit.Buffer instance allocated with BufferUtils.

public static NkTextEdit.Buffer
create(long
the memory address
address
,
int
the buffer capacity
capacity
)

Create a NkTextEdit.Buffer instance at the specified memory.

public static NkTextEdit
createSafe(long address)

Like create, but returns null if address is NULL.

public static NkTextEdit.Buffer
createSafe(long address, int capacity)

Like create, but returns null if address is NULL.

public int

Returns:

the value of the cursor field.
cursor
()

public boolean

Returns:

the value of the cursor_at_end_of_line field.
cursor_at_end_of_line
()

public NkPluginFilter

Returns:

the value of the filter field.
filter
()

public boolean

Returns:

the value of the has_preferred_x field.
has_preferred_x
()

public boolean

Returns:

the value of the initialized field.
initialized
()

public static NkTextEdit
malloc()

Returns a new NkTextEdit instance allocated with memAlloc.

public static NkTextEdit.Buffer
malloc(int
the buffer capacity
capacity
)

Returns a new NkTextEdit.Buffer instance allocated with memAlloc.

public static NkTextEdit
malloc(MemoryStack
the stack from which to allocate
stack
)

Returns a new NkTextEdit instance allocated on the specified MemoryStack.

public static NkTextEdit.Buffer
malloc(int
the buffer capacity
capacity
,
MemoryStack
the stack from which to allocate
stack
)

Returns a new NkTextEdit.Buffer instance allocated on the specified MemoryStack.

public static NkTextEdit
mallocStack()

Deprecated
Deprecated for removal in 3.4.0.
public static NkTextEdit
mallocStack(MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
public static NkTextEdit.Buffer
mallocStack(int capacity)

Deprecated
Deprecated for removal in 3.4.0.
public static NkTextEdit.Buffer
mallocStack(int capacity, MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
public byte

Returns:

the value of the mode field.
mode
()

public static boolean
nactive(long struct)

Unsafe version of active.

public static NkClipboard
nclip(long struct)

Unsafe version of clip.

public static int
ncursor(long struct)

Unsafe version of cursor.

public static boolean
ncursor_at_end_of_line(long struct)

Unsafe version of cursor_at_end_of_line.

public static NkPluginFilter
nfilter(long struct)

Unsafe version of filter.

public static boolean
nhas_preferred_x(long struct)

Unsafe version of has_preferred_x.

public static boolean
ninitialized(long struct)

Unsafe version of initialized.

public static byte
nmode(long struct)

Unsafe version of mode.

public static float
npreferred_x(long struct)

Unsafe version of preferred_x.

public static NkVec2
nscrollbar(long struct)

Unsafe version of scrollbar.

public static int
nselect_end(long struct)

Unsafe version of select_end.

public static int
nselect_start(long struct)

Unsafe version of select_start.

public static boolean
nsingle_line(long struct)

Unsafe version of single_line.

public static NkStr
nstring(long struct)

Unsafe version of string.

public static NkTextUndoState
nundo(long struct)

Unsafe version of undo.

public float

Returns:

the value of the preferred_x field.
preferred_x
()

public NkVec2

Returns:

a NkVec2 view of the scrollbar field.
scrollbar
()

public int

Returns:

the value of the select_end field.
select_end
()

public int

Returns:

the value of the select_start field.
select_start
()

public boolean

Returns:

the value of the single_line field.
single_line
()

public int
sizeof()

Implements abstract org.lwjgl.system.Struct.sizeof.

Returns sizeof(struct).
public NkStr

Returns:

a NkStr view of the string field.
string
()

public NkTextUndoState

Returns:

a NkTextUndoState view of the undo field.
undo
()

Inherited from org.lwjgl.system.Struct:
__array__array__array__checkContainer__checkMalloc__create__getContainer__getContainer__member__member__member__padding__padding__struct__struct__union__unionclearfreeisNullvalidate

Field Detail

ACTIVEback to summary
public static final int ACTIVE

The struct member offsets.

ALIGNOFback to summary
public static final int ALIGNOF

The struct alignment in bytes.

CLIPback to summary
public static final int CLIP

The struct member offsets.

CURSORback to summary
public static final int CURSOR

The struct member offsets.

CURSOR_AT_END_OF_LINEback to summary
public static final int CURSOR_AT_END_OF_LINE

The struct member offsets.

FILTERback to summary
public static final int FILTER

The struct member offsets.

HAS_PREFERRED_Xback to summary
public static final int HAS_PREFERRED_X

The struct member offsets.

INITIALIZEDback to summary
public static final int INITIALIZED

The struct member offsets.

MODEback to summary
public static final int MODE

The struct member offsets.

PREFERRED_Xback to summary
public static final int PREFERRED_X

The struct member offsets.

SCROLLBARback to summary
public static final int SCROLLBAR

The struct member offsets.

SELECT_ENDback to summary
public static final int SELECT_END

The struct member offsets.

SELECT_STARTback to summary
public static final int SELECT_START

The struct member offsets.

SINGLE_LINEback to summary
public static final int SINGLE_LINE

The struct member offsets.

SIZEOFback to summary
public static final int SIZEOF

The struct size in bytes.

STRINGback to summary
public static final int STRING

The struct member offsets.

UNDOback to summary
public static final int UNDO

The struct member offsets.

Constructor Detail

NkTextEditback to summary
protected NkTextEdit(long address, ByteBuffer container)
NkTextEditback to summary
public NkTextEdit(ByteBuffer container)

Creates a NkTextEdit instance at the current position of the specified ByteBuffer 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

activeback to summary
public boolean active()
Returns:boolean

the value of the active field.

Annotations
@NativeType:bool
callocback to summary
public static NkTextEdit calloc()

Returns a new NkTextEdit instance allocated with memCalloc. The instance must be explicitly freed.

callocback to summary
public static NkTextEdit.Buffer calloc(int capacity)

Returns a new NkTextEdit.Buffer instance allocated with memCalloc. The instance must be explicitly freed.

Parameters
capacity:int

the buffer capacity

callocback to summary
public static NkTextEdit calloc(MemoryStack stack)

Returns a new NkTextEdit instance allocated on the specified MemoryStack and initializes all its bits to zero.

Parameters
stack:MemoryStack

the stack from which to allocate

callocback to summary
public static NkTextEdit.Buffer calloc(int capacity, MemoryStack stack)

Returns a new NkTextEdit.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.

Parameters
capacity:int

the buffer capacity

stack:MemoryStack

the stack from which to allocate

callocStackback to summary
public static NkTextEdit callocStack()

Deprecated

Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.

Annotations
@Deprecated
callocStackback to summary
public static NkTextEdit callocStack(MemoryStack stack)

Deprecated

Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.

Annotations
@Deprecated
callocStackback to summary
public static NkTextEdit.Buffer callocStack(int capacity)

Deprecated

Deprecated for removal in 3.4.0. Use calloc(int, MemoryStack) instead.

Annotations
@Deprecated
callocStackback to summary
public static NkTextEdit.Buffer callocStack(int capacity, MemoryStack stack)

Deprecated

Deprecated for removal in 3.4.0. Use calloc(int, MemoryStack) instead.

Annotations
@Deprecated
clipback to summary
public NkClipboard clip()
Returns:NkClipboard

a NkClipboard view of the clip field.

Annotations
@NativeType:struct nk_clipboard
createback to summary
protected NkTextEdit create(long address, ByteBuffer container)

Implements abstract org.lwjgl.system.Struct.create.

Doc from org.lwjgl.system.Struct.create.

Similar to the constructor, but returns the exact type of the Struct subclass.

Effectively, every Struct instance is a factory for more instances of the same type. This is used by StructBuffer.

Parameters
address:long

the struct memory address

container:ByteBuffer

an optional container buffer, to be referenced strongly by the struct instance.

Annotations
@Override
createback to summary
public static NkTextEdit create()

Returns a new NkTextEdit instance allocated with BufferUtils.

createback to summary
public static NkTextEdit create(long address)

Returns a new NkTextEdit instance for the specified memory address.

createback to summary
public static NkTextEdit.Buffer create(int capacity)

Returns a new NkTextEdit.Buffer instance allocated with BufferUtils.

Parameters
capacity:int

the buffer capacity

createback to summary
public static NkTextEdit.Buffer create(long address, int capacity)

Create a NkTextEdit.Buffer instance at the specified memory.

Parameters
address:long

the memory address

capacity:int

the buffer capacity

createSafeback to summary
public static NkTextEdit createSafe(long address)

Like create, but returns null if address is NULL.

Annotations
@Nullable
createSafeback to summary
public static NkTextEdit.Buffer createSafe(long address, int capacity)

Like create, but returns null if address is NULL.

Annotations
@Nullable
cursorback to summary
public int cursor()
Returns:int

the value of the cursor field.

cursor_at_end_of_lineback to summary
public boolean cursor_at_end_of_line()
Returns:boolean

the value of the cursor_at_end_of_line field.

Annotations
@NativeType:bool
filterback to summary
public NkPluginFilter filter()
Returns:NkPluginFilter

the value of the filter field.

Annotations
@Nullable
@NativeType:nk_plugin_filter
has_preferred_xback to summary
public boolean has_preferred_x()
Returns:boolean

the value of the has_preferred_x field.

Annotations
@NativeType:bool
initializedback to summary
public boolean initialized()
Returns:boolean

the value of the initialized field.

Annotations
@NativeType:bool
mallocback to summary
public static NkTextEdit malloc()

Returns a new NkTextEdit instance allocated with memAlloc. The instance must be explicitly freed.

mallocback to summary
public static NkTextEdit.Buffer malloc(int capacity)

Returns a new NkTextEdit.Buffer instance allocated with memAlloc. The instance must be explicitly freed.

Parameters
capacity:int

the buffer capacity

mallocback to summary
public static NkTextEdit malloc(MemoryStack stack)

Returns a new NkTextEdit instance allocated on the specified MemoryStack.

Parameters
stack:MemoryStack

the stack from which to allocate

mallocback to summary
public static NkTextEdit.Buffer malloc(int capacity, MemoryStack stack)

Returns a new NkTextEdit.Buffer instance allocated on the specified MemoryStack.

Parameters
capacity:int

the buffer capacity

stack:MemoryStack

the stack from which to allocate

mallocStackback to summary
public static NkTextEdit mallocStack()

Deprecated

Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.

Annotations
@Deprecated
mallocStackback to summary
public static NkTextEdit mallocStack(MemoryStack stack)

Deprecated

Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.

Annotations
@Deprecated
mallocStackback to summary
public static NkTextEdit.Buffer mallocStack(int capacity)

Deprecated

Deprecated for removal in 3.4.0. Use malloc(int, MemoryStack) instead.

Annotations
@Deprecated
mallocStackback to summary
public static NkTextEdit.Buffer mallocStack(int capacity, MemoryStack stack)

Deprecated

Deprecated for removal in 3.4.0. Use malloc(int, MemoryStack) instead.

Annotations
@Deprecated
modeback to summary
public byte mode()
Returns:byte

the value of the mode field.

Annotations
@NativeType:unsigned char
nactiveback to summary
public static boolean nactive(long struct)

Unsafe version of active.

nclipback to summary
public static NkClipboard nclip(long struct)

Unsafe version of clip.

ncursorback to summary
public static int ncursor(long struct)

Unsafe version of cursor.

ncursor_at_end_of_lineback to summary
public static boolean ncursor_at_end_of_line(long struct)

Unsafe version of cursor_at_end_of_line.

nfilterback to summary
public static NkPluginFilter nfilter(long struct)

Unsafe version of filter.

Annotations
@Nullable
nhas_preferred_xback to summary
public static boolean nhas_preferred_x(long struct)

Unsafe version of has_preferred_x.

ninitializedback to summary
public static boolean ninitialized(long struct)

Unsafe version of initialized.

nmodeback to summary
public static byte nmode(long struct)

Unsafe version of mode.

npreferred_xback to summary
public static float npreferred_x(long struct)

Unsafe version of preferred_x.

nscrollbarback to summary
public static NkVec2 nscrollbar(long struct)

Unsafe version of scrollbar.

nselect_endback to summary
public static int nselect_end(long struct)

Unsafe version of select_end.

nselect_startback to summary
public static int nselect_start(long struct)

Unsafe version of select_start.

nsingle_lineback to summary
public static boolean nsingle_line(long struct)

Unsafe version of single_line.

nstringback to summary
public static NkStr nstring(long struct)

Unsafe version of string.

nundoback to summary
public static NkTextUndoState nundo(long struct)

Unsafe version of undo.

preferred_xback to summary
public float preferred_x()
Returns:float

the value of the preferred_x field.

scrollbarback to summary
public NkVec2 scrollbar()
Returns:NkVec2

a NkVec2 view of the scrollbar field.

Annotations
@NativeType:struct nk_vec2
select_endback to summary
public int select_end()
Returns:int

the value of the select_end field.

select_startback to summary
public int select_start()
Returns:int

the value of the select_start field.

single_lineback to summary
public boolean single_line()
Returns:boolean

the value of the single_line field.

Annotations
@NativeType:bool
sizeofback to summary
public int sizeof()

Implements abstract org.lwjgl.system.Struct.sizeof.

Doc from org.lwjgl.system.Struct.sizeof.

Returns sizeof(struct).

Annotations
@Override
stringback to summary
public NkStr string()
Returns:NkStr

a NkStr view of the string field.

Annotations
@NativeType:struct nk_str
undoback to summary
public NkTextUndoState undo()
Returns:NkTextUndoState

a NkTextUndoState view of the undo field.

Annotations
@NativeType:struct nk_text_undo_state
org.lwjgl.nuklear back to summary

public Class NkTextEdit.Buffer

extends StructBuffer<NkTextEdit, NkTextEdit.Buffer>
implements NativeResource
Class Inheritance
All Implemented Interfaces
org.lwjgl.system.NativeResource, java.lang.AutoCloseable

An array of NkTextEdit structs.

Field Summary

Modifier and TypeField and Description
private static final NkTextEdit

Constructor Summary

AccessConstructor and Description
public
Buffer(ByteBuffer container)

Creates a new NkTextEdit.Buffer instance backed by the specified container.

public
Buffer(long address, int cap)

pack-priv
Buffer(long address, ByteBuffer container, int mark, int pos, int lim, int cap)

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

the value of the active field.
active
()

public NkClipboard

Returns:

a NkClipboard view of the clip field.
clip
()

public int

Returns:

the value of the cursor field.
cursor
()

public boolean

Returns:

the value of the cursor_at_end_of_line field.
cursor_at_end_of_line
()

public NkPluginFilter

Returns:

the value of the filter field.
filter
()

protected NkTextEdit
public boolean

Returns:

the value of the has_preferred_x field.
has_preferred_x
()

public boolean

Returns:

the value of the initialized field.
initialized
()

public byte

Returns:

the value of the mode field.
mode
()

public float

Returns:

the value of the preferred_x field.
preferred_x
()

public NkVec2

Returns:

a NkVec2 view of the scrollbar field.
scrollbar
()

public int

Returns:

the value of the select_end field.
select_end
()

public int

Returns:

the value of the select_start field.
select_start
()

protected NkTextEdit.Buffer
public boolean

Returns:

the value of the single_line field.
single_line
()

public NkStr

Returns:

a NkStr view of the string field.
string
()

public NkTextUndoState

Returns:

a NkTextUndoState view of the undo field.
undo
()

Inherited from org.lwjgl.system.StructBuffer:
applyapplyforEachgetgetgetgetiteratorparallelStreamputputsizeofspliteratorstream

Field Detail

ELEMENT_FACTORYback to summary
private static final NkTextEdit ELEMENT_FACTORY

Constructor Detail

Bufferback to summary
public Buffer(ByteBuffer container)

Creates a new NkTextEdit.Buffer instance backed by the specified container.

Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided by NkTextEdit#SIZEOF, and its mark will be undefined.

The created buffer instance holds a strong reference to the container object.

Bufferback to summary
public Buffer(long address, int cap)
Bufferback to summary
pack-priv Buffer(long address, ByteBuffer container, int mark, int pos, int lim, int cap)

Method Detail

activeback to summary
public boolean active()
Returns:boolean

the value of the active field.

Annotations
@NativeType:bool
clipback to summary
public NkClipboard clip()
Returns:NkClipboard

a NkClipboard view of the clip field.

Annotations
@NativeType:struct nk_clipboard
cursorback to summary
public int cursor()
Returns:int

the value of the cursor field.

cursor_at_end_of_lineback to summary
public boolean cursor_at_end_of_line()
Returns:boolean

the value of the cursor_at_end_of_line field.

Annotations
@NativeType:bool
filterback to summary
public NkPluginFilter filter()
Returns:NkPluginFilter

the value of the filter field.

Annotations
@Nullable
@NativeType:nk_plugin_filter
getElementFactoryback to summary
protected NkTextEdit getElementFactory()

Implements abstract org.lwjgl.system.StructBuffer.getElementFactory.

Annotations
@Override
has_preferred_xback to summary
public boolean has_preferred_x()
Returns:boolean

the value of the has_preferred_x field.

Annotations
@NativeType:bool
initializedback to summary
public boolean initialized()
Returns:boolean

the value of the initialized field.

Annotations
@NativeType:bool
modeback to summary
public byte mode()
Returns:byte

the value of the mode field.

Annotations
@NativeType:unsigned char
preferred_xback to summary
public float preferred_x()
Returns:float

the value of the preferred_x field.

scrollbarback to summary
public NkVec2 scrollbar()
Returns:NkVec2

a NkVec2 view of the scrollbar field.

Annotations
@NativeType:struct nk_vec2
select_endback to summary
public int select_end()
Returns:int

the value of the select_end field.

select_startback to summary
public int select_start()
Returns:int

the value of the select_start field.

selfback to summary
protected NkTextEdit.Buffer self()

Implements abstract org.lwjgl.system.CustomBuffer.self.

Annotations
@Override
single_lineback to summary
public boolean single_line()
Returns:boolean

the value of the single_line field.

Annotations
@NativeType:bool
stringback to summary
public NkStr string()
Returns:NkStr

a NkStr view of the string field.

Annotations
@NativeType:struct nk_str
undoback to summary
public NkTextUndoState undo()
Returns:NkTextUndoState

a NkTextUndoState view of the undo field.

Annotations
@NativeType:struct nk_text_undo_state