Package org.lwjgl.nuklear
Class NkUserFont
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.nuklear.NkUserFont
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class NkUserFont extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceLayout
struct nk_user_font {nk_handleuserdata(); floatheight();nk_text_width_fwidth();nk_query_font_glyph_fquery();nk_handletexture(); }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classNkUserFont.BufferAn array ofNkUserFontstructs.
-
Constructor Summary
Constructors Constructor Description NkUserFont(java.nio.ByteBuffer container)Creates aNkUserFontinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static NkUserFontcalloc()Returns a newNkUserFontinstance allocated withmemCalloc.static NkUserFont.Buffercalloc(int capacity)Returns a newNkUserFont.Bufferinstance allocated withmemCalloc.static NkUserFont.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newNkUserFont.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static NkUserFontcalloc(org.lwjgl.system.MemoryStack stack)Returns a newNkUserFontinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static NkUserFontcallocStack()Deprecated.static NkUserFont.BuffercallocStack(int capacity)Deprecated.static NkUserFont.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static NkUserFontcallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.static NkUserFontcreate()Returns a newNkUserFontinstance allocated withBufferUtils.static NkUserFont.Buffercreate(int capacity)Returns a newNkUserFont.Bufferinstance allocated withBufferUtils.static NkUserFontcreate(long address)Returns a newNkUserFontinstance for the specified memory address.static NkUserFont.Buffercreate(long address, int capacity)Create aNkUserFont.Bufferinstance at the specified memory.static NkUserFontcreateSafe(long address)static NkUserFont.BuffercreateSafe(long address, int capacity)floatheight()max height of the fontNkUserFontheight(float value)Sets the specified value to theheight()field.static NkUserFontmalloc()Returns a newNkUserFontinstance allocated withmemAlloc.static NkUserFont.Buffermalloc(int capacity)Returns a newNkUserFont.Bufferinstance allocated withmemAlloc.static NkUserFont.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newNkUserFont.Bufferinstance allocated on the specifiedMemoryStack.static NkUserFontmalloc(org.lwjgl.system.MemoryStack stack)Returns a newNkUserFontinstance allocated on the specifiedMemoryStack.static NkUserFontmallocStack()Deprecated.static NkUserFont.BuffermallocStack(int capacity)Deprecated.static NkUserFont.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static NkUserFontmallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.static floatnheight(long struct)Unsafe version ofheight().static voidnheight(long struct, float value)Unsafe version ofheight.static NkQueryFontGlyphCallbacknquery(long struct)Unsafe version ofquery().static voidnquery(long struct, NkQueryFontGlyphCallbackI value)Unsafe version ofquery.static NkHandlentexture(long struct)Unsafe version oftexture().static voidntexture(long struct, NkHandle value)Unsafe version oftexture.static NkHandlenuserdata(long struct)Unsafe version ofuserdata().static voidnuserdata(long struct, NkHandle value)Unsafe version ofuserdata.static NkTextWidthCallbacknwidth(long struct)Unsafe version ofwidth().static voidnwidth(long struct, NkTextWidthCallbackI value)Unsafe version ofwidth.NkQueryFontGlyphCallbackquery()font glyph callback to query drawing infoNkUserFontquery(NkQueryFontGlyphCallbackI value)Sets the specified value to thequery()field.NkUserFontset(NkHandle userdata, float height, NkTextWidthCallbackI width, NkQueryFontGlyphCallbackI query, NkHandle texture)Initializes this struct with the specified values.NkUserFontset(NkUserFont src)Copies the specified struct data to this struct.intsizeof()NkHandletexture()texture handle to the used font atlas or textureNkUserFonttexture(java.util.function.Consumer<NkHandle> consumer)Passes thetexture()field to the specifiedConsumer.NkUserFonttexture(NkHandle value)NkHandleuserdata()user provided font handleNkUserFontuserdata(java.util.function.Consumer<NkHandle> consumer)Passes theuserdata()field to the specifiedConsumer.NkUserFontuserdata(NkHandle value)Copies the specifiedNkHandleto theuserdata()field.NkTextWidthCallbackwidth()font string width in pixel callbackNkUserFontwidth(NkTextWidthCallbackI value)Sets the specified value to thewidth()field.
-
-
-
Constructor Detail
-
NkUserFont
public NkUserFont(java.nio.ByteBuffer container)
Creates aNkUserFontinstance 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
-
userdata
public NkHandle userdata()
user provided font handle
-
height
public float height()
max height of the font
-
width
@Nullable public NkTextWidthCallback width()
font string width in pixel callback
-
query
@Nullable public NkQueryFontGlyphCallback query()
font glyph callback to query drawing info
-
texture
public NkHandle texture()
texture handle to the used font atlas or texture
-
userdata
public NkUserFont userdata(NkHandle value)
Copies the specifiedNkHandleto theuserdata()field.
-
userdata
public NkUserFont userdata(java.util.function.Consumer<NkHandle> consumer)
Passes theuserdata()field to the specifiedConsumer.
-
height
public NkUserFont height(float value)
Sets the specified value to theheight()field.
-
width
public NkUserFont width(@Nullable NkTextWidthCallbackI value)
Sets the specified value to thewidth()field.
-
query
public NkUserFont query(@Nullable NkQueryFontGlyphCallbackI value)
Sets the specified value to thequery()field.
-
texture
public NkUserFont texture(NkHandle value)
-
texture
public NkUserFont texture(java.util.function.Consumer<NkHandle> consumer)
Passes thetexture()field to the specifiedConsumer.
-
set
public NkUserFont set(NkHandle userdata, float height, NkTextWidthCallbackI width, NkQueryFontGlyphCallbackI query, NkHandle texture)
Initializes this struct with the specified values.
-
set
public NkUserFont set(NkUserFont src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static NkUserFont malloc()
Returns a newNkUserFontinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static NkUserFont calloc()
Returns a newNkUserFontinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static NkUserFont create()
Returns a newNkUserFontinstance allocated withBufferUtils.
-
create
public static NkUserFont create(long address)
Returns a newNkUserFontinstance for the specified memory address.
-
createSafe
@Nullable public static NkUserFont createSafe(long address)
-
malloc
public static NkUserFont.Buffer malloc(int capacity)
Returns a newNkUserFont.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static NkUserFont.Buffer calloc(int capacity)
Returns a newNkUserFont.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static NkUserFont.Buffer create(int capacity)
Returns a newNkUserFont.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static NkUserFont.Buffer create(long address, int capacity)
Create aNkUserFont.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static NkUserFont.Buffer createSafe(long address, int capacity)
-
mallocStack
@Deprecated public static NkUserFont mallocStack()
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static NkUserFont callocStack()
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static NkUserFont mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static NkUserFont callocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static NkUserFont.Buffer mallocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static NkUserFont.Buffer callocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
mallocStack
@Deprecated public static NkUserFont.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static NkUserFont.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
malloc
public static NkUserFont malloc(org.lwjgl.system.MemoryStack stack)
Returns a newNkUserFontinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static NkUserFont calloc(org.lwjgl.system.MemoryStack stack)
Returns a newNkUserFontinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static NkUserFont.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newNkUserFont.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static NkUserFont.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newNkUserFont.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
nuserdata
public static NkHandle nuserdata(long struct)
Unsafe version ofuserdata().
-
nheight
public static float nheight(long struct)
Unsafe version ofheight().
-
nwidth
@Nullable public static NkTextWidthCallback nwidth(long struct)
Unsafe version ofwidth().
-
nquery
@Nullable public static NkQueryFontGlyphCallback nquery(long struct)
Unsafe version ofquery().
-
nheight
public static void nheight(long struct, float value)Unsafe version ofheight.
-
nwidth
public static void nwidth(long struct, @Nullable NkTextWidthCallbackI value)Unsafe version ofwidth.
-
nquery
public static void nquery(long struct, @Nullable NkQueryFontGlyphCallbackI value)Unsafe version ofquery.
-
-