Package org.lwjgl.nuklear
Class NkStyleToggle
- All Implemented Interfaces:
AutoCloseable,NativeResource,Pointer
struct nk_style_toggle {
{@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;
{@link NkStyleItem struct nk_style_item} cursor_normal;
{@link NkStyleItem struct nk_style_item} cursor_hover;
{@link NkColor struct nk_color} text_normal;
{@link NkColor struct nk_color} text_hover;
{@link NkColor struct nk_color} text_active;
{@link NkColor struct nk_color} text_background;
nk_flags text_alignment;
{@link NkVec2 struct nk_vec2} padding;
{@link NkVec2 struct nk_vec2} touch_padding;
float spacing;
float border;
float color_factor;
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.StructValidationNested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe struct member offsets.static final intThe struct alignment in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct size in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionNkStyleToggle(ByteBuffer container) Creates aNkStyleToggleinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionactive()active(Consumer<NkStyleItem> consumer) Passes theactivefield to the specifiedConsumer.active(NkStyleItem value) Copies the specifiedNkStyleItemto theactivefield.floatborder()border(float value) Sets the specified value to theborderfield.border_color(Consumer<NkColor> consumer) Passes theborder_colorfield to the specifiedConsumer.border_color(NkColor value) Copies the specifiedNkColorto theborder_colorfield.static NkStyleTogglecalloc()Returns a newNkStyleToggleinstance allocated withmemCalloc.static NkStyleToggle.Buffercalloc(int capacity) Returns a newNkStyleToggle.Bufferinstance allocated withmemCalloc.static NkStyleToggle.Buffercalloc(int capacity, MemoryStack stack) Returns a newNkStyleToggle.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static NkStyleTogglecalloc(MemoryStack stack) Returns a newNkStyleToggleinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static NkStyleToggleDeprecated.static NkStyleToggle.BuffercallocStack(int capacity) Deprecated.static NkStyleToggle.BuffercallocStack(int capacity, MemoryStack stack) Deprecated.static NkStyleTogglecallocStack(MemoryStack stack) Deprecated.floatcolor_factor(float value) Sets the specified value to thecolor_factorfield.static NkStyleTogglecreate()Returns a newNkStyleToggleinstance allocated withBufferUtils.static NkStyleToggle.Buffercreate(int capacity) Returns a newNkStyleToggle.Bufferinstance allocated withBufferUtils.static NkStyleTogglecreate(long address) Returns a newNkStyleToggleinstance for the specified memory address.static NkStyleToggle.Buffercreate(long address, int capacity) Create aNkStyleToggle.Bufferinstance at the specified memory.static @Nullable NkStyleTogglecreateSafe(long address) static @Nullable NkStyleToggle.BuffercreateSafe(long address, int capacity) cursor_hover(Consumer<NkStyleItem> consumer) Passes thecursor_hoverfield to the specifiedConsumer.cursor_hover(NkStyleItem value) Copies the specifiedNkStyleItemto thecursor_hoverfield.cursor_normal(Consumer<NkStyleItem> consumer) Passes thecursor_normalfield to the specifiedConsumer.cursor_normal(NkStyleItem value) Copies the specifiedNkStyleItemto thecursor_normalfield.floatdisabled_factor(float value) Sets the specified value to thedisabled_factorfield.@Nullable NkDrawBeginCallbackdraw_begin(@Nullable NkDrawBeginCallbackI value) Sets the specified value to thedraw_beginfield.@Nullable NkDrawEndCallbackdraw_end()draw_end(@Nullable NkDrawEndCallbackI value) Sets the specified value to thedraw_endfield.hover()hover(Consumer<NkStyleItem> consumer) Passes thehoverfield to the specifiedConsumer.hover(NkStyleItem value) Copies the specifiedNkStyleItemto thehoverfield.static NkStyleTogglemalloc()Returns a newNkStyleToggleinstance allocated withmemAlloc.static NkStyleToggle.Buffermalloc(int capacity) Returns a newNkStyleToggle.Bufferinstance allocated withmemAlloc.static NkStyleToggle.Buffermalloc(int capacity, MemoryStack stack) Returns a newNkStyleToggle.Bufferinstance allocated on the specifiedMemoryStack.static NkStyleTogglemalloc(MemoryStack stack) Returns a newNkStyleToggleinstance allocated on the specifiedMemoryStack.static NkStyleToggleDeprecated.static NkStyleToggle.BuffermallocStack(int capacity) Deprecated.static NkStyleToggle.BuffermallocStack(int capacity, MemoryStack stack) Deprecated.static NkStyleTogglemallocStack(MemoryStack stack) Deprecated.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 floatncolor_factor(long struct) Unsafe version ofcolor_factor().static voidncolor_factor(long struct, float value) Unsafe version ofcolor_factor.static NkStyleItemncursor_hover(long struct) Unsafe version ofcursor_hover().static voidncursor_hover(long struct, NkStyleItem value) Unsafe version ofcursor_hover.static NkStyleItemncursor_normal(long struct) Unsafe version ofcursor_normal().static voidncursor_normal(long struct, NkStyleItem value) Unsafe version ofcursor_normal.static floatndisabled_factor(long struct) Unsafe version ofdisabled_factor().static voidndisabled_factor(long struct, float value) Unsafe version ofdisabled_factor.static @Nullable NkDrawBeginCallbackndraw_begin(long struct) Unsafe version ofdraw_begin().static voidndraw_begin(long struct, @Nullable NkDrawBeginCallbackI value) Unsafe version ofdraw_begin.static @Nullable NkDrawEndCallbackndraw_end(long struct) Unsafe version ofdraw_end().static voidndraw_end(long struct, @Nullable NkDrawEndCallbackI value) Unsafe version ofdraw_end.static NkStyleItemnhover(long struct) Unsafe version ofhover().static voidnhover(long struct, NkStyleItem value) Unsafe version ofhover.static NkStyleItemnnormal(long struct) Unsafe version ofnormal().static voidnnormal(long struct, NkStyleItem value) Unsafe version ofnormal.normal()normal(Consumer<NkStyleItem> consumer) Passes thenormalfield to the specifiedConsumer.normal(NkStyleItem value) Copies the specifiedNkStyleItemto thenormalfield.static NkVec2npadding(long struct) Unsafe version ofpadding().static voidUnsafe version ofpadding.static floatnspacing(long struct) Unsafe version ofspacing().static voidnspacing(long struct, float value) Unsafe version ofspacing.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 voidUnsafe version ofuserdata.padding()Passes thepaddingfield to the specifiedConsumer.Copies the specifiedNkVec2to thepaddingfield.set(NkStyleItem normal, NkStyleItem hover, NkStyleItem active, NkColor border_color, NkStyleItem cursor_normal, NkStyleItem cursor_hover, NkColor text_normal, NkColor text_hover, NkColor text_active, NkColor text_background, int text_alignment, NkVec2 padding, NkVec2 touch_padding, float spacing, float border, float color_factor, float disabled_factor, NkHandle userdata, NkDrawBeginCallbackI draw_begin, NkDrawEndCallbackI draw_end) Initializes this struct with the specified values.set(NkStyleToggle src) Copies the specified struct data to this struct.intsizeof()Returnssizeof(struct).floatspacing()spacing(float value) Sets the specified value to thespacingfield.text_active(Consumer<NkColor> consumer) Passes thetext_activefield to the specifiedConsumer.text_active(NkColor value) Copies the specifiedNkColorto thetext_activefield.inttext_alignment(int value) Sets the specified value to thetext_alignmentfield.text_background(Consumer<NkColor> consumer) Passes thetext_backgroundfield to the specifiedConsumer.text_background(NkColor value) Copies the specifiedNkColorto thetext_backgroundfield.text_hover(Consumer<NkColor> consumer) Passes thetext_hoverfield to the specifiedConsumer.text_hover(NkColor value) Copies the specifiedNkColorto thetext_hoverfield.text_normal(Consumer<NkColor> consumer) Passes thetext_normalfield to the specifiedConsumer.text_normal(NkColor value) Copies the specifiedNkColorto thetext_normalfield.touch_padding(Consumer<NkVec2> consumer) Passes thetouch_paddingfield to the specifiedConsumer.touch_padding(NkVec2 value) Copies the specifiedNkVec2to thetouch_paddingfield.userdata()Passes theuserdatafield to the specifiedConsumer.Copies the specifiedNkHandleto theuserdatafield.Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toStringMethods 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. -
CURSOR_NORMAL
public static final int CURSOR_NORMALThe struct member offsets. -
CURSOR_HOVER
public static final int CURSOR_HOVERThe 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_BACKGROUND
public static final int TEXT_BACKGROUNDThe struct member offsets. -
TEXT_ALIGNMENT
public static final int TEXT_ALIGNMENTThe struct member offsets. -
PADDING
public static final int PADDINGThe struct member offsets. -
TOUCH_PADDING
public static final int TOUCH_PADDINGThe struct member offsets. -
SPACING
public static final int SPACINGThe struct member offsets. -
BORDER
public static final int BORDERThe struct member offsets. -
COLOR_FACTOR
public static final int COLOR_FACTORThe 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
-
NkStyleToggle
Creates aNkStyleToggleinstance 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 Details
-
sizeof
public int sizeof()Description copied from class:StructReturnssizeof(struct).- Specified by:
sizeofin classStruct<NkStyleToggle>
-
normal
- Returns:
- a
NkStyleItemview of thenormalfield.
-
hover
- Returns:
- a
NkStyleItemview of thehoverfield.
-
active
- Returns:
- a
NkStyleItemview of theactivefield.
-
border_color
- Returns:
- a
NkColorview of theborder_colorfield.
-
cursor_normal
- Returns:
- a
NkStyleItemview of thecursor_normalfield.
-
cursor_hover
- Returns:
- a
NkStyleItemview of thecursor_hoverfield.
-
text_normal
- Returns:
- a
NkColorview of thetext_normalfield.
-
text_hover
- Returns:
- a
NkColorview of thetext_hoverfield.
-
text_active
- Returns:
- a
NkColorview of thetext_activefield.
-
text_background
- Returns:
- a
NkColorview of thetext_backgroundfield.
-
text_alignment
public int text_alignment()- Returns:
- the value of the
text_alignmentfield.
-
padding
- Returns:
- a
NkVec2view of thepaddingfield.
-
touch_padding
- Returns:
- a
NkVec2view of thetouch_paddingfield.
-
spacing
public float spacing()- Returns:
- the value of the
spacingfield.
-
border
public float border()- Returns:
- the value of the
borderfield.
-
color_factor
public float color_factor()- Returns:
- the value of the
color_factorfield.
-
disabled_factor
public float disabled_factor()- Returns:
- the value of the
disabled_factorfield.
-
userdata
- Returns:
- a
NkHandleview of theuserdatafield.
-
draw_begin
- Returns:
- the value of the
draw_beginfield.
-
draw_end
- Returns:
- the value of the
draw_endfield.
-
normal
Copies the specifiedNkStyleItemto thenormalfield. -
normal
Passes thenormalfield to the specifiedConsumer. -
hover
Copies the specifiedNkStyleItemto thehoverfield. -
hover
Passes thehoverfield to the specifiedConsumer. -
active
Copies the specifiedNkStyleItemto theactivefield. -
active
Passes theactivefield to the specifiedConsumer. -
border_color
Copies the specifiedNkColorto theborder_colorfield. -
border_color
Passes theborder_colorfield to the specifiedConsumer. -
cursor_normal
Copies the specifiedNkStyleItemto thecursor_normalfield. -
cursor_normal
Passes thecursor_normalfield to the specifiedConsumer. -
cursor_hover
Copies the specifiedNkStyleItemto thecursor_hoverfield. -
cursor_hover
Passes thecursor_hoverfield to the specifiedConsumer. -
text_normal
Copies the specifiedNkColorto thetext_normalfield. -
text_normal
Passes thetext_normalfield to the specifiedConsumer. -
text_hover
Copies the specifiedNkColorto thetext_hoverfield. -
text_hover
Passes thetext_hoverfield to the specifiedConsumer. -
text_active
Copies the specifiedNkColorto thetext_activefield. -
text_active
Passes thetext_activefield to the specifiedConsumer. -
text_background
Copies the specifiedNkColorto thetext_backgroundfield. -
text_background
Passes thetext_backgroundfield to the specifiedConsumer. -
text_alignment
Sets the specified value to thetext_alignmentfield. -
padding
Copies the specifiedNkVec2to thepaddingfield. -
padding
Passes thepaddingfield to the specifiedConsumer. -
touch_padding
Copies the specifiedNkVec2to thetouch_paddingfield. -
touch_padding
Passes thetouch_paddingfield to the specifiedConsumer. -
spacing
Sets the specified value to thespacingfield. -
border
Sets the specified value to theborderfield. -
color_factor
Sets the specified value to thecolor_factorfield. -
disabled_factor
Sets the specified value to thedisabled_factorfield. -
userdata
Copies the specifiedNkHandleto theuserdatafield. -
userdata
Passes theuserdatafield to the specifiedConsumer. -
draw_begin
Sets the specified value to thedraw_beginfield. -
draw_end
Sets the specified value to thedraw_endfield. -
set
public NkStyleToggle set(NkStyleItem normal, NkStyleItem hover, NkStyleItem active, NkColor border_color, NkStyleItem cursor_normal, NkStyleItem cursor_hover, NkColor text_normal, NkColor text_hover, NkColor text_active, NkColor text_background, int text_alignment, NkVec2 padding, NkVec2 touch_padding, float spacing, float border, float color_factor, 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 newNkStyleToggleinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newNkStyleToggleinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newNkStyleToggleinstance allocated withBufferUtils. -
create
Returns a newNkStyleToggleinstance for the specified memory address. -
createSafe
-
malloc
Returns a newNkStyleToggle.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newNkStyleToggle.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newNkStyleToggle.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aNkStyleToggle.Bufferinstance 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 newNkStyleToggleinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newNkStyleToggleinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newNkStyleToggle.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newNkStyleToggle.Bufferinstance allocated on the specifiedMemoryStackand 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(). -
ncursor_normal
Unsafe version ofcursor_normal(). -
ncursor_hover
Unsafe version ofcursor_hover(). -
ntext_normal
Unsafe version oftext_normal(). -
ntext_hover
Unsafe version oftext_hover(). -
ntext_active
Unsafe version oftext_active(). -
ntext_background
Unsafe version oftext_background(). -
ntext_alignment
public static int ntext_alignment(long struct) Unsafe version oftext_alignment(). -
npadding
Unsafe version ofpadding(). -
ntouch_padding
Unsafe version oftouch_padding(). -
nspacing
public static float nspacing(long struct) Unsafe version ofspacing(). -
nborder
public static float nborder(long struct) Unsafe version ofborder(). -
ncolor_factor
public static float ncolor_factor(long struct) Unsafe version ofcolor_factor(). -
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. -
ncursor_normal
Unsafe version ofcursor_normal. -
ncursor_hover
Unsafe version ofcursor_hover. -
ntext_normal
Unsafe version oftext_normal. -
ntext_hover
Unsafe version oftext_hover. -
ntext_active
Unsafe version oftext_active. -
ntext_background
Unsafe version oftext_background. -
ntext_alignment
public static void ntext_alignment(long struct, int value) Unsafe version oftext_alignment. -
npadding
Unsafe version ofpadding. -
ntouch_padding
Unsafe version oftouch_padding. -
nspacing
public static void nspacing(long struct, float value) Unsafe version ofspacing. -
nborder
public static void nborder(long struct, float value) Unsafe version ofborder. -
ncolor_factor
public static void ncolor_factor(long struct, float value) Unsafe version ofcolor_factor. -
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.
-