public class NkStyleButton
extends org.lwjgl.system.Struct
implements org.lwjgl.system.NativeResource
struct nk_style_button {
struct nk_style_item normal;
struct nk_style_item hover;
struct nk_style_item active;
struct nk_color border_color;
struct nk_color text_background;
struct nk_color text_normal;
struct nk_color text_hover;
struct nk_color text_active;
nk_flags text_alignment;
float border;
float rounding;
struct nk_vec2 padding;
struct nk_vec2 image_padding;
struct nk_vec2 touch_padding;
nk_handle userdata;
nk_draw_begin draw_begin;
nk_draw_end draw_end;
}| Modifier and Type | Class and Description |
|---|---|
static class |
NkStyleButton.Buffer
An array of
NkStyleButton structs. |
| Modifier and Type | Field and Description |
|---|---|
static int |
ACTIVE
The struct member offsets.
|
static int |
ALIGNOF
The struct alignment in bytes.
|
static int |
BORDER
The struct member offsets.
|
static int |
BORDER_COLOR
The struct member offsets.
|
static int |
DRAW_BEGIN
The struct member offsets.
|
static int |
DRAW_END
The struct member offsets.
|
static int |
HOVER
The struct member offsets.
|
static int |
IMAGE_PADDING
The struct member offsets.
|
static int |
NORMAL
The struct member offsets.
|
static int |
PADDING
The struct member offsets.
|
static int |
ROUNDING
The struct member offsets.
|
static int |
SIZEOF
The struct size in bytes.
|
static int |
TEXT_ACTIVE
The struct member offsets.
|
static int |
TEXT_ALIGNMENT
The struct member offsets.
|
static int |
TEXT_BACKGROUND
The struct member offsets.
|
static int |
TEXT_HOVER
The struct member offsets.
|
static int |
TEXT_NORMAL
The struct member offsets.
|
static int |
TOUCH_PADDING
The struct member offsets.
|
static int |
USERDATA
The struct member offsets.
|
| Constructor and Description |
|---|
NkStyleButton(java.nio.ByteBuffer container)
Creates a
NkStyleButton instance at the current position of the specified ByteBuffer container. |
| Modifier and Type | Method and Description |
|---|---|
NkStyleItem |
active()
Returns a
NkStyleItem view of the active field. |
NkStyleButton |
active(java.util.function.Consumer<NkStyleItem> consumer)
Passes the
active field to the specified Consumer. |
NkStyleButton |
active(NkStyleItem value)
Copies the specified
NkStyleItem to the active field. |
NkColor |
border_color()
Returns a
NkColor view of the border_color field. |
NkStyleButton |
border_color(java.util.function.Consumer<NkColor> consumer)
Passes the
border_color field to the specified Consumer. |
NkStyleButton |
border_color(NkColor value)
Copies the specified
NkColor to the border_color field. |
float |
border()
Returns the value of the
border field. |
NkStyleButton |
border(float value)
Sets the specified value to the
border field. |
static NkStyleButton |
calloc()
Returns a new
NkStyleButton instance allocated with memCalloc. |
static NkStyleButton.Buffer |
calloc(int capacity)
Returns a new
NkStyleButton.Buffer instance allocated with memCalloc. |
static NkStyleButton |
callocStack()
Returns a new
NkStyleButton instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static NkStyleButton.Buffer |
callocStack(int capacity)
Returns a new
NkStyleButton.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static NkStyleButton.Buffer |
callocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
NkStyleButton.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static NkStyleButton |
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
NkStyleButton instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static NkStyleButton |
create()
Returns a new
NkStyleButton instance allocated with BufferUtils. |
static NkStyleButton.Buffer |
create(int capacity)
Returns a new
NkStyleButton.Buffer instance allocated with BufferUtils. |
static NkStyleButton |
create(long address)
Returns a new
NkStyleButton instance for the specified memory address. |
static NkStyleButton.Buffer |
create(long address,
int capacity)
Create a
NkStyleButton.Buffer instance at the specified memory. |
static NkStyleButton |
createSafe(long address)
|
static NkStyleButton.Buffer |
createSafe(long address,
int capacity)
|
NkDrawBeginCallback |
draw_begin()
Returns the value of the
draw_begin field. |
NkStyleButton |
draw_begin(NkDrawBeginCallbackI value)
Sets the specified value to the
draw_begin field. |
NkDrawEndCallback |
draw_end()
Returns the value of the
draw_end field. |
NkStyleButton |
draw_end(NkDrawEndCallbackI value)
Sets the specified value to the
draw_end field. |
NkStyleItem |
hover()
Returns a
NkStyleItem view of the hover field. |
NkStyleButton |
hover(java.util.function.Consumer<NkStyleItem> consumer)
Passes the
hover field to the specified Consumer. |
NkStyleButton |
hover(NkStyleItem value)
Copies the specified
NkStyleItem to the hover field. |
NkVec2 |
image_padding()
Returns a
NkVec2 view of the image_padding field. |
NkStyleButton |
image_padding(java.util.function.Consumer<NkVec2> consumer)
Passes the
image_padding field to the specified Consumer. |
NkStyleButton |
image_padding(NkVec2 value)
Copies the specified
NkVec2 to the image_padding field. |
static NkStyleButton |
malloc()
Returns a new
NkStyleButton instance allocated with memAlloc. |
static NkStyleButton.Buffer |
malloc(int capacity)
Returns a new
NkStyleButton.Buffer instance allocated with memAlloc. |
static NkStyleButton |
mallocStack()
Returns a new
NkStyleButton instance allocated on the thread-local MemoryStack. |
static NkStyleButton.Buffer |
mallocStack(int capacity)
Returns a new
NkStyleButton.Buffer instance allocated on the thread-local MemoryStack. |
static NkStyleButton.Buffer |
mallocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
NkStyleButton.Buffer instance allocated on the specified MemoryStack. |
static NkStyleButton |
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
NkStyleButton instance allocated on the specified MemoryStack. |
static NkStyleItem |
nactive(long struct)
Unsafe version of
active(). |
static void |
nactive(long struct,
NkStyleItem value)
Unsafe version of
active. |
static NkColor |
nborder_color(long struct)
Unsafe version of
border_color(). |
static void |
nborder_color(long struct,
NkColor value)
Unsafe version of
border_color. |
static float |
nborder(long struct)
Unsafe version of
border(). |
static void |
nborder(long struct,
float value)
Unsafe version of
border. |
static NkDrawBeginCallback |
ndraw_begin(long struct)
Unsafe version of
draw_begin(). |
static void |
ndraw_begin(long struct,
NkDrawBeginCallbackI value)
Unsafe version of
draw_begin. |
static NkDrawEndCallback |
ndraw_end(long struct)
Unsafe version of
draw_end(). |
static void |
ndraw_end(long struct,
NkDrawEndCallbackI value)
Unsafe version of
draw_end. |
static NkStyleItem |
nhover(long struct)
Unsafe version of
hover(). |
static void |
nhover(long struct,
NkStyleItem value)
Unsafe version of
hover. |
static NkVec2 |
nimage_padding(long struct)
Unsafe version of
image_padding(). |
static void |
nimage_padding(long struct,
NkVec2 value)
Unsafe version of
image_padding. |
static NkStyleItem |
nnormal(long struct)
Unsafe version of
normal(). |
static void |
nnormal(long struct,
NkStyleItem value)
Unsafe version of
normal. |
NkStyleItem |
normal()
Returns a
NkStyleItem view of the normal field. |
NkStyleButton |
normal(java.util.function.Consumer<NkStyleItem> consumer)
Passes the
normal field to the specified Consumer. |
NkStyleButton |
normal(NkStyleItem value)
Copies the specified
NkStyleItem to the normal field. |
static NkVec2 |
npadding(long struct)
Unsafe version of
padding(). |
static void |
npadding(long struct,
NkVec2 value)
Unsafe version of
padding. |
static float |
nrounding(long struct)
Unsafe version of
rounding(). |
static void |
nrounding(long struct,
float value)
Unsafe version of
rounding. |
static NkColor |
ntext_active(long struct)
Unsafe version of
text_active(). |
static void |
ntext_active(long struct,
NkColor value)
Unsafe version of
text_active. |
static int |
ntext_alignment(long struct)
Unsafe version of
text_alignment(). |
static void |
ntext_alignment(long struct,
int value)
Unsafe version of
text_alignment. |
static NkColor |
ntext_background(long struct)
Unsafe version of
text_background(). |
static void |
ntext_background(long struct,
NkColor value)
Unsafe version of
text_background. |
static NkColor |
ntext_hover(long struct)
Unsafe version of
text_hover(). |
static void |
ntext_hover(long struct,
NkColor value)
Unsafe version of
text_hover. |
static NkColor |
ntext_normal(long struct)
Unsafe version of
text_normal(). |
static void |
ntext_normal(long struct,
NkColor value)
Unsafe version of
text_normal. |
static NkVec2 |
ntouch_padding(long struct)
Unsafe version of
touch_padding(). |
static void |
ntouch_padding(long struct,
NkVec2 value)
Unsafe version of
touch_padding. |
static NkHandle |
nuserdata(long struct)
Unsafe version of
userdata(). |
static void |
nuserdata(long struct,
NkHandle value)
Unsafe version of
userdata. |
NkVec2 |
padding()
Returns a
NkVec2 view of the padding field. |
NkStyleButton |
padding(java.util.function.Consumer<NkVec2> consumer)
Passes the
padding field to the specified Consumer. |
NkStyleButton |
padding(NkVec2 value)
Copies the specified
NkVec2 to the padding field. |
float |
rounding()
Returns the value of the
rounding field. |
NkStyleButton |
rounding(float value)
Sets the specified value to the
rounding field. |
NkStyleButton |
set(NkStyleButton src)
Copies the specified struct data to this struct.
|
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.
|
int |
sizeof() |
NkColor |
text_active()
Returns a
NkColor view of the text_active field. |
NkStyleButton |
text_active(java.util.function.Consumer<NkColor> consumer)
Passes the
text_active field to the specified Consumer. |
NkStyleButton |
text_active(NkColor value)
Copies the specified
NkColor to the text_active field. |
int |
text_alignment()
Returns the value of the
text_alignment field. |
NkStyleButton |
text_alignment(int value)
Sets the specified value to the
text_alignment field. |
NkColor |
text_background()
Returns a
NkColor view of the text_background field. |
NkStyleButton |
text_background(java.util.function.Consumer<NkColor> consumer)
Passes the
text_background field to the specified Consumer. |
NkStyleButton |
text_background(NkColor value)
Copies the specified
NkColor to the text_background field. |
NkColor |
text_hover()
Returns a
NkColor view of the text_hover field. |
NkStyleButton |
text_hover(java.util.function.Consumer<NkColor> consumer)
Passes the
text_hover field to the specified Consumer. |
NkStyleButton |
text_hover(NkColor value)
Copies the specified
NkColor to the text_hover field. |
NkColor |
text_normal()
Returns a
NkColor view of the text_normal field. |
NkStyleButton |
text_normal(java.util.function.Consumer<NkColor> consumer)
Passes the
text_normal field to the specified Consumer. |
NkStyleButton |
text_normal(NkColor value)
Copies the specified
NkColor to the text_normal field. |
NkVec2 |
touch_padding()
Returns a
NkVec2 view of the touch_padding field. |
NkStyleButton |
touch_padding(java.util.function.Consumer<NkVec2> consumer)
Passes the
touch_padding field to the specified Consumer. |
NkStyleButton |
touch_padding(NkVec2 value)
Copies the specified
NkVec2 to the touch_padding field. |
NkHandle |
userdata()
Returns a
NkHandle view of the userdata field. |
NkStyleButton |
userdata(java.util.function.Consumer<NkHandle> consumer)
Passes the
userdata field to the specified Consumer. |
NkStyleButton |
userdata(NkHandle value)
Copies the specified
NkHandle to the userdata field. |
public static final int SIZEOF
public static final int ALIGNOF
public static final int NORMAL
public static final int HOVER
public static final int ACTIVE
public static final int BORDER_COLOR
public static final int TEXT_BACKGROUND
public static final int TEXT_NORMAL
public static final int TEXT_HOVER
public static final int TEXT_ACTIVE
public static final int TEXT_ALIGNMENT
public static final int BORDER
public static final int ROUNDING
public static final int PADDING
public static final int IMAGE_PADDING
public static final int TOUCH_PADDING
public static final int USERDATA
public static final int DRAW_BEGIN
public static final int DRAW_END
public NkStyleButton(java.nio.ByteBuffer container)
NkStyleButton instance at the current position of the specified ByteBuffer 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.
public int sizeof()
sizeof in class org.lwjgl.system.Structpublic NkStyleItem normal()
NkStyleItem view of the normal field.public NkStyleItem hover()
NkStyleItem view of the hover field.public NkStyleItem active()
NkStyleItem view of the active field.public NkColor text_background()
NkColor view of the text_background field.public int text_alignment()
text_alignment field.public float border()
border field.public float rounding()
rounding field.@Nullable public NkDrawBeginCallback draw_begin()
draw_begin field.@Nullable public NkDrawEndCallback draw_end()
draw_end field.public NkStyleButton normal(NkStyleItem value)
NkStyleItem to the normal field.public NkStyleButton normal(java.util.function.Consumer<NkStyleItem> consumer)
normal field to the specified Consumer.public NkStyleButton hover(NkStyleItem value)
NkStyleItem to the hover field.public NkStyleButton hover(java.util.function.Consumer<NkStyleItem> consumer)
hover field to the specified Consumer.public NkStyleButton active(NkStyleItem value)
NkStyleItem to the active field.public NkStyleButton active(java.util.function.Consumer<NkStyleItem> consumer)
active field to the specified Consumer.public NkStyleButton border_color(NkColor value)
NkColor to the border_color field.public NkStyleButton border_color(java.util.function.Consumer<NkColor> consumer)
border_color field to the specified Consumer.public NkStyleButton text_background(NkColor value)
NkColor to the text_background field.public NkStyleButton text_background(java.util.function.Consumer<NkColor> consumer)
text_background field to the specified Consumer.public NkStyleButton text_normal(NkColor value)
NkColor to the text_normal field.public NkStyleButton text_normal(java.util.function.Consumer<NkColor> consumer)
text_normal field to the specified Consumer.public NkStyleButton text_hover(NkColor value)
NkColor to the text_hover field.public NkStyleButton text_hover(java.util.function.Consumer<NkColor> consumer)
text_hover field to the specified Consumer.public NkStyleButton text_active(NkColor value)
NkColor to the text_active field.public NkStyleButton text_active(java.util.function.Consumer<NkColor> consumer)
text_active field to the specified Consumer.public NkStyleButton text_alignment(int value)
text_alignment field.public NkStyleButton border(float value)
border field.public NkStyleButton rounding(float value)
rounding field.public NkStyleButton padding(NkVec2 value)
NkVec2 to the padding field.public NkStyleButton padding(java.util.function.Consumer<NkVec2> consumer)
padding field to the specified Consumer.public NkStyleButton image_padding(NkVec2 value)
NkVec2 to the image_padding field.public NkStyleButton image_padding(java.util.function.Consumer<NkVec2> consumer)
image_padding field to the specified Consumer.public NkStyleButton touch_padding(NkVec2 value)
NkVec2 to the touch_padding field.public NkStyleButton touch_padding(java.util.function.Consumer<NkVec2> consumer)
touch_padding field to the specified Consumer.public NkStyleButton userdata(NkHandle value)
NkHandle to the userdata field.public NkStyleButton userdata(java.util.function.Consumer<NkHandle> consumer)
userdata field to the specified Consumer.public NkStyleButton draw_begin(@Nullable NkDrawBeginCallbackI value)
draw_begin field.public NkStyleButton draw_end(@Nullable NkDrawEndCallbackI value)
draw_end field.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)
public NkStyleButton set(NkStyleButton src)
src - the source structpublic static NkStyleButton malloc()
NkStyleButton instance allocated with memAlloc. The instance must be explicitly freed.public static NkStyleButton calloc()
NkStyleButton instance allocated with memCalloc. The instance must be explicitly freed.public static NkStyleButton create()
NkStyleButton instance allocated with BufferUtils.public static NkStyleButton create(long address)
NkStyleButton instance for the specified memory address.@Nullable public static NkStyleButton createSafe(long address)
public static NkStyleButton.Buffer malloc(int capacity)
NkStyleButton.Buffer instance allocated with memAlloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static NkStyleButton.Buffer calloc(int capacity)
NkStyleButton.Buffer instance allocated with memCalloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static NkStyleButton.Buffer create(int capacity)
NkStyleButton.Buffer instance allocated with BufferUtils.capacity - the buffer capacitypublic static NkStyleButton.Buffer create(long address, int capacity)
NkStyleButton.Buffer instance at the specified memory.address - the memory addresscapacity - the buffer capacity@Nullable public static NkStyleButton.Buffer createSafe(long address, int capacity)
public static NkStyleButton mallocStack()
NkStyleButton instance allocated on the thread-local MemoryStack.public static NkStyleButton callocStack()
NkStyleButton instance allocated on the thread-local MemoryStack and initializes all its bits to zero.public static NkStyleButton mallocStack(org.lwjgl.system.MemoryStack stack)
NkStyleButton instance allocated on the specified MemoryStack.stack - the stack from which to allocatepublic static NkStyleButton callocStack(org.lwjgl.system.MemoryStack stack)
NkStyleButton instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatepublic static NkStyleButton.Buffer mallocStack(int capacity)
NkStyleButton.Buffer instance allocated on the thread-local MemoryStack.capacity - the buffer capacitypublic static NkStyleButton.Buffer callocStack(int capacity)
NkStyleButton.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.capacity - the buffer capacitypublic static NkStyleButton.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
NkStyleButton.Buffer instance allocated on the specified MemoryStack.stack - the stack from which to allocatecapacity - the buffer capacitypublic static NkStyleButton.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
NkStyleButton.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatecapacity - the buffer capacitypublic static NkStyleItem nnormal(long struct)
normal().public static NkStyleItem nhover(long struct)
hover().public static NkStyleItem nactive(long struct)
active().public static NkColor nborder_color(long struct)
border_color().public static NkColor ntext_background(long struct)
text_background().public static NkColor ntext_normal(long struct)
text_normal().public static NkColor ntext_hover(long struct)
text_hover().public static NkColor ntext_active(long struct)
text_active().public static int ntext_alignment(long struct)
text_alignment().public static float nborder(long struct)
border().public static float nrounding(long struct)
rounding().public static NkVec2 nimage_padding(long struct)
image_padding().public static NkVec2 ntouch_padding(long struct)
touch_padding().public static NkHandle nuserdata(long struct)
userdata().@Nullable public static NkDrawBeginCallback ndraw_begin(long struct)
draw_begin().@Nullable public static NkDrawEndCallback ndraw_end(long struct)
draw_end().public static void nnormal(long struct,
NkStyleItem value)
normal.public static void nhover(long struct,
NkStyleItem value)
hover.public static void nactive(long struct,
NkStyleItem value)
active.public static void nborder_color(long struct,
NkColor value)
border_color.public static void ntext_background(long struct,
NkColor value)
text_background.public static void ntext_normal(long struct,
NkColor value)
text_normal.public static void ntext_hover(long struct,
NkColor value)
text_hover.public static void ntext_active(long struct,
NkColor value)
text_active.public static void ntext_alignment(long struct,
int value)
text_alignment.public static void nborder(long struct,
float value)
border.public static void nrounding(long struct,
float value)
rounding.public static void nimage_padding(long struct,
NkVec2 value)
image_padding.public static void ntouch_padding(long struct,
NkVec2 value)
touch_padding.public static void ndraw_begin(long struct,
@Nullable
NkDrawBeginCallbackI value)
draw_begin.public static void ndraw_end(long struct,
@Nullable
NkDrawEndCallbackI value)
draw_end.Copyright LWJGL. All Rights Reserved. License terms.