Package org.lwjgl.nuklear
Class NkStyleButton
- All Implemented Interfaces:
AutoCloseable
,NativeResource
,Pointer
struct nk_style_button {
{@link NkStyleItem struct nk_style_item} normal;
{@link NkStyleItem struct nk_style_item} hover;
{@link NkStyleItem struct nk_style_item} active;
{@link NkColor struct nk_color} border_color;
float color_factor_background;
{@link NkColor struct nk_color} text_background;
{@link NkColor struct nk_color} text_normal;
{@link NkColor struct nk_color} text_hover;
{@link NkColor struct nk_color} text_active;
nk_flags text_alignment;
float color_factor_text;
float border;
float rounding;
{@link NkVec2 struct nk_vec2} padding;
{@link NkVec2 struct nk_vec2} image_padding;
{@link NkVec2 struct nk_vec2} touch_padding;
float disabled_factor;
{@link NkHandle nk_handle} userdata;
{@link NkDrawBeginCallbackI nk_draw_begin} draw_begin;
{@link NkDrawEndCallbackI nk_draw_end} draw_end;
}
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.lwjgl.system.Struct
Struct.StructValidation
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
The struct member offsets.static final int
The struct alignment in bytes.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct size in bytes.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE
-
Constructor Summary
ConstructorsConstructorDescriptionNkStyleButton
(ByteBuffer container) Creates aNkStyleButton
instance at the current position of the specifiedByteBuffer
container. -
Method Summary
Modifier and TypeMethodDescriptionactive()
active
(Consumer<NkStyleItem> consumer) Passes theactive
field to the specifiedConsumer
.active
(NkStyleItem value) Copies the specifiedNkStyleItem
to theactive
field.float
border()
border
(float value) Sets the specified value to theborder
field.border_color
(Consumer<NkColor> consumer) Passes theborder_color
field to the specifiedConsumer
.border_color
(NkColor value) Copies the specifiedNkColor
to theborder_color
field.static NkStyleButton
calloc()
Returns a newNkStyleButton
instance allocated withmemCalloc
.static NkStyleButton.Buffer
calloc
(int capacity) Returns a newNkStyleButton.Buffer
instance allocated withmemCalloc
.static NkStyleButton.Buffer
calloc
(int capacity, MemoryStack stack) Returns a newNkStyleButton.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static NkStyleButton
calloc
(MemoryStack stack) Returns a newNkStyleButton
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static NkStyleButton
Deprecated.static NkStyleButton.Buffer
callocStack
(int capacity) Deprecated.static NkStyleButton.Buffer
callocStack
(int capacity, MemoryStack stack) Deprecated.static NkStyleButton
callocStack
(MemoryStack stack) Deprecated.float
color_factor_background
(float value) Sets the specified value to thecolor_factor_background
field.float
color_factor_text
(float value) Sets the specified value to thecolor_factor_text
field.static NkStyleButton
create()
Returns a newNkStyleButton
instance allocated withBufferUtils
.static NkStyleButton.Buffer
create
(int capacity) Returns a newNkStyleButton.Buffer
instance allocated withBufferUtils
.static NkStyleButton
create
(long address) Returns a newNkStyleButton
instance for the specified memory address.static NkStyleButton.Buffer
create
(long address, int capacity) Create aNkStyleButton.Buffer
instance at the specified memory.static @Nullable NkStyleButton
createSafe
(long address) static @Nullable NkStyleButton.Buffer
createSafe
(long address, int capacity) float
disabled_factor
(float value) Sets the specified value to thedisabled_factor
field.@Nullable NkDrawBeginCallback
draw_begin
(@Nullable NkDrawBeginCallbackI value) Sets the specified value to thedraw_begin
field.@Nullable NkDrawEndCallback
draw_end()
draw_end
(@Nullable NkDrawEndCallbackI value) Sets the specified value to thedraw_end
field.hover()
hover
(Consumer<NkStyleItem> consumer) Passes thehover
field to the specifiedConsumer
.hover
(NkStyleItem value) Copies the specifiedNkStyleItem
to thehover
field.image_padding
(Consumer<NkVec2> consumer) Passes theimage_padding
field to the specifiedConsumer
.image_padding
(NkVec2 value) Copies the specifiedNkVec2
to theimage_padding
field.static NkStyleButton
malloc()
Returns a newNkStyleButton
instance allocated withmemAlloc
.static NkStyleButton.Buffer
malloc
(int capacity) Returns a newNkStyleButton.Buffer
instance allocated withmemAlloc
.static NkStyleButton.Buffer
malloc
(int capacity, MemoryStack stack) Returns a newNkStyleButton.Buffer
instance allocated on the specifiedMemoryStack
.static NkStyleButton
malloc
(MemoryStack stack) Returns a newNkStyleButton
instance allocated on the specifiedMemoryStack
.static NkStyleButton
Deprecated.static NkStyleButton.Buffer
mallocStack
(int capacity) Deprecated.static NkStyleButton.Buffer
mallocStack
(int capacity, MemoryStack stack) Deprecated.static NkStyleButton
mallocStack
(MemoryStack stack) Deprecated.static NkStyleItem
nactive
(long struct) Unsafe version ofactive()
.static void
nactive
(long struct, NkStyleItem value) Unsafe version ofactive
.static float
nborder
(long struct) Unsafe version ofborder()
.static void
nborder
(long struct, float value) Unsafe version ofborder
.static NkColor
nborder_color
(long struct) Unsafe version ofborder_color()
.static void
nborder_color
(long struct, NkColor value) Unsafe version ofborder_color
.static float
ncolor_factor_background
(long struct) Unsafe version ofcolor_factor_background()
.static void
ncolor_factor_background
(long struct, float value) Unsafe version ofcolor_factor_background
.static float
ncolor_factor_text
(long struct) Unsafe version ofcolor_factor_text()
.static void
ncolor_factor_text
(long struct, float value) Unsafe version ofcolor_factor_text
.static float
ndisabled_factor
(long struct) Unsafe version ofdisabled_factor()
.static void
ndisabled_factor
(long struct, float value) Unsafe version ofdisabled_factor
.static @Nullable NkDrawBeginCallback
ndraw_begin
(long struct) Unsafe version ofdraw_begin()
.static void
ndraw_begin
(long struct, @Nullable NkDrawBeginCallbackI value) Unsafe version ofdraw_begin
.static @Nullable NkDrawEndCallback
ndraw_end
(long struct) Unsafe version ofdraw_end()
.static void
ndraw_end
(long struct, @Nullable NkDrawEndCallbackI value) Unsafe version ofdraw_end
.static NkStyleItem
nhover
(long struct) Unsafe version ofhover()
.static void
nhover
(long struct, NkStyleItem value) Unsafe version ofhover
.static NkVec2
nimage_padding
(long struct) Unsafe version ofimage_padding()
.static void
nimage_padding
(long struct, NkVec2 value) Unsafe version ofimage_padding
.static NkStyleItem
nnormal
(long struct) Unsafe version ofnormal()
.static void
nnormal
(long struct, NkStyleItem value) Unsafe version ofnormal
.normal()
normal
(Consumer<NkStyleItem> consumer) Passes thenormal
field to the specifiedConsumer
.normal
(NkStyleItem value) Copies the specifiedNkStyleItem
to thenormal
field.static NkVec2
npadding
(long struct) Unsafe version ofpadding()
.static void
Unsafe version ofpadding
.static float
nrounding
(long struct) Unsafe version ofrounding()
.static void
nrounding
(long struct, float value) Unsafe version ofrounding
.static NkColor
ntext_active
(long struct) Unsafe version oftext_active()
.static void
ntext_active
(long struct, NkColor value) Unsafe version oftext_active
.static int
ntext_alignment
(long struct) Unsafe version oftext_alignment()
.static void
ntext_alignment
(long struct, int value) Unsafe version oftext_alignment
.static NkColor
ntext_background
(long struct) Unsafe version oftext_background()
.static void
ntext_background
(long struct, NkColor value) Unsafe version oftext_background
.static NkColor
ntext_hover
(long struct) Unsafe version oftext_hover()
.static void
ntext_hover
(long struct, NkColor value) Unsafe version oftext_hover
.static NkColor
ntext_normal
(long struct) Unsafe version oftext_normal()
.static void
ntext_normal
(long struct, NkColor value) Unsafe version oftext_normal
.static NkVec2
ntouch_padding
(long struct) Unsafe version oftouch_padding()
.static void
ntouch_padding
(long struct, NkVec2 value) Unsafe version oftouch_padding
.static NkHandle
nuserdata
(long struct) Unsafe version ofuserdata()
.static void
Unsafe version ofuserdata
.padding()
Passes thepadding
field to the specifiedConsumer
.Copies the specifiedNkVec2
to thepadding
field.float
rounding()
rounding
(float value) Sets the specified value to therounding
field.set
(NkStyleButton src) Copies the specified struct data to this struct.set
(NkStyleItem normal, NkStyleItem hover, NkStyleItem active, NkColor border_color, float color_factor_background, NkColor text_background, NkColor text_normal, NkColor text_hover, NkColor text_active, int text_alignment, float color_factor_text, float border, float rounding, NkVec2 padding, NkVec2 image_padding, NkVec2 touch_padding, float disabled_factor, NkHandle userdata, NkDrawBeginCallbackI draw_begin, NkDrawEndCallbackI draw_end) Initializes this struct with the specified values.int
sizeof()
Returnssizeof(struct)
.text_active
(Consumer<NkColor> consumer) Passes thetext_active
field to the specifiedConsumer
.text_active
(NkColor value) Copies the specifiedNkColor
to thetext_active
field.int
text_alignment
(int value) Sets the specified value to thetext_alignment
field.text_background
(Consumer<NkColor> consumer) Passes thetext_background
field to the specifiedConsumer
.text_background
(NkColor value) Copies the specifiedNkColor
to thetext_background
field.text_hover
(Consumer<NkColor> consumer) Passes thetext_hover
field to the specifiedConsumer
.text_hover
(NkColor value) Copies the specifiedNkColor
to thetext_hover
field.text_normal
(Consumer<NkColor> consumer) Passes thetext_normal
field to the specifiedConsumer
.text_normal
(NkColor value) Copies the specifiedNkColor
to thetext_normal
field.touch_padding
(Consumer<NkVec2> consumer) Passes thetouch_padding
field to the specifiedConsumer
.touch_padding
(NkVec2 value) Copies the specifiedNkVec2
to thetouch_padding
field.userdata()
Passes theuserdata
field to the specifiedConsumer
.Copies the specifiedNkHandle
to theuserdata
field.Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
Methods inherited from interface org.lwjgl.system.NativeResource
close, free
-
Field Details
-
SIZEOF
public static final int SIZEOFThe struct size in bytes. -
ALIGNOF
public static final int ALIGNOFThe struct alignment in bytes. -
NORMAL
public static final int NORMALThe struct member offsets. -
HOVER
public static final int HOVERThe struct member offsets. -
ACTIVE
public static final int ACTIVEThe struct member offsets. -
BORDER_COLOR
public static final int BORDER_COLORThe struct member offsets. -
COLOR_FACTOR_BACKGROUND
public static final int COLOR_FACTOR_BACKGROUNDThe struct member offsets. -
TEXT_BACKGROUND
public static final int TEXT_BACKGROUNDThe struct member offsets. -
TEXT_NORMAL
public static final int TEXT_NORMALThe struct member offsets. -
TEXT_HOVER
public static final int TEXT_HOVERThe struct member offsets. -
TEXT_ACTIVE
public static final int TEXT_ACTIVEThe struct member offsets. -
TEXT_ALIGNMENT
public static final int TEXT_ALIGNMENTThe struct member offsets. -
COLOR_FACTOR_TEXT
public static final int COLOR_FACTOR_TEXTThe struct member offsets. -
BORDER
public static final int BORDERThe struct member offsets. -
ROUNDING
public static final int ROUNDINGThe struct member offsets. -
PADDING
public static final int PADDINGThe struct member offsets. -
IMAGE_PADDING
public static final int IMAGE_PADDINGThe struct member offsets. -
TOUCH_PADDING
public static final int TOUCH_PADDINGThe struct member offsets. -
DISABLED_FACTOR
public static final int DISABLED_FACTORThe struct member offsets. -
USERDATA
public static final int USERDATAThe struct member offsets. -
DRAW_BEGIN
public static final int DRAW_BEGINThe struct member offsets. -
DRAW_END
public static final int DRAW_ENDThe struct member offsets.
-
-
Constructor Details
-
NkStyleButton
Creates aNkStyleButton
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 Details
-
sizeof
public int sizeof()Description copied from class:Struct
Returnssizeof(struct)
.- Specified by:
sizeof
in classStruct<NkStyleButton>
-
normal
- Returns:
- a
NkStyleItem
view of thenormal
field.
-
hover
- Returns:
- a
NkStyleItem
view of thehover
field.
-
active
- Returns:
- a
NkStyleItem
view of theactive
field.
-
border_color
- Returns:
- a
NkColor
view of theborder_color
field.
-
color_factor_background
public float color_factor_background()- Returns:
- the value of the
color_factor_background
field.
-
text_background
- Returns:
- a
NkColor
view of thetext_background
field.
-
text_normal
- Returns:
- a
NkColor
view of thetext_normal
field.
-
text_hover
- Returns:
- a
NkColor
view of thetext_hover
field.
-
text_active
- Returns:
- a
NkColor
view of thetext_active
field.
-
text_alignment
public int text_alignment()- Returns:
- the value of the
text_alignment
field.
-
color_factor_text
public float color_factor_text()- Returns:
- the value of the
color_factor_text
field.
-
border
public float border()- Returns:
- the value of the
border
field.
-
rounding
public float rounding()- Returns:
- the value of the
rounding
field.
-
padding
- Returns:
- a
NkVec2
view of thepadding
field.
-
image_padding
- Returns:
- a
NkVec2
view of theimage_padding
field.
-
touch_padding
- Returns:
- a
NkVec2
view of thetouch_padding
field.
-
disabled_factor
public float disabled_factor()- Returns:
- the value of the
disabled_factor
field.
-
userdata
- Returns:
- a
NkHandle
view of theuserdata
field.
-
draw_begin
- Returns:
- the value of the
draw_begin
field.
-
draw_end
- Returns:
- the value of the
draw_end
field.
-
normal
Copies the specifiedNkStyleItem
to thenormal
field. -
normal
Passes thenormal
field to the specifiedConsumer
. -
hover
Copies the specifiedNkStyleItem
to thehover
field. -
hover
Passes thehover
field to the specifiedConsumer
. -
active
Copies the specifiedNkStyleItem
to theactive
field. -
active
Passes theactive
field to the specifiedConsumer
. -
border_color
Copies the specifiedNkColor
to theborder_color
field. -
border_color
Passes theborder_color
field to the specifiedConsumer
. -
color_factor_background
Sets the specified value to thecolor_factor_background
field. -
text_background
Copies the specifiedNkColor
to thetext_background
field. -
text_background
Passes thetext_background
field to the specifiedConsumer
. -
text_normal
Copies the specifiedNkColor
to thetext_normal
field. -
text_normal
Passes thetext_normal
field to the specifiedConsumer
. -
text_hover
Copies the specifiedNkColor
to thetext_hover
field. -
text_hover
Passes thetext_hover
field to the specifiedConsumer
. -
text_active
Copies the specifiedNkColor
to thetext_active
field. -
text_active
Passes thetext_active
field to the specifiedConsumer
. -
text_alignment
Sets the specified value to thetext_alignment
field. -
color_factor_text
Sets the specified value to thecolor_factor_text
field. -
border
Sets the specified value to theborder
field. -
rounding
Sets the specified value to therounding
field. -
padding
Copies the specifiedNkVec2
to thepadding
field. -
padding
Passes thepadding
field to the specifiedConsumer
. -
image_padding
Copies the specifiedNkVec2
to theimage_padding
field. -
image_padding
Passes theimage_padding
field to the specifiedConsumer
. -
touch_padding
Copies the specifiedNkVec2
to thetouch_padding
field. -
touch_padding
Passes thetouch_padding
field to the specifiedConsumer
. -
disabled_factor
Sets the specified value to thedisabled_factor
field. -
userdata
Copies the specifiedNkHandle
to theuserdata
field. -
userdata
Passes theuserdata
field to the specifiedConsumer
. -
draw_begin
Sets the specified value to thedraw_begin
field. -
draw_end
Sets the specified value to thedraw_end
field. -
set
public NkStyleButton set(NkStyleItem normal, NkStyleItem hover, NkStyleItem active, NkColor border_color, float color_factor_background, NkColor text_background, NkColor text_normal, NkColor text_hover, NkColor text_active, int text_alignment, float color_factor_text, float border, float rounding, NkVec2 padding, NkVec2 image_padding, NkVec2 touch_padding, float disabled_factor, NkHandle userdata, NkDrawBeginCallbackI draw_begin, NkDrawEndCallbackI draw_end) Initializes this struct with the specified values. -
set
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
Returns a newNkStyleButton
instance allocated withmemAlloc
. The instance must be explicitly freed. -
calloc
Returns a newNkStyleButton
instance allocated withmemCalloc
. The instance must be explicitly freed. -
create
Returns a newNkStyleButton
instance allocated withBufferUtils
. -
create
Returns a newNkStyleButton
instance for the specified memory address. -
createSafe
-
malloc
Returns a newNkStyleButton.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
Returns a newNkStyleButton.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
Returns a newNkStyleButton.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
Create aNkStyleButton.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
-
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)
instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)
instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)
instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)
instead. -
malloc
Returns a newNkStyleButton
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
Returns a newNkStyleButton
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
malloc
Returns a newNkStyleButton.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
calloc
Returns a newNkStyleButton.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
nnormal
Unsafe version ofnormal()
. -
nhover
Unsafe version ofhover()
. -
nactive
Unsafe version ofactive()
. -
nborder_color
Unsafe version ofborder_color()
. -
ncolor_factor_background
public static float ncolor_factor_background(long struct) Unsafe version ofcolor_factor_background()
. -
ntext_background
Unsafe version oftext_background()
. -
ntext_normal
Unsafe version oftext_normal()
. -
ntext_hover
Unsafe version oftext_hover()
. -
ntext_active
Unsafe version oftext_active()
. -
ntext_alignment
public static int ntext_alignment(long struct) Unsafe version oftext_alignment()
. -
ncolor_factor_text
public static float ncolor_factor_text(long struct) Unsafe version ofcolor_factor_text()
. -
nborder
public static float nborder(long struct) Unsafe version ofborder()
. -
nrounding
public static float nrounding(long struct) Unsafe version ofrounding()
. -
npadding
Unsafe version ofpadding()
. -
nimage_padding
Unsafe version ofimage_padding()
. -
ntouch_padding
Unsafe version oftouch_padding()
. -
ndisabled_factor
public static float ndisabled_factor(long struct) Unsafe version ofdisabled_factor()
. -
nuserdata
Unsafe version ofuserdata()
. -
ndraw_begin
Unsafe version ofdraw_begin()
. -
ndraw_end
Unsafe version ofdraw_end()
. -
nnormal
Unsafe version ofnormal
. -
nhover
Unsafe version ofhover
. -
nactive
Unsafe version ofactive
. -
nborder_color
Unsafe version ofborder_color
. -
ncolor_factor_background
public static void ncolor_factor_background(long struct, float value) Unsafe version ofcolor_factor_background
. -
ntext_background
Unsafe version oftext_background
. -
ntext_normal
Unsafe version oftext_normal
. -
ntext_hover
Unsafe version oftext_hover
. -
ntext_active
Unsafe version oftext_active
. -
ntext_alignment
public static void ntext_alignment(long struct, int value) Unsafe version oftext_alignment
. -
ncolor_factor_text
public static void ncolor_factor_text(long struct, float value) Unsafe version ofcolor_factor_text
. -
nborder
public static void nborder(long struct, float value) Unsafe version ofborder
. -
nrounding
public static void nrounding(long struct, float value) Unsafe version ofrounding
. -
npadding
Unsafe version ofpadding
. -
nimage_padding
Unsafe version ofimage_padding
. -
ntouch_padding
Unsafe version oftouch_padding
. -
ndisabled_factor
public static void ndisabled_factor(long struct, float value) Unsafe version ofdisabled_factor
. -
nuserdata
Unsafe version ofuserdata
. -
ndraw_begin
Unsafe version ofdraw_begin
. -
ndraw_end
Unsafe version ofdraw_end
.
-