Package org.lwjgl.nuklear
Class NkTextEdit
- All Implemented Interfaces:
AutoCloseable,NativeResource,Pointer
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 ClassesNested classes/interfaces inherited from class org.lwjgl.system.Struct
Struct.StructValidationNested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe struct member offsets.static final intThe struct alignment in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct size in bytes.static final intThe struct member offsets.static final intThe struct member offsets.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionNkTextEdit(ByteBuffer container) Creates aNkTextEditinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionbooleanactive()static NkTextEditcalloc()Returns a newNkTextEditinstance allocated withmemCalloc.static NkTextEdit.Buffercalloc(int capacity) Returns a newNkTextEdit.Bufferinstance allocated withmemCalloc.static NkTextEdit.Buffercalloc(int capacity, MemoryStack stack) Returns a newNkTextEdit.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static NkTextEditcalloc(MemoryStack stack) Returns a newNkTextEditinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.clip()static NkTextEditcreate()Returns a newNkTextEditinstance allocated withBufferUtils.static NkTextEdit.Buffercreate(int capacity) Returns a newNkTextEdit.Bufferinstance allocated withBufferUtils.static NkTextEditcreate(long address) Returns a newNkTextEditinstance for the specified memory address.static NkTextEdit.Buffercreate(long address, int capacity) Create aNkTextEdit.Bufferinstance at the specified memory.static @Nullable NkTextEditcreateSafe(long address) static @Nullable NkTextEdit.BuffercreateSafe(long address, int capacity) intcursor()boolean@Nullable NkPluginFilterfilter()booleanbooleanstatic NkTextEditmalloc()Returns a newNkTextEditinstance allocated withmemAlloc.static NkTextEdit.Buffermalloc(int capacity) Returns a newNkTextEdit.Bufferinstance allocated withmemAlloc.static NkTextEdit.Buffermalloc(int capacity, MemoryStack stack) Returns a newNkTextEdit.Bufferinstance allocated on the specifiedMemoryStack.static NkTextEditmalloc(MemoryStack stack) Returns a newNkTextEditinstance allocated on the specifiedMemoryStack.bytemode()static booleannactive(long struct) Unsafe version ofactive().static NkClipboardnclip(long struct) Unsafe version ofclip().static intncursor(long struct) Unsafe version ofcursor().static booleanncursor_at_end_of_line(long struct) Unsafe version ofcursor_at_end_of_line().static @Nullable NkPluginFilternfilter(long struct) Unsafe version offilter().static booleannhas_preferred_x(long struct) Unsafe version ofhas_preferred_x().static booleanninitialized(long struct) Unsafe version ofinitialized().static bytenmode(long struct) Unsafe version ofmode().static floatnpreferred_x(long struct) Unsafe version ofpreferred_x().static NkVec2nscrollbar(long struct) Unsafe version ofscrollbar().static intnselect_end(long struct) Unsafe version ofselect_end().static intnselect_start(long struct) Unsafe version ofselect_start().static booleannsingle_line(long struct) Unsafe version ofsingle_line().static NkStrnstring(long struct) Unsafe version ofstring().static NkTextUndoStatenundo(long struct) Unsafe version ofundo().floatintintbooleanintsizeof()Returnssizeof(struct).string()undo()Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toStringMethods inherited from interface org.lwjgl.system.NativeResource
close, free
-
Field Details
-
SIZEOF
public static final int SIZEOFThe struct size in bytes. -
ALIGNOF
public static final int ALIGNOFThe struct alignment in bytes. -
CLIP
public static final int CLIPThe struct member offsets. -
STRING
public static final int STRINGThe struct member offsets. -
FILTER
public static final int FILTERThe struct member offsets. -
SCROLLBAR
public static final int SCROLLBARThe struct member offsets. -
CURSOR
public static final int CURSORThe struct member offsets. -
SELECT_START
public static final int SELECT_STARTThe struct member offsets. -
SELECT_END
public static final int SELECT_ENDThe struct member offsets. -
MODE
public static final int MODEThe struct member offsets. -
CURSOR_AT_END_OF_LINE
public static final int CURSOR_AT_END_OF_LINEThe struct member offsets. -
INITIALIZED
public static final int INITIALIZEDThe struct member offsets. -
HAS_PREFERRED_X
public static final int HAS_PREFERRED_XThe struct member offsets. -
SINGLE_LINE
public static final int SINGLE_LINEThe struct member offsets. -
ACTIVE
public static final int ACTIVEThe struct member offsets. -
PREFERRED_X
public static final int PREFERRED_XThe struct member offsets. -
UNDO
public static final int UNDOThe struct member offsets.
-
-
Constructor Details
-
NkTextEdit
Creates aNkTextEditinstance at the current position of the specifiedByteBuffercontainer. 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 Details
-
sizeof
public int sizeof()Description copied from class:StructReturnssizeof(struct).- Specified by:
sizeofin classStruct<NkTextEdit>
-
clip
- Returns:
- a
NkClipboardview of theclipfield.
-
string
- Returns:
- a
NkStrview of thestringfield.
-
filter
- Returns:
- the value of the
filterfield.
-
scrollbar
- Returns:
- a
NkVec2view of thescrollbarfield.
-
cursor
public int cursor()- Returns:
- the value of the
cursorfield.
-
select_start
public int select_start()- Returns:
- the value of the
select_startfield.
-
select_end
public int select_end()- Returns:
- the value of the
select_endfield.
-
mode
public byte mode()- Returns:
- the value of the
modefield.
-
cursor_at_end_of_line
public boolean cursor_at_end_of_line()- Returns:
- the value of the
cursor_at_end_of_linefield.
-
initialized
public boolean initialized()- Returns:
- the value of the
initializedfield.
-
has_preferred_x
public boolean has_preferred_x()- Returns:
- the value of the
has_preferred_xfield.
-
single_line
public boolean single_line()- Returns:
- the value of the
single_linefield.
-
active
public boolean active()- Returns:
- the value of the
activefield.
-
preferred_x
public float preferred_x()- Returns:
- the value of the
preferred_xfield.
-
undo
- Returns:
- a
NkTextUndoStateview of theundofield.
-
malloc
Returns a newNkTextEditinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newNkTextEditinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newNkTextEditinstance allocated withBufferUtils. -
create
Returns a newNkTextEditinstance for the specified memory address. -
createSafe
-
malloc
Returns a newNkTextEdit.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newNkTextEdit.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newNkTextEdit.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aNkTextEdit.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
malloc
Returns a newNkTextEditinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newNkTextEditinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newNkTextEdit.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newNkTextEdit.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
nclip
Unsafe version ofclip(). -
nstring
Unsafe version ofstring(). -
nfilter
Unsafe version offilter(). -
nscrollbar
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
Unsafe version ofundo().
-