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.NativeResourceLayout
struct nk_style_text {struct nk_colorcolor;struct nk_vec2padding; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classNkStyleText.BufferAn array ofNkStyleTextstructs.
-
Constructor Summary
Constructors Constructor Description NkStyleText(java.nio.ByteBuffer container)Creates aNkStyleTextinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static NkStyleTextcalloc()Returns a newNkStyleTextinstance allocated withmemCalloc.static NkStyleText.Buffercalloc(int capacity)Returns a newNkStyleText.Bufferinstance allocated withmemCalloc.static NkStyleTextcallocStack()Returns a newNkStyleTextinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static NkStyleText.BuffercallocStack(int capacity)Returns a newNkStyleText.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static NkStyleText.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newNkStyleText.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static NkStyleTextcallocStack(org.lwjgl.system.MemoryStack stack)Returns a newNkStyleTextinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.NkColorcolor()Returns aNkColorview of thecolorfield.NkStyleTextcolor(java.util.function.Consumer<NkColor> consumer)Passes thecolorfield to the specifiedConsumer.NkStyleTextcolor(NkColor value)Copies the specifiedNkColorto thecolorfield.static NkStyleTextcreate()Returns a newNkStyleTextinstance allocated withBufferUtils.static NkStyleText.Buffercreate(int capacity)Returns a newNkStyleText.Bufferinstance allocated withBufferUtils.static NkStyleTextcreate(long address)Returns a newNkStyleTextinstance for the specified memory address.static NkStyleText.Buffercreate(long address, int capacity)Create aNkStyleText.Bufferinstance at the specified memory.static NkStyleTextcreateSafe(long address)static NkStyleText.BuffercreateSafe(long address, int capacity)static NkStyleTextmalloc()Returns a newNkStyleTextinstance allocated withmemAlloc.static NkStyleText.Buffermalloc(int capacity)Returns a newNkStyleText.Bufferinstance allocated withmemAlloc.static NkStyleTextmallocStack()Returns a newNkStyleTextinstance allocated on the thread-localMemoryStack.static NkStyleText.BuffermallocStack(int capacity)Returns a newNkStyleText.Bufferinstance allocated on the thread-localMemoryStack.static NkStyleText.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newNkStyleText.Bufferinstance allocated on the specifiedMemoryStack.static NkStyleTextmallocStack(org.lwjgl.system.MemoryStack stack)Returns a newNkStyleTextinstance allocated on the specifiedMemoryStack.static NkColorncolor(long struct)Unsafe version ofcolor().static voidncolor(long struct, NkColor value)Unsafe version ofcolor.static NkVec2npadding(long struct)Unsafe version ofpadding().static voidnpadding(long struct, NkVec2 value)Unsafe version ofpadding.NkVec2padding()Returns aNkVec2view of thepaddingfield.NkStyleTextpadding(java.util.function.Consumer<NkVec2> consumer)Passes thepaddingfield to the specifiedConsumer.NkStyleTextpadding(NkVec2 value)Copies the specifiedNkVec2to thepaddingfield.NkStyleTextset(NkColor color, NkVec2 padding)Initializes this struct with the specified values.NkStyleTextset(NkStyleText src)Copies the specified struct data to this struct.intsizeof()
-
-
-
Constructor Detail
-
NkStyleText
public NkStyleText(java.nio.ByteBuffer container)
Creates aNkStyleTextinstance 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 Detail
-
sizeof
public int sizeof()
- Specified by:
sizeofin classorg.lwjgl.system.Struct
-
color
public NkStyleText color(java.util.function.Consumer<NkColor> consumer)
Passes thecolorfield to the specifiedConsumer.
-
padding
public NkStyleText padding(java.util.function.Consumer<NkVec2> consumer)
Passes thepaddingfield to the specifiedConsumer.
-
color
public NkStyleText color(NkColor value)
Copies the specifiedNkColorto thecolorfield.
-
padding
public NkStyleText padding(NkVec2 value)
Copies the specifiedNkVec2to thepaddingfield.
-
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 newNkStyleTextinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static NkStyleText calloc()
Returns a newNkStyleTextinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static NkStyleText create()
Returns a newNkStyleTextinstance allocated withBufferUtils.
-
create
public static NkStyleText create(long address)
Returns a newNkStyleTextinstance for the specified memory address.
-
createSafe
@Nullable public static NkStyleText createSafe(long address)
-
malloc
public static NkStyleText.Buffer malloc(int capacity)
Returns a newNkStyleText.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static NkStyleText.Buffer calloc(int capacity)
Returns a newNkStyleText.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static NkStyleText.Buffer create(int capacity)
Returns a newNkStyleText.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static NkStyleText.Buffer create(long address, int capacity)
Create aNkStyleText.Bufferinstance 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 newNkStyleTextinstance allocated on the thread-localMemoryStack.
-
callocStack
public static NkStyleText callocStack()
Returns a newNkStyleTextinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static NkStyleText mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newNkStyleTextinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static NkStyleText callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newNkStyleTextinstance allocated on the specifiedMemoryStackand 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.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static NkStyleText.Buffer callocStack(int capacity)
Returns a newNkStyleText.Bufferinstance allocated on the thread-localMemoryStackand 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.Bufferinstance 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.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
-