Package org.lwjgl.nuklear
Class NkStyleText
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.nuklear.NkStyleText
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,org.lwjgl.system.NativeResource
,org.lwjgl.system.Pointer
public class NkStyleText extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResource
Layout
struct nk_style_text {
struct nk_color
color;struct nk_vec2
padding; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
NkStyleText.Buffer
An array ofNkStyleText
structs.
-
Constructor Summary
Constructors Constructor Description NkStyleText(java.nio.ByteBuffer container)
Creates aNkStyleText
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static NkStyleText
calloc()
Returns a newNkStyleText
instance allocated withmemCalloc
.static NkStyleText.Buffer
calloc(int capacity)
Returns a newNkStyleText.Buffer
instance allocated withmemCalloc
.static NkStyleText
callocStack()
Returns a newNkStyleText
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static NkStyleText.Buffer
callocStack(int capacity)
Returns a newNkStyleText.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static NkStyleText.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newNkStyleText.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static NkStyleText
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newNkStyleText
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.NkColor
color()
Returns aNkColor
view of thecolor
field.NkStyleText
color(java.util.function.Consumer<NkColor> consumer)
Passes thecolor
field to the specifiedConsumer
.NkStyleText
color(NkColor value)
Copies the specifiedNkColor
to thecolor
field.static NkStyleText
create()
Returns a newNkStyleText
instance allocated withBufferUtils
.static NkStyleText.Buffer
create(int capacity)
Returns a newNkStyleText.Buffer
instance allocated withBufferUtils
.static NkStyleText
create(long address)
Returns a newNkStyleText
instance for the specified memory address.static NkStyleText.Buffer
create(long address, int capacity)
Create aNkStyleText.Buffer
instance at the specified memory.static NkStyleText
createSafe(long address)
static NkStyleText.Buffer
createSafe(long address, int capacity)
static NkStyleText
malloc()
Returns a newNkStyleText
instance allocated withmemAlloc
.static NkStyleText.Buffer
malloc(int capacity)
Returns a newNkStyleText.Buffer
instance allocated withmemAlloc
.static NkStyleText
mallocStack()
Returns a newNkStyleText
instance allocated on the thread-localMemoryStack
.static NkStyleText.Buffer
mallocStack(int capacity)
Returns a newNkStyleText.Buffer
instance allocated on the thread-localMemoryStack
.static NkStyleText.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newNkStyleText.Buffer
instance allocated on the specifiedMemoryStack
.static NkStyleText
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newNkStyleText
instance allocated on the specifiedMemoryStack
.static NkColor
ncolor(long struct)
Unsafe version ofcolor()
.static void
ncolor(long struct, NkColor value)
Unsafe version ofcolor
.static NkVec2
npadding(long struct)
Unsafe version ofpadding()
.static void
npadding(long struct, NkVec2 value)
Unsafe version ofpadding
.NkVec2
padding()
Returns aNkVec2
view of thepadding
field.NkStyleText
padding(java.util.function.Consumer<NkVec2> consumer)
Passes thepadding
field to the specifiedConsumer
.NkStyleText
padding(NkVec2 value)
Copies the specifiedNkVec2
to thepadding
field.NkStyleText
set(NkColor color, NkVec2 padding)
Initializes this struct with the specified values.NkStyleText
set(NkStyleText src)
Copies the specified struct data to this struct.int
sizeof()
-
-
-
Constructor Detail
-
NkStyleText
public NkStyleText(java.nio.ByteBuffer container)
Creates aNkStyleText
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
-
color
public NkStyleText color(NkColor value)
Copies the specifiedNkColor
to thecolor
field.
-
color
public NkStyleText color(java.util.function.Consumer<NkColor> consumer)
Passes thecolor
field to the specifiedConsumer
.
-
padding
public NkStyleText padding(NkVec2 value)
Copies the specifiedNkVec2
to thepadding
field.
-
padding
public NkStyleText padding(java.util.function.Consumer<NkVec2> consumer)
Passes thepadding
field to the specifiedConsumer
.
-
set
public NkStyleText set(NkColor color, NkVec2 padding)
Initializes this struct with the specified values.
-
set
public NkStyleText set(NkStyleText src)
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
public static NkStyleText malloc()
Returns a newNkStyleText
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static NkStyleText calloc()
Returns a newNkStyleText
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static NkStyleText create()
Returns a newNkStyleText
instance allocated withBufferUtils
.
-
create
public static NkStyleText create(long address)
Returns a newNkStyleText
instance for the specified memory address.
-
createSafe
@Nullable public static NkStyleText createSafe(long address)
-
malloc
public static NkStyleText.Buffer malloc(int capacity)
Returns a newNkStyleText.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static NkStyleText.Buffer calloc(int capacity)
Returns a newNkStyleText.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static NkStyleText.Buffer create(int capacity)
Returns a newNkStyleText.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static NkStyleText.Buffer create(long address, int capacity)
Create aNkStyleText.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static NkStyleText.Buffer createSafe(long address, int capacity)
-
mallocStack
public static NkStyleText mallocStack()
Returns a newNkStyleText
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static NkStyleText callocStack()
Returns a newNkStyleText
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static NkStyleText mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newNkStyleText
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static NkStyleText callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newNkStyleText
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static NkStyleText.Buffer mallocStack(int capacity)
Returns a newNkStyleText.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static NkStyleText.Buffer callocStack(int capacity)
Returns a newNkStyleText.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static NkStyleText.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newNkStyleText.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static NkStyleText.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newNkStyleText.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
-