Package org.lwjgl.nuklear
Class NkStyleKnob
- All Implemented Interfaces:
AutoCloseable,NativeResource,Pointer
struct nk_style_knob {
struct nk_style_item normal;
struct nk_style_item hover;
struct nk_style_item active;
struct nk_color border_color;
struct nk_color knob_normal;
struct nk_color knob_hover;
struct nk_color knob_active;
struct nk_color knob_border_color;
struct nk_color cursor_normal;
struct nk_color cursor_hover;
struct nk_color cursor_active;
float border;
float knob_border;
struct nk_vec2 padding;
struct nk_vec2 spacing;
float cursor_width;
float color_factor;
float disabled_factor;
nk_handle userdata;
nk_draw_begin draw_begin;
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 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.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionNkStyleKnob(ByteBuffer container) Creates aNkStyleKnobinstance 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 NkStyleKnobcalloc()Returns a newNkStyleKnobinstance allocated withmemCalloc.static NkStyleKnob.Buffercalloc(int capacity) Returns a newNkStyleKnob.Bufferinstance allocated withmemCalloc.static NkStyleKnob.Buffercalloc(int capacity, MemoryStack stack) Returns a newNkStyleKnob.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static NkStyleKnobcalloc(MemoryStack stack) Returns a newNkStyleKnobinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.floatcolor_factor(float value) Sets the specified value to thecolor_factorfield.static NkStyleKnobcreate()Returns a newNkStyleKnobinstance allocated withBufferUtils.static NkStyleKnob.Buffercreate(int capacity) Returns a newNkStyleKnob.Bufferinstance allocated withBufferUtils.static NkStyleKnobcreate(long address) Returns a newNkStyleKnobinstance for the specified memory address.static NkStyleKnob.Buffercreate(long address, int capacity) Create aNkStyleKnob.Bufferinstance at the specified memory.static @Nullable NkStyleKnobcreateSafe(long address) static @Nullable NkStyleKnob.BuffercreateSafe(long address, int capacity) cursor_active(Consumer<NkColor> consumer) Passes thecursor_activefield to the specifiedConsumer.cursor_active(NkColor value) Copies the specifiedNkColorto thecursor_activefield.cursor_hover(Consumer<NkColor> consumer) Passes thecursor_hoverfield to the specifiedConsumer.cursor_hover(NkColor value) Copies the specifiedNkColorto thecursor_hoverfield.cursor_normal(Consumer<NkColor> consumer) Passes thecursor_normalfield to the specifiedConsumer.cursor_normal(NkColor value) Copies the specifiedNkColorto thecursor_normalfield.floatcursor_width(float value) Sets the specified value to thecursor_widthfield.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.knob_active(Consumer<NkColor> consumer) Passes theknob_activefield to the specifiedConsumer.knob_active(NkColor value) Copies the specifiedNkColorto theknob_activefield.floatknob_border(float value) Sets the specified value to theknob_borderfield.knob_border_color(Consumer<NkColor> consumer) Passes theknob_border_colorfield to the specifiedConsumer.knob_border_color(NkColor value) Copies the specifiedNkColorto theknob_border_colorfield.knob_hover(Consumer<NkColor> consumer) Passes theknob_hoverfield to the specifiedConsumer.knob_hover(NkColor value) Copies the specifiedNkColorto theknob_hoverfield.knob_normal(Consumer<NkColor> consumer) Passes theknob_normalfield to the specifiedConsumer.knob_normal(NkColor value) Copies the specifiedNkColorto theknob_normalfield.static NkStyleKnobmalloc()Returns a newNkStyleKnobinstance allocated withmemAlloc.static NkStyleKnob.Buffermalloc(int capacity) Returns a newNkStyleKnob.Bufferinstance allocated withmemAlloc.static NkStyleKnob.Buffermalloc(int capacity, MemoryStack stack) Returns a newNkStyleKnob.Bufferinstance allocated on the specifiedMemoryStack.static NkStyleKnobmalloc(MemoryStack stack) Returns a newNkStyleKnobinstance 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 floatncolor_factor(long struct) Unsafe version ofcolor_factor().static voidncolor_factor(long struct, float value) Unsafe version ofcolor_factor.static NkColorncursor_active(long struct) Unsafe version ofcursor_active().static voidncursor_active(long struct, NkColor value) Unsafe version ofcursor_active.static NkColorncursor_hover(long struct) Unsafe version ofcursor_hover().static voidncursor_hover(long struct, NkColor value) Unsafe version ofcursor_hover.static NkColorncursor_normal(long struct) Unsafe version ofcursor_normal().static voidncursor_normal(long struct, NkColor value) Unsafe version ofcursor_normal.static floatncursor_width(long struct) Unsafe version ofcursor_width().static voidncursor_width(long struct, float value) Unsafe version ofcursor_width.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 NkColornknob_active(long struct) Unsafe version ofknob_active().static voidnknob_active(long struct, NkColor value) Unsafe version ofknob_active.static floatnknob_border(long struct) Unsafe version ofknob_border().static voidnknob_border(long struct, float value) Unsafe version ofknob_border.static NkColornknob_border_color(long struct) Unsafe version ofknob_border_color().static voidnknob_border_color(long struct, NkColor value) Unsafe version ofknob_border_color.static NkColornknob_hover(long struct) Unsafe version ofknob_hover().static voidnknob_hover(long struct, NkColor value) Unsafe version ofknob_hover.static NkColornknob_normal(long struct) Unsafe version ofknob_normal().static voidnknob_normal(long struct, NkColor value) Unsafe version ofknob_normal.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 NkVec2nspacing(long struct) Unsafe version ofspacing().static voidUnsafe version ofspacing.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, NkColor knob_normal, NkColor knob_hover, NkColor knob_active, NkColor knob_border_color, NkColor cursor_normal, NkColor cursor_hover, NkColor cursor_active, float border, float knob_border, NkVec2 padding, NkVec2 spacing, float cursor_width, float color_factor, float disabled_factor, NkHandle userdata, NkDrawBeginCallbackI draw_begin, NkDrawEndCallbackI draw_end) Initializes this struct with the specified values.set(NkStyleKnob src) Copies the specified struct data to this struct.intsizeof()Returnssizeof(struct).spacing()Passes thespacingfield to the specifiedConsumer.Copies the specifiedNkVec2to thespacingfield.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. -
KNOB_NORMAL
public static final int KNOB_NORMALThe struct member offsets. -
KNOB_HOVER
public static final int KNOB_HOVERThe struct member offsets. -
KNOB_ACTIVE
public static final int KNOB_ACTIVEThe struct member offsets. -
KNOB_BORDER_COLOR
public static final int KNOB_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. -
CURSOR_ACTIVE
public static final int CURSOR_ACTIVEThe struct member offsets. -
BORDER
public static final int BORDERThe struct member offsets. -
KNOB_BORDER
public static final int KNOB_BORDERThe struct member offsets. -
PADDING
public static final int PADDINGThe struct member offsets. -
SPACING
public static final int SPACINGThe struct member offsets. -
CURSOR_WIDTH
public static final int CURSOR_WIDTHThe 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
-
NkStyleKnob
Creates aNkStyleKnobinstance 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<NkStyleKnob>
-
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.
-
knob_normal
- Returns:
- a
NkColorview of theknob_normalfield.
-
knob_hover
- Returns:
- a
NkColorview of theknob_hoverfield.
-
knob_active
- Returns:
- a
NkColorview of theknob_activefield.
-
knob_border_color
- Returns:
- a
NkColorview of theknob_border_colorfield.
-
cursor_normal
- Returns:
- a
NkColorview of thecursor_normalfield.
-
cursor_hover
- Returns:
- a
NkColorview of thecursor_hoverfield.
-
cursor_active
- Returns:
- a
NkColorview of thecursor_activefield.
-
border
public float border()- Returns:
- the value of the
borderfield.
-
knob_border
public float knob_border()- Returns:
- the value of the
knob_borderfield.
-
padding
- Returns:
- a
NkVec2view of thepaddingfield.
-
spacing
- Returns:
- a
NkVec2view of thespacingfield.
-
cursor_width
public float cursor_width()- Returns:
- the value of the
cursor_widthfield.
-
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. -
knob_normal
Copies the specifiedNkColorto theknob_normalfield. -
knob_normal
Passes theknob_normalfield to the specifiedConsumer. -
knob_hover
Copies the specifiedNkColorto theknob_hoverfield. -
knob_hover
Passes theknob_hoverfield to the specifiedConsumer. -
knob_active
Copies the specifiedNkColorto theknob_activefield. -
knob_active
Passes theknob_activefield to the specifiedConsumer. -
knob_border_color
Copies the specifiedNkColorto theknob_border_colorfield. -
knob_border_color
Passes theknob_border_colorfield to the specifiedConsumer. -
cursor_normal
Copies the specifiedNkColorto thecursor_normalfield. -
cursor_normal
Passes thecursor_normalfield to the specifiedConsumer. -
cursor_hover
Copies the specifiedNkColorto thecursor_hoverfield. -
cursor_hover
Passes thecursor_hoverfield to the specifiedConsumer. -
cursor_active
Copies the specifiedNkColorto thecursor_activefield. -
cursor_active
Passes thecursor_activefield to the specifiedConsumer. -
border
Sets the specified value to theborderfield. -
knob_border
Sets the specified value to theknob_borderfield. -
padding
Copies the specifiedNkVec2to thepaddingfield. -
padding
Passes thepaddingfield to the specifiedConsumer. -
spacing
Copies the specifiedNkVec2to thespacingfield. -
spacing
Passes thespacingfield to the specifiedConsumer. -
cursor_width
Sets the specified value to thecursor_widthfield. -
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 NkStyleKnob set(NkStyleItem normal, NkStyleItem hover, NkStyleItem active, NkColor border_color, NkColor knob_normal, NkColor knob_hover, NkColor knob_active, NkColor knob_border_color, NkColor cursor_normal, NkColor cursor_hover, NkColor cursor_active, float border, float knob_border, NkVec2 padding, NkVec2 spacing, float cursor_width, 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 newNkStyleKnobinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newNkStyleKnobinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newNkStyleKnobinstance allocated withBufferUtils. -
create
Returns a newNkStyleKnobinstance for the specified memory address. -
createSafe
-
malloc
Returns a newNkStyleKnob.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newNkStyleKnob.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newNkStyleKnob.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aNkStyleKnob.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
malloc
Returns a newNkStyleKnobinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newNkStyleKnobinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newNkStyleKnob.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newNkStyleKnob.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(). -
nknob_normal
Unsafe version ofknob_normal(). -
nknob_hover
Unsafe version ofknob_hover(). -
nknob_active
Unsafe version ofknob_active(). -
nknob_border_color
Unsafe version ofknob_border_color(). -
ncursor_normal
Unsafe version ofcursor_normal(). -
ncursor_hover
Unsafe version ofcursor_hover(). -
ncursor_active
Unsafe version ofcursor_active(). -
nborder
public static float nborder(long struct) Unsafe version ofborder(). -
nknob_border
public static float nknob_border(long struct) Unsafe version ofknob_border(). -
npadding
Unsafe version ofpadding(). -
nspacing
Unsafe version ofspacing(). -
ncursor_width
public static float ncursor_width(long struct) Unsafe version ofcursor_width(). -
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. -
nknob_normal
Unsafe version ofknob_normal. -
nknob_hover
Unsafe version ofknob_hover. -
nknob_active
Unsafe version ofknob_active. -
nknob_border_color
Unsafe version ofknob_border_color. -
ncursor_normal
Unsafe version ofcursor_normal. -
ncursor_hover
Unsafe version ofcursor_hover. -
ncursor_active
Unsafe version ofcursor_active. -
nborder
public static void nborder(long struct, float value) Unsafe version ofborder. -
nknob_border
public static void nknob_border(long struct, float value) Unsafe version ofknob_border. -
npadding
Unsafe version ofpadding. -
nspacing
Unsafe version ofspacing. -
ncursor_width
public static void ncursor_width(long struct, float value) Unsafe version ofcursor_width. -
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.
-