Package org.lwjgl.nuklear
Class NkStyle
- All Implemented Interfaces:
AutoCloseable,NativeResource,Pointer
struct nk_style {
struct nk_user_font * font;
struct nk_cursor * cursors[NK_CURSOR_COUNT];
struct nk_cursor * cursor_active;
struct nk_cursor * cursor_last;
int cursor_visible;
struct nk_style_text text;
struct nk_style_button button;
struct nk_style_button contextual_button;
struct nk_style_button menu_button;
struct nk_style_toggle option;
struct nk_style_toggle checkbox;
struct nk_style_selectable selectable;
struct nk_style_slider slider;
struct nk_style_knob knob;
struct nk_style_progress progress;
struct nk_style_property property;
struct nk_style_edit edit;
struct nk_style_chart chart;
struct nk_style_scrollbar scrollh;
struct nk_style_scrollbar scrollv;
struct nk_style_tab tab;
struct nk_style_combo combo;
struct nk_style_window window;
}-
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 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 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.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionNkStyle(ByteBuffer container) Creates aNkStyleinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionbutton()button(Consumer<NkStyleButton> consumer) Passes thebuttonfield to the specifiedConsumer.button(NkStyleButton value) Copies the specifiedNkStyleButtonto thebuttonfield.static NkStylecalloc()Returns a newNkStyleinstance allocated withmemCalloc.static NkStyle.Buffercalloc(int capacity) Returns a newNkStyle.Bufferinstance allocated withmemCalloc.static NkStyle.Buffercalloc(int capacity, MemoryStack stack) Returns a newNkStyle.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static NkStylecalloc(MemoryStack stack) Returns a newNkStyleinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.chart()chart(Consumer<NkStyleChart> consumer) Passes thechartfield to the specifiedConsumer.chart(NkStyleChart value) Copies the specifiedNkStyleChartto thechartfield.checkbox()checkbox(Consumer<NkStyleToggle> consumer) Passes thecheckboxfield to the specifiedConsumer.checkbox(NkStyleToggle value) Copies the specifiedNkStyleToggleto thecheckboxfield.combo()combo(Consumer<NkStyleCombo> consumer) Passes thecombofield to the specifiedConsumer.combo(NkStyleCombo value) Copies the specifiedNkStyleComboto thecombofield.contextual_button(Consumer<NkStyleButton> consumer) Passes thecontextual_buttonfield to the specifiedConsumer.contextual_button(NkStyleButton value) Copies the specifiedNkStyleButtonto thecontextual_buttonfield.static NkStylecreate()Returns a newNkStyleinstance allocated withBufferUtils.static NkStyle.Buffercreate(int capacity) Returns a newNkStyle.Bufferinstance allocated withBufferUtils.static NkStylecreate(long address) Returns a newNkStyleinstance for the specified memory address.static NkStyle.Buffercreate(long address, int capacity) Create aNkStyle.Bufferinstance at the specified memory.static @Nullable NkStylecreateSafe(long address) static @Nullable NkStyle.BuffercreateSafe(long address, int capacity) @Nullable NkCursorcursor_active(@Nullable NkCursor value) Sets the address of the specifiedNkCursorto thecursor_activefield.@Nullable NkCursorcursor_last(@Nullable NkCursor value) Sets the address of the specifiedNkCursorto thecursor_lastfield.booleancursor_visible(boolean value) Sets the specified value to thecursor_visiblefield.cursors()@Nullable NkCursorcursors(int index) Copies the address of the specifiedNkCursorat the specified index of thecursorsfield.cursors(PointerBuffer value) Copies the specifiedPointerBufferto thecursorsfield.edit()edit(Consumer<NkStyleEdit> consumer) Passes theeditfield to the specifiedConsumer.edit(NkStyleEdit value) Copies the specifiedNkStyleEditto theeditfield.@Nullable NkUserFontfont()font(@Nullable NkUserFont value) Sets the address of the specifiedNkUserFontto thefontfield.knob()knob(Consumer<NkStyleKnob> consumer) Passes theknobfield to the specifiedConsumer.knob(NkStyleKnob value) Copies the specifiedNkStyleKnobto theknobfield.static NkStylemalloc()Returns a newNkStyleinstance allocated withmemAlloc.static NkStyle.Buffermalloc(int capacity) Returns a newNkStyle.Bufferinstance allocated withmemAlloc.static NkStyle.Buffermalloc(int capacity, MemoryStack stack) Returns a newNkStyle.Bufferinstance allocated on the specifiedMemoryStack.static NkStylemalloc(MemoryStack stack) Returns a newNkStyleinstance allocated on the specifiedMemoryStack.menu_button(Consumer<NkStyleButton> consumer) Passes themenu_buttonfield to the specifiedConsumer.menu_button(NkStyleButton value) Copies the specifiedNkStyleButtonto themenu_buttonfield.static NkStyleButtonnbutton(long struct) Unsafe version ofbutton().static voidnbutton(long struct, NkStyleButton value) Unsafe version ofbutton.static NkStyleChartnchart(long struct) Unsafe version ofchart().static voidnchart(long struct, NkStyleChart value) Unsafe version ofchart.static NkStyleTogglencheckbox(long struct) Unsafe version ofcheckbox().static voidncheckbox(long struct, NkStyleToggle value) Unsafe version ofcheckbox.static NkStyleComboncombo(long struct) Unsafe version ofcombo().static voidncombo(long struct, NkStyleCombo value) Unsafe version ofcombo.static NkStyleButtonncontextual_button(long struct) Unsafe version ofcontextual_button().static voidncontextual_button(long struct, NkStyleButton value) Unsafe version ofcontextual_button.static @Nullable NkCursorncursor_active(long struct) Unsafe version ofcursor_active().static voidncursor_active(long struct, @Nullable NkCursor value) Unsafe version ofcursor_active.static @Nullable NkCursorncursor_last(long struct) Unsafe version ofcursor_last().static voidncursor_last(long struct, @Nullable NkCursor value) Unsafe version ofcursor_last.static intncursor_visible(long struct) Unsafe version ofcursor_visible().static voidncursor_visible(long struct, int value) Unsafe version ofcursor_visible.static PointerBufferncursors(long struct) Unsafe version ofcursors().static @Nullable NkCursorncursors(long struct, int index) Unsafe version ofcursors.static voidUnsafe version ofcursors.static voidncursors(long struct, PointerBuffer value) Unsafe version ofcursors.static NkStyleEditnedit(long struct) Unsafe version ofedit().static voidnedit(long struct, NkStyleEdit value) Unsafe version ofedit.static @Nullable NkUserFontnfont(long struct) Unsafe version offont().static voidnfont(long struct, @Nullable NkUserFont value) Unsafe version offont.static NkStyleKnobnknob(long struct) Unsafe version ofknob().static voidnknob(long struct, NkStyleKnob value) Unsafe version ofknob.static NkStyleButtonnmenu_button(long struct) Unsafe version ofmenu_button().static voidnmenu_button(long struct, NkStyleButton value) Unsafe version ofmenu_button.static NkStyleTogglenoption(long struct) Unsafe version ofoption().static voidnoption(long struct, NkStyleToggle value) Unsafe version ofoption.static NkStyleProgressnprogress(long struct) Unsafe version ofprogress().static voidnprogress(long struct, NkStyleProgress value) Unsafe version ofprogress.static NkStylePropertynproperty(long struct) Unsafe version ofproperty().static voidnproperty(long struct, NkStyleProperty value) Unsafe version ofproperty.static NkStyleScrollbarnscrollh(long struct) Unsafe version ofscrollh().static voidnscrollh(long struct, NkStyleScrollbar value) Unsafe version ofscrollh.static NkStyleScrollbarnscrollv(long struct) Unsafe version ofscrollv().static voidnscrollv(long struct, NkStyleScrollbar value) Unsafe version ofscrollv.static NkStyleSelectablenselectable(long struct) Unsafe version ofselectable().static voidnselectable(long struct, NkStyleSelectable value) Unsafe version ofselectable.static NkStyleSlidernslider(long struct) Unsafe version ofslider().static voidnslider(long struct, NkStyleSlider value) Unsafe version ofslider.static NkStyleTabntab(long struct) Unsafe version oftab().static voidntab(long struct, NkStyleTab value) Unsafe version oftab.static NkStyleTextntext(long struct) Unsafe version oftext().static voidntext(long struct, NkStyleText value) Unsafe version oftext.static NkStyleWindownwindow(long struct) Unsafe version ofwindow().static voidnwindow(long struct, NkStyleWindow value) Unsafe version ofwindow.option()option(Consumer<NkStyleToggle> consumer) Passes theoptionfield to the specifiedConsumer.option(NkStyleToggle value) Copies the specifiedNkStyleToggleto theoptionfield.progress()progress(Consumer<NkStyleProgress> consumer) Passes theprogressfield to the specifiedConsumer.progress(NkStyleProgress value) Copies the specifiedNkStyleProgressto theprogressfield.property()property(Consumer<NkStyleProperty> consumer) Passes thepropertyfield to the specifiedConsumer.property(NkStyleProperty value) Copies the specifiedNkStylePropertyto thepropertyfield.scrollh()scrollh(Consumer<NkStyleScrollbar> consumer) Passes thescrollhfield to the specifiedConsumer.scrollh(NkStyleScrollbar value) Copies the specifiedNkStyleScrollbarto thescrollhfield.scrollv()scrollv(Consumer<NkStyleScrollbar> consumer) Passes thescrollvfield to the specifiedConsumer.scrollv(NkStyleScrollbar value) Copies the specifiedNkStyleScrollbarto thescrollvfield.selectable(Consumer<NkStyleSelectable> consumer) Passes theselectablefield to the specifiedConsumer.selectable(NkStyleSelectable value) Copies the specifiedNkStyleSelectableto theselectablefield.set(@Nullable NkUserFont font, PointerBuffer cursors, @Nullable NkCursor cursor_active, @Nullable NkCursor cursor_last, boolean cursor_visible, NkStyleText text, NkStyleButton button, NkStyleButton contextual_button, NkStyleButton menu_button, NkStyleToggle option, NkStyleToggle checkbox, NkStyleSelectable selectable, NkStyleSlider slider, NkStyleKnob knob, NkStyleProgress progress, NkStyleProperty property, NkStyleEdit edit, NkStyleChart chart, NkStyleScrollbar scrollh, NkStyleScrollbar scrollv, NkStyleTab tab, NkStyleCombo combo, NkStyleWindow window) Initializes this struct with the specified values.Copies the specified struct data to this struct.intsizeof()Returnssizeof(struct).slider()slider(Consumer<NkStyleSlider> consumer) Passes thesliderfield to the specifiedConsumer.slider(NkStyleSlider value) Copies the specifiedNkStyleSliderto thesliderfield.tab()tab(Consumer<NkStyleTab> consumer) Passes thetabfield to the specifiedConsumer.tab(NkStyleTab value) Copies the specifiedNkStyleTabto thetabfield.text()text(Consumer<NkStyleText> consumer) Passes thetextfield to the specifiedConsumer.text(NkStyleText value) Copies the specifiedNkStyleTextto thetextfield.window()window(Consumer<NkStyleWindow> consumer) Passes thewindowfield to the specifiedConsumer.window(NkStyleWindow value) Copies the specifiedNkStyleWindowto thewindowfield.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. -
FONT
public static final int FONTThe struct member offsets. -
CURSORS
public static final int CURSORSThe struct member offsets. -
CURSOR_ACTIVE
public static final int CURSOR_ACTIVEThe struct member offsets. -
CURSOR_LAST
public static final int CURSOR_LASTThe struct member offsets. -
CURSOR_VISIBLE
public static final int CURSOR_VISIBLEThe struct member offsets. -
TEXT
public static final int TEXTThe struct member offsets. -
BUTTON
public static final int BUTTONThe struct member offsets. -
CONTEXTUAL_BUTTON
public static final int CONTEXTUAL_BUTTONThe struct member offsets. -
MENU_BUTTON
public static final int MENU_BUTTONThe struct member offsets. -
OPTION
public static final int OPTIONThe struct member offsets. -
CHECKBOX
public static final int CHECKBOXThe struct member offsets. -
SELECTABLE
public static final int SELECTABLEThe struct member offsets. -
SLIDER
public static final int SLIDERThe struct member offsets. -
KNOB
public static final int KNOBThe struct member offsets. -
PROGRESS
public static final int PROGRESSThe struct member offsets. -
PROPERTY
public static final int PROPERTYThe struct member offsets. -
EDIT
public static final int EDITThe struct member offsets. -
CHART
public static final int CHARTThe struct member offsets. -
SCROLLH
public static final int SCROLLHThe struct member offsets. -
SCROLLV
public static final int SCROLLVThe struct member offsets. -
TAB
public static final int TABThe struct member offsets. -
COMBO
public static final int COMBOThe struct member offsets. -
WINDOW
public static final int WINDOWThe struct member offsets.
-
-
Constructor Details
-
NkStyle
Creates aNkStyleinstance 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). -
font
- Returns:
- a
NkUserFontview of the struct pointed to by thefontfield.
-
cursors
- Returns:
- a
PointerBufferview of thecursorsfield.
-
cursors
- Returns:
- a
NkCursorview of the pointer at the specified index of thecursorsfield.
-
cursor_active
- Returns:
- a
NkCursorview of the struct pointed to by thecursor_activefield.
-
cursor_last
- Returns:
- a
NkCursorview of the struct pointed to by thecursor_lastfield.
-
cursor_visible
public boolean cursor_visible()- Returns:
- the value of the
cursor_visiblefield.
-
text
- Returns:
- a
NkStyleTextview of thetextfield.
-
button
- Returns:
- a
NkStyleButtonview of thebuttonfield.
-
contextual_button
- Returns:
- a
NkStyleButtonview of thecontextual_buttonfield.
-
option
- Returns:
- a
NkStyleToggleview of theoptionfield.
-
checkbox
- Returns:
- a
NkStyleToggleview of thecheckboxfield.
-
selectable
- Returns:
- a
NkStyleSelectableview of theselectablefield.
-
slider
- Returns:
- a
NkStyleSliderview of thesliderfield.
-
knob
- Returns:
- a
NkStyleKnobview of theknobfield.
-
progress
- Returns:
- a
NkStyleProgressview of theprogressfield.
-
property
- Returns:
- a
NkStylePropertyview of thepropertyfield.
-
edit
- Returns:
- a
NkStyleEditview of theeditfield.
-
chart
- Returns:
- a
NkStyleChartview of thechartfield.
-
scrollh
- Returns:
- a
NkStyleScrollbarview of thescrollhfield.
-
scrollv
- Returns:
- a
NkStyleScrollbarview of thescrollvfield.
-
tab
- Returns:
- a
NkStyleTabview of thetabfield.
-
combo
- Returns:
- a
NkStyleComboview of thecombofield.
-
window
- Returns:
- a
NkStyleWindowview of thewindowfield.
-
font
Sets the address of the specifiedNkUserFontto thefontfield. -
cursors
Copies the specifiedPointerBufferto thecursorsfield. -
cursors
Copies the address of the specifiedNkCursorat the specified index of thecursorsfield. -
cursors
-
cursor_active
Sets the address of the specifiedNkCursorto thecursor_activefield. -
cursor_last
Sets the address of the specifiedNkCursorto thecursor_lastfield. -
cursor_visible
Sets the specified value to thecursor_visiblefield. -
text
Copies the specifiedNkStyleTextto thetextfield. -
text
Passes thetextfield to the specifiedConsumer. -
button
Copies the specifiedNkStyleButtonto thebuttonfield. -
button
Passes thebuttonfield to the specifiedConsumer. -
contextual_button
Copies the specifiedNkStyleButtonto thecontextual_buttonfield. -
contextual_button
Passes thecontextual_buttonfield to the specifiedConsumer. -
option
Copies the specifiedNkStyleToggleto theoptionfield. -
option
Passes theoptionfield to the specifiedConsumer. -
checkbox
Copies the specifiedNkStyleToggleto thecheckboxfield. -
checkbox
Passes thecheckboxfield to the specifiedConsumer. -
selectable
Copies the specifiedNkStyleSelectableto theselectablefield. -
selectable
Passes theselectablefield to the specifiedConsumer. -
slider
Copies the specifiedNkStyleSliderto thesliderfield. -
slider
Passes thesliderfield to the specifiedConsumer. -
knob
Copies the specifiedNkStyleKnobto theknobfield. -
knob
Passes theknobfield to the specifiedConsumer. -
progress
Copies the specifiedNkStyleProgressto theprogressfield. -
progress
Passes theprogressfield to the specifiedConsumer. -
property
Copies the specifiedNkStylePropertyto thepropertyfield. -
property
Passes thepropertyfield to the specifiedConsumer. -
edit
Copies the specifiedNkStyleEditto theeditfield. -
edit
Passes theeditfield to the specifiedConsumer. -
chart
Copies the specifiedNkStyleChartto thechartfield. -
chart
Passes thechartfield to the specifiedConsumer. -
scrollh
Copies the specifiedNkStyleScrollbarto thescrollhfield. -
scrollh
Passes thescrollhfield to the specifiedConsumer. -
scrollv
Copies the specifiedNkStyleScrollbarto thescrollvfield. -
scrollv
Passes thescrollvfield to the specifiedConsumer. -
tab
Copies the specifiedNkStyleTabto thetabfield. -
tab
Passes thetabfield to the specifiedConsumer. -
combo
Copies the specifiedNkStyleComboto thecombofield. -
combo
Passes thecombofield to the specifiedConsumer. -
window
Copies the specifiedNkStyleWindowto thewindowfield. -
window
Passes thewindowfield to the specifiedConsumer. -
set
public NkStyle set(@Nullable NkUserFont font, PointerBuffer cursors, @Nullable NkCursor cursor_active, @Nullable NkCursor cursor_last, boolean cursor_visible, NkStyleText text, NkStyleButton button, NkStyleButton contextual_button, NkStyleButton menu_button, NkStyleToggle option, NkStyleToggle checkbox, NkStyleSelectable selectable, NkStyleSlider slider, NkStyleKnob knob, NkStyleProgress progress, NkStyleProperty property, NkStyleEdit edit, NkStyleChart chart, NkStyleScrollbar scrollh, NkStyleScrollbar scrollv, NkStyleTab tab, NkStyleCombo combo, NkStyleWindow window) 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 newNkStyleinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newNkStyleinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newNkStyleinstance allocated withBufferUtils. -
create
Returns a newNkStyleinstance for the specified memory address. -
createSafe
-
malloc
Returns a newNkStyle.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newNkStyle.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newNkStyle.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aNkStyle.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
malloc
Returns a newNkStyleinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newNkStyleinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newNkStyle.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newNkStyle.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
nfont
Unsafe version offont(). -
ncursors
Unsafe version ofcursors(). -
ncursors
Unsafe version ofcursors. -
ncursor_active
Unsafe version ofcursor_active(). -
ncursor_last
Unsafe version ofcursor_last(). -
ncursor_visible
public static int ncursor_visible(long struct) Unsafe version ofcursor_visible(). -
ntext
Unsafe version oftext(). -
nbutton
Unsafe version ofbutton(). -
ncontextual_button
Unsafe version ofcontextual_button(). -
noption
Unsafe version ofoption(). -
ncheckbox
Unsafe version ofcheckbox(). -
nselectable
Unsafe version ofselectable(). -
nslider
Unsafe version ofslider(). -
nknob
Unsafe version ofknob(). -
nprogress
Unsafe version ofprogress(). -
nproperty
Unsafe version ofproperty(). -
nedit
Unsafe version ofedit(). -
nchart
Unsafe version ofchart(). -
nscrollh
Unsafe version ofscrollh(). -
nscrollv
Unsafe version ofscrollv(). -
ntab
Unsafe version oftab(). -
ncombo
Unsafe version ofcombo(). -
nwindow
Unsafe version ofwindow(). -
nfont
Unsafe version offont. -
ncursors
Unsafe version ofcursors. -
ncursors
Unsafe version ofcursors. -
ncursor_active
Unsafe version ofcursor_active. -
ncursor_last
Unsafe version ofcursor_last. -
ncursor_visible
public static void ncursor_visible(long struct, int value) Unsafe version ofcursor_visible. -
ntext
Unsafe version oftext. -
nbutton
Unsafe version ofbutton. -
ncontextual_button
Unsafe version ofcontextual_button. -
noption
Unsafe version ofoption. -
ncheckbox
Unsafe version ofcheckbox. -
nselectable
Unsafe version ofselectable. -
nslider
Unsafe version ofslider. -
nknob
Unsafe version ofknob. -
nprogress
Unsafe version ofprogress. -
nproperty
Unsafe version ofproperty. -
nedit
Unsafe version ofedit. -
nchart
Unsafe version ofchart. -
nscrollh
Unsafe version ofscrollh. -
nscrollv
Unsafe version ofscrollv. -
ntab
Unsafe version oftab. -
ncombo
Unsafe version ofcombo. -
nwindow
Unsafe version ofwindow.
-