Package org.lwjgl.nuklear
Class NkStyleButton
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.nuklear.NkStyleButton
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class NkStyleButton extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceLayout
struct nk_style_button {struct nk_style_itemnormal;struct nk_style_itemhover;struct nk_style_itemactive;struct nk_colorborder_color;struct nk_colortext_background;struct nk_colortext_normal;struct nk_colortext_hover;struct nk_colortext_active; nk_flags text_alignment; float border; float rounding;struct nk_vec2padding;struct nk_vec2image_padding;struct nk_vec2touch_padding;nk_handleuserdata;nk_draw_begindraw_begin;nk_draw_enddraw_end; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classNkStyleButton.BufferAn array ofNkStyleButtonstructs.
-
Field Summary
Fields Modifier and Type Field Description static intACTIVEThe struct member offsets.static intALIGNOFThe struct alignment in bytes.static intBORDER
BORDER_COLOR
DRAW_BEGIN
DRAW_END
HOVER
IMAGE_PADDING
NORMAL
PADDING
ROUNDINGThe struct member offsets.static intSIZEOFThe struct size in bytes.static intTEXT_ACTIVE
TEXT_ALIGNMENT
TEXT_BACKGROUND
TEXT_HOVER
TEXT_NORMAL
TOUCH_PADDING
USERDATAThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description NkStyleButton(java.nio.ByteBuffer container)Creates aNkStyleButtoninstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description NkStyleItemactive()Returns aNkStyleItemview of theactivefield.NkStyleButtonactive(java.util.function.Consumer<NkStyleItem> consumer)Passes theactivefield to the specifiedConsumer.NkStyleButtonactive(NkStyleItem value)Copies the specifiedNkStyleItemto theactivefield.floatborder()Returns the value of theborderfield.NkStyleButtonborder(float value)Sets the specified value to theborderfield.NkColorborder_color()Returns aNkColorview of theborder_colorfield.NkStyleButtonborder_color(java.util.function.Consumer<NkColor> consumer)Passes theborder_colorfield to the specifiedConsumer.NkStyleButtonborder_color(NkColor value)Copies the specifiedNkColorto theborder_colorfield.static NkStyleButtoncalloc()Returns a newNkStyleButtoninstance allocated withmemCalloc.static NkStyleButton.Buffercalloc(int capacity)Returns a newNkStyleButton.Bufferinstance allocated withmemCalloc.static NkStyleButtoncallocStack()Returns a newNkStyleButtoninstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static NkStyleButton.BuffercallocStack(int capacity)Returns a newNkStyleButton.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static NkStyleButton.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newNkStyleButton.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static NkStyleButtoncallocStack(org.lwjgl.system.MemoryStack stack)Returns a newNkStyleButtoninstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static NkStyleButtoncreate()Returns a newNkStyleButtoninstance allocated withBufferUtils.static NkStyleButton.Buffercreate(int capacity)Returns a newNkStyleButton.Bufferinstance allocated withBufferUtils.static NkStyleButtoncreate(long address)Returns a newNkStyleButtoninstance for the specified memory address.static NkStyleButton.Buffercreate(long address, int capacity)Create aNkStyleButton.Bufferinstance at the specified memory.static NkStyleButtoncreateSafe(long address)static NkStyleButton.BuffercreateSafe(long address, int capacity)NkDrawBeginCallbackdraw_begin()Returns the value of thedraw_beginfield.NkStyleButtondraw_begin(NkDrawBeginCallbackI value)Sets the specified value to thedraw_beginfield.NkDrawEndCallbackdraw_end()Returns the value of thedraw_endfield.NkStyleButtondraw_end(NkDrawEndCallbackI value)Sets the specified value to thedraw_endfield.NkStyleItemhover()Returns aNkStyleItemview of thehoverfield.NkStyleButtonhover(java.util.function.Consumer<NkStyleItem> consumer)Passes thehoverfield to the specifiedConsumer.NkStyleButtonhover(NkStyleItem value)Copies the specifiedNkStyleItemto thehoverfield.NkVec2image_padding()Returns aNkVec2view of theimage_paddingfield.NkStyleButtonimage_padding(java.util.function.Consumer<NkVec2> consumer)Passes theimage_paddingfield to the specifiedConsumer.NkStyleButtonimage_padding(NkVec2 value)Copies the specifiedNkVec2to theimage_paddingfield.static NkStyleButtonmalloc()Returns a newNkStyleButtoninstance allocated withmemAlloc.static NkStyleButton.Buffermalloc(int capacity)Returns a newNkStyleButton.Bufferinstance allocated withmemAlloc.static NkStyleButtonmallocStack()Returns a newNkStyleButtoninstance allocated on the thread-localMemoryStack.static NkStyleButton.BuffermallocStack(int capacity)Returns a newNkStyleButton.Bufferinstance allocated on the thread-localMemoryStack.static NkStyleButton.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newNkStyleButton.Bufferinstance allocated on the specifiedMemoryStack.static NkStyleButtonmallocStack(org.lwjgl.system.MemoryStack stack)Returns a newNkStyleButtoninstance allocated on the specifiedMemoryStack.static NkStyleItemnactive(long struct)Unsafe version ofactive().static voidnactive(long struct, NkStyleItem value)Unsafe version ofactive.static floatnborder(long struct)Unsafe version ofborder().static voidnborder(long struct, float value)Unsafe version ofborder.static NkColornborder_color(long struct)Unsafe version ofborder_color().static voidnborder_color(long struct, NkColor value)Unsafe version ofborder_color.static NkDrawBeginCallbackndraw_begin(long struct)Unsafe version ofdraw_begin().static voidndraw_begin(long struct, NkDrawBeginCallbackI value)Unsafe version ofdraw_begin.static NkDrawEndCallbackndraw_end(long struct)Unsafe version ofdraw_end().static voidndraw_end(long struct, NkDrawEndCallbackI value)Unsafe version ofdraw_end.static NkStyleItemnhover(long struct)Unsafe version ofhover().static voidnhover(long struct, NkStyleItem value)Unsafe version ofhover.static NkVec2nimage_padding(long struct)Unsafe version ofimage_padding().static voidnimage_padding(long struct, NkVec2 value)Unsafe version ofimage_padding.static NkStyleItemnnormal(long struct)Unsafe version ofnormal().static voidnnormal(long struct, NkStyleItem value)Unsafe version ofnormal.NkStyleItemnormal()Returns aNkStyleItemview of thenormalfield.NkStyleButtonnormal(java.util.function.Consumer<NkStyleItem> consumer)Passes thenormalfield to the specifiedConsumer.NkStyleButtonnormal(NkStyleItem value)Copies the specifiedNkStyleItemto thenormalfield.static NkVec2npadding(long struct)Unsafe version ofpadding().static voidnpadding(long struct, NkVec2 value)Unsafe version ofpadding.static floatnrounding(long struct)Unsafe version ofrounding().static voidnrounding(long struct, float value)Unsafe version ofrounding.static NkColorntext_active(long struct)Unsafe version oftext_active().static voidntext_active(long struct, NkColor value)Unsafe version oftext_active.static intntext_alignment(long struct)Unsafe version oftext_alignment().static voidntext_alignment(long struct, int value)Unsafe version oftext_alignment.static NkColorntext_background(long struct)Unsafe version oftext_background().static voidntext_background(long struct, NkColor value)Unsafe version oftext_background.static NkColorntext_hover(long struct)Unsafe version oftext_hover().static voidntext_hover(long struct, NkColor value)Unsafe version oftext_hover.static NkColorntext_normal(long struct)Unsafe version oftext_normal().static voidntext_normal(long struct, NkColor value)Unsafe version oftext_normal.static NkVec2ntouch_padding(long struct)Unsafe version oftouch_padding().static voidntouch_padding(long struct, NkVec2 value)Unsafe version oftouch_padding.static NkHandlenuserdata(long struct)Unsafe version ofuserdata().static voidnuserdata(long struct, NkHandle value)Unsafe version ofuserdata.NkVec2padding()Returns aNkVec2view of thepaddingfield.NkStyleButtonpadding(java.util.function.Consumer<NkVec2> consumer)Passes thepaddingfield to the specifiedConsumer.NkStyleButtonpadding(NkVec2 value)Copies the specifiedNkVec2to thepaddingfield.floatrounding()Returns the value of theroundingfield.NkStyleButtonrounding(float value)Sets the specified value to theroundingfield.NkStyleButtonset(NkStyleButton src)Copies the specified struct data to this struct.NkStyleButtonset(NkStyleItem normal, NkStyleItem hover, NkStyleItem active, NkColor border_color, NkColor text_background, NkColor text_normal, NkColor text_hover, NkColor text_active, int text_alignment, float border, float rounding, NkVec2 padding, NkVec2 image_padding, NkVec2 touch_padding, NkHandle userdata, NkDrawBeginCallbackI draw_begin, NkDrawEndCallbackI draw_end)Initializes this struct with the specified values.intsizeof()NkColortext_active()Returns aNkColorview of thetext_activefield.NkStyleButtontext_active(java.util.function.Consumer<NkColor> consumer)Passes thetext_activefield to the specifiedConsumer.NkStyleButtontext_active(NkColor value)Copies the specifiedNkColorto thetext_activefield.inttext_alignment()Returns the value of thetext_alignmentfield.NkStyleButtontext_alignment(int value)Sets the specified value to thetext_alignmentfield.NkColortext_background()Returns aNkColorview of thetext_backgroundfield.NkStyleButtontext_background(java.util.function.Consumer<NkColor> consumer)Passes thetext_backgroundfield to the specifiedConsumer.NkStyleButtontext_background(NkColor value)Copies the specifiedNkColorto thetext_backgroundfield.NkColortext_hover()Returns aNkColorview of thetext_hoverfield.NkStyleButtontext_hover(java.util.function.Consumer<NkColor> consumer)Passes thetext_hoverfield to the specifiedConsumer.NkStyleButtontext_hover(NkColor value)Copies the specifiedNkColorto thetext_hoverfield.NkColortext_normal()Returns aNkColorview of thetext_normalfield.NkStyleButtontext_normal(java.util.function.Consumer<NkColor> consumer)Passes thetext_normalfield to the specifiedConsumer.NkStyleButtontext_normal(NkColor value)Copies the specifiedNkColorto thetext_normalfield.NkVec2touch_padding()Returns aNkVec2view of thetouch_paddingfield.NkStyleButtontouch_padding(java.util.function.Consumer<NkVec2> consumer)Passes thetouch_paddingfield to the specifiedConsumer.NkStyleButtontouch_padding(NkVec2 value)Copies the specifiedNkVec2to thetouch_paddingfield.NkHandleuserdata()Returns aNkHandleview of theuserdatafield.NkStyleButtonuserdata(java.util.function.Consumer<NkHandle> consumer)Passes theuserdatafield to the specifiedConsumer.NkStyleButtonuserdata(NkHandle value)Copies the specifiedNkHandleto theuserdatafield.
-
-
-
Field Detail
-
SIZEOF
The struct size in bytes.
-
ALIGNOF
The struct alignment in bytes.
-
NORMAL, HOVER, ACTIVE, BORDER_COLOR, TEXT_BACKGROUND, TEXT_NORMAL, TEXT_HOVER, TEXT_ACTIVE, TEXT_ALIGNMENT, BORDER, ROUNDING, PADDING, IMAGE_PADDING, TOUCH_PADDING, USERDATA, DRAW_BEGIN, DRAW_END
The struct member offsets.
-
-
Constructor Detail
-
NkStyleButton
public NkStyleButton(java.nio.ByteBuffer container)
Creates aNkStyleButtoninstance 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
-
normal
public NkStyleItem normal()
Returns aNkStyleItemview of thenormalfield.
-
normal
public NkStyleButton normal(java.util.function.Consumer<NkStyleItem> consumer)
Passes thenormalfield to the specifiedConsumer.
-
hover
public NkStyleItem hover()
Returns aNkStyleItemview of thehoverfield.
-
hover
public NkStyleButton hover(java.util.function.Consumer<NkStyleItem> consumer)
Passes thehoverfield to the specifiedConsumer.
-
active
public NkStyleItem active()
Returns aNkStyleItemview of theactivefield.
-
active
public NkStyleButton active(java.util.function.Consumer<NkStyleItem> consumer)
Passes theactivefield to the specifiedConsumer.
-
border_color
public NkStyleButton border_color(java.util.function.Consumer<NkColor> consumer)
Passes theborder_colorfield to the specifiedConsumer.
-
text_background
public NkColor text_background()
Returns aNkColorview of thetext_backgroundfield.
-
text_background
public NkStyleButton text_background(java.util.function.Consumer<NkColor> consumer)
Passes thetext_backgroundfield to the specifiedConsumer.
-
text_normal
public NkStyleButton text_normal(java.util.function.Consumer<NkColor> consumer)
Passes thetext_normalfield to the specifiedConsumer.
-
text_hover
public NkStyleButton text_hover(java.util.function.Consumer<NkColor> consumer)
Passes thetext_hoverfield to the specifiedConsumer.
-
text_active
public NkStyleButton text_active(java.util.function.Consumer<NkColor> consumer)
Passes thetext_activefield to the specifiedConsumer.
-
text_alignment
public int text_alignment()
Returns the value of thetext_alignmentfield.
-
border
public float border()
Returns the value of theborderfield.
-
rounding
public float rounding()
Returns the value of theroundingfield.
-
padding
public NkStyleButton padding(java.util.function.Consumer<NkVec2> consumer)
Passes thepaddingfield to the specifiedConsumer.
-
image_padding
public NkStyleButton image_padding(java.util.function.Consumer<NkVec2> consumer)
Passes theimage_paddingfield to the specifiedConsumer.
-
touch_padding
public NkStyleButton touch_padding(java.util.function.Consumer<NkVec2> consumer)
Passes thetouch_paddingfield to the specifiedConsumer.
-
userdata
public NkStyleButton userdata(java.util.function.Consumer<NkHandle> consumer)
Passes theuserdatafield to the specifiedConsumer.
-
draw_begin
@Nullable public NkDrawBeginCallback draw_begin()
Returns the value of thedraw_beginfield.
-
draw_end
@Nullable public NkDrawEndCallback draw_end()
Returns the value of thedraw_endfield.
-
normal
public NkStyleButton normal(NkStyleItem value)
Copies the specifiedNkStyleItemto thenormalfield.
-
hover
public NkStyleButton hover(NkStyleItem value)
Copies the specifiedNkStyleItemto thehoverfield.
-
active
public NkStyleButton active(NkStyleItem value)
Copies the specifiedNkStyleItemto theactivefield.
-
border_color
public NkStyleButton border_color(NkColor value)
Copies the specifiedNkColorto theborder_colorfield.
-
text_background
public NkStyleButton text_background(NkColor value)
Copies the specifiedNkColorto thetext_backgroundfield.
-
text_normal
public NkStyleButton text_normal(NkColor value)
Copies the specifiedNkColorto thetext_normalfield.
-
text_hover
public NkStyleButton text_hover(NkColor value)
Copies the specifiedNkColorto thetext_hoverfield.
-
text_active
public NkStyleButton text_active(NkColor value)
Copies the specifiedNkColorto thetext_activefield.
-
text_alignment
public NkStyleButton text_alignment(int value)
Sets the specified value to thetext_alignmentfield.
-
border
public NkStyleButton border(float value)
Sets the specified value to theborderfield.
-
rounding
public NkStyleButton rounding(float value)
Sets the specified value to theroundingfield.
-
padding
public NkStyleButton padding(NkVec2 value)
Copies the specifiedNkVec2to thepaddingfield.
-
image_padding
public NkStyleButton image_padding(NkVec2 value)
Copies the specifiedNkVec2to theimage_paddingfield.
-
touch_padding
public NkStyleButton touch_padding(NkVec2 value)
Copies the specifiedNkVec2to thetouch_paddingfield.
-
userdata
public NkStyleButton userdata(NkHandle value)
Copies the specifiedNkHandleto theuserdatafield.
-
draw_begin
public NkStyleButton draw_begin(@Nullable NkDrawBeginCallbackI value)
Sets the specified value to thedraw_beginfield.
-
draw_end
public NkStyleButton draw_end(@Nullable NkDrawEndCallbackI value)
Sets the specified value to thedraw_endfield.
-
set
public NkStyleButton set(NkStyleItem normal, NkStyleItem hover, NkStyleItem active, NkColor border_color, NkColor text_background, NkColor text_normal, NkColor text_hover, NkColor text_active, int text_alignment, float border, float rounding, NkVec2 padding, NkVec2 image_padding, NkVec2 touch_padding, NkHandle userdata, NkDrawBeginCallbackI draw_begin, NkDrawEndCallbackI draw_end)
Initializes this struct with the specified values.
-
set
public NkStyleButton set(NkStyleButton src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static NkStyleButton malloc()
Returns a newNkStyleButtoninstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static NkStyleButton calloc()
Returns a newNkStyleButtoninstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static NkStyleButton create()
Returns a newNkStyleButtoninstance allocated withBufferUtils.
-
create
public static NkStyleButton create(long address)
Returns a newNkStyleButtoninstance for the specified memory address.
-
createSafe
@Nullable public static NkStyleButton createSafe(long address)
-
malloc
public static NkStyleButton.Buffer malloc(int capacity)
Returns a newNkStyleButton.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static NkStyleButton.Buffer calloc(int capacity)
Returns a newNkStyleButton.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static NkStyleButton.Buffer create(int capacity)
Returns a newNkStyleButton.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static NkStyleButton.Buffer create(long address, int capacity)
Create aNkStyleButton.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static NkStyleButton.Buffer createSafe(long address, int capacity)
-
mallocStack
public static NkStyleButton mallocStack()
Returns a newNkStyleButtoninstance allocated on the thread-localMemoryStack.
-
callocStack
public static NkStyleButton callocStack()
Returns a newNkStyleButtoninstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static NkStyleButton mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newNkStyleButtoninstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static NkStyleButton callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newNkStyleButtoninstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
mallocStack
public static NkStyleButton.Buffer mallocStack(int capacity)
Returns a newNkStyleButton.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static NkStyleButton.Buffer callocStack(int capacity)
Returns a newNkStyleButton.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacity
-
mallocStack
public static NkStyleButton.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newNkStyleButton.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
callocStack
public static NkStyleButton.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newNkStyleButton.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
nnormal
public static NkStyleItem nnormal(long struct)
Unsafe version ofnormal().
-
nhover
public static NkStyleItem nhover(long struct)
Unsafe version ofhover().
-
nactive
public static NkStyleItem nactive(long struct)
Unsafe version ofactive().
-
nborder_color
public static NkColor nborder_color(long struct)
Unsafe version ofborder_color().
-
ntext_background
public static NkColor ntext_background(long struct)
Unsafe version oftext_background().
-
ntext_normal
public static NkColor ntext_normal(long struct)
Unsafe version oftext_normal().
-
ntext_hover
public static NkColor ntext_hover(long struct)
Unsafe version oftext_hover().
-
ntext_active
public static NkColor ntext_active(long struct)
Unsafe version oftext_active().
-
ntext_alignment
public static int ntext_alignment(long struct)
Unsafe version oftext_alignment().
-
nborder
public static float nborder(long struct)
Unsafe version ofborder().
-
nrounding
public static float nrounding(long struct)
Unsafe version ofrounding().
-
nimage_padding
public static NkVec2 nimage_padding(long struct)
Unsafe version ofimage_padding().
-
ntouch_padding
public static NkVec2 ntouch_padding(long struct)
Unsafe version oftouch_padding().
-
nuserdata
public static NkHandle nuserdata(long struct)
Unsafe version ofuserdata().
-
ndraw_begin
@Nullable public static NkDrawBeginCallback ndraw_begin(long struct)
Unsafe version ofdraw_begin().
-
ndraw_end
@Nullable public static NkDrawEndCallback ndraw_end(long struct)
Unsafe version ofdraw_end().
-
nnormal
public static void nnormal(long struct, NkStyleItem value)Unsafe version ofnormal.
-
nhover
public static void nhover(long struct, NkStyleItem value)Unsafe version ofhover.
-
nactive
public static void nactive(long struct, NkStyleItem value)Unsafe version ofactive.
-
nborder_color
public static void nborder_color(long struct, NkColor value)Unsafe version ofborder_color.
-
ntext_background
public static void ntext_background(long struct, NkColor value)Unsafe version oftext_background.
-
ntext_normal
public static void ntext_normal(long struct, NkColor value)Unsafe version oftext_normal.
-
ntext_hover
public static void ntext_hover(long struct, NkColor value)Unsafe version oftext_hover.
-
ntext_active
public static void ntext_active(long struct, NkColor value)Unsafe version oftext_active.
-
ntext_alignment
public static void ntext_alignment(long struct, int value)Unsafe version oftext_alignment.
-
nborder
public static void nborder(long struct, float value)Unsafe version ofborder.
-
nrounding
public static void nrounding(long struct, float value)Unsafe version ofrounding.
-
nimage_padding
public static void nimage_padding(long struct, NkVec2 value)Unsafe version ofimage_padding.
-
ntouch_padding
public static void ntouch_padding(long struct, NkVec2 value)Unsafe version oftouch_padding.
-
ndraw_begin
public static void ndraw_begin(long struct, @Nullable NkDrawBeginCallbackI value)Unsafe version ofdraw_begin.
-
ndraw_end
public static void ndraw_end(long struct, @Nullable NkDrawEndCallbackI value)Unsafe version ofdraw_end.
-
-