Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* Copyright LWJGL. All rights reserved.
* License terms: https://www.lwjgl.org/license
* MACHINE GENERATED FILE, DO NOT EDIT
*/
package org.lwjgl.nanovg;
import javax.annotation.*;
import java.nio.*;
import org.lwjgl.system.*;
import static org.lwjgl.system.Checks.*;
import static org.lwjgl.system.MemoryStack.*;
import static org.lwjgl.system.MemoryUtil.*;
/**
* Blendish is a small collection of drawing functions for NanoVG, designed to replicate the look of the Blender 2.5+ User Interface. You can use these
* functions to theme your UI library. Several metric constants for faithful reproduction are also included.
*
*
Blendish supports the original Blender icon sheet; As the licensing of Blender's icons is unclear, they are not included in Blendish'es repository, but
* an SVG template, "icons_template.svg" is provided, which you can use to build your own icon sheet.
*
*
To use icons, you must first load the icon sheet using one of the {@code nvgCreateImage*()} functions and then pass the image handle to
* {@link #bndSetIconImage SetIconImage}; otherwise, no icons will be drawn. See {@code bndSetIconImage()} for more information.
*
*
Blendish will not render text until a suitable UI font has been passed to {@link #bndSetFont SetFont} has been called. See {@code bndSetFont()} for more information.
*
*
Drawbacks
*
*
There is no support for varying dpi resolutions yet. The library is hardcoded to the equivalent of 72 dpi in the Blender system settings.
*
*
Support for label truncation is missing. Text rendering breaks when widgets are too short to contain their labels.
*/
public class Blendish {
static { LibNanoVG.initialize(); }
/** Alpha of disabled widget groups. Can be used in conjunction with {@link NanoVG#nvgGlobalAlpha GlobalAlpha}. */
public static final float BND_DISABLED_ALPHA = 0.5f;
/**
* How text on a control is aligned. ({@code BNDtextAlignment})
*
*
Enum values:
*
*
*
{@link #BND_LEFT LEFT}
*
{@link #BND_CENTER CENTER}
*
*/
public static final int
BND_LEFT = 0,
BND_CENTER = 1;
/**
* States altering the styling of a widget. ({@code BNDwidgetState})
*
*
Enum values:
*
*
*
{@link #BND_DEFAULT DEFAULT} - not interacting
*
{@link #BND_HOVER HOVER} - the mouse is hovering over the control
*
{@link #BND_ACTIVE ACTIVE} - the widget is activated (pressed) or in an active state (toggled)
*
*/
public static final int
BND_DEFAULT = 0,
BND_HOVER = 1,
BND_ACTIVE = 2;
/**
* Flags indicating which corners are sharp (for grouping widgets). ({@code BNDcornerFlags})
*
*
Enum values:
*
*
*
{@link #BND_CORNER_NONE CORNER_NONE} - all corners are round
*
{@link #BND_CORNER_TOP_LEFT CORNER_TOP_LEFT} - sharp top left corner
*
{@link #BND_CORNER_TOP_RIGHT CORNER_TOP_RIGHT} - sharp top right corner
*
{@link #BND_CORNER_DOWN_RIGHT CORNER_DOWN_RIGHT} - sharp bottom right corner
*
{@link #BND_CORNER_DOWN_LEFT CORNER_DOWN_LEFT} - sharp bottom left corner
*
{@link #BND_CORNER_ALL CORNER_ALL} - all corners are sharp; you can invert a set of flags using ^= BND_CORNER_ALL
*
{@link #BND_CORNER_TOP CORNER_TOP} - top border is sharp
*
{@link #BND_CORNER_DOWN CORNER_DOWN} - bottom border is sharp
*
{@link #BND_CORNER_LEFT CORNER_LEFT} - left border is sharp
*
{@link #BND_CORNER_RIGHT CORNER_RIGHT} - right border is sharp
The icon sheet format must be compatible to Blender 2.6's icon sheet; the order of icons does not matter. A valid icon sheet is e.g. shown at how to add an icon.
*/
public static native void bndSetIconImage(int image);
// --- [ bndSetFont ] ---
/**
* Designates an image handle as returned by {@code nvgCreateFont*()} as the themes' UI font.
*
*
Blender's original UI font Droid Sans is perfectly suited and available here.
*/
public static native void bndSetFont(int font);
// --- [ bndLabel ] ---
/** Unsafe version of: {@link #bndLabel Label} */
public static native void nbndLabel(long ctx, float x, float y, float w, float h, int iconid, long label);
/**
* Draws a label with its lower left origin at {@code (x,y)} and size of {@code (w,h)}.
*
* @param ctx the NanoVG context
* @param h widget looks best when height is {@link #BND_WIDGET_HEIGHT WIDGET_HEIGHT}
* @param iconid if ≥ 0, an icon will be added to the widget
* @param label if not {@code NULL}, a label will be added to the widget
*/
public static void bndLabel(@NativeType("NVGcontext *") long ctx, float x, float y, float w, float h, int iconid, @Nullable @NativeType("char const *") ByteBuffer label) {
if (CHECKS) {
check(ctx);
checkNT1Safe(label);
}
nbndLabel(ctx, x, y, w, h, iconid, memAddressSafe(label));
}
/**
* Draws a label with its lower left origin at {@code (x,y)} and size of {@code (w,h)}.
*
* @param ctx the NanoVG context
* @param h widget looks best when height is {@link #BND_WIDGET_HEIGHT WIDGET_HEIGHT}
* @param iconid if ≥ 0, an icon will be added to the widget
* @param label if not {@code NULL}, a label will be added to the widget
*/
public static void bndLabel(@NativeType("NVGcontext *") long ctx, float x, float y, float w, float h, int iconid, @Nullable @NativeType("char const *") CharSequence label) {
if (CHECKS) {
check(ctx);
}
MemoryStack stack = stackGet(); int stackPointer = stack.getPointer();
try {
stack.nUTF8Safe(label, true);
long labelEncoded = label == null ? NULL : stack.getPointerAddress();
nbndLabel(ctx, x, y, w, h, iconid, labelEncoded);
} finally {
stack.setPointer(stackPointer);
}
}
// --- [ bndToolButton ] ---
/** Unsafe version of: {@link #bndToolButton ToolButton} */
public static native void nbndToolButton(long ctx, float x, float y, float w, float h, int flags, int state, int iconid, long label);
/**
* Draws a tool button with its lower left origin at {@code (x,y)} and size of {@code (w,h)}.
*
* @param ctx the NanoVG context
* @param h widget looks best when height is {@link #BND_WIDGET_HEIGHT WIDGET_HEIGHT}
* @param flags the corner flags. One of:
{@link #BND_CORNER_NONE CORNER_NONE}
{@link #BND_CORNER_TOP_LEFT CORNER_TOP_LEFT}
{@link #BND_CORNER_TOP_RIGHT CORNER_TOP_RIGHT}
{@link #BND_CORNER_DOWN_RIGHT CORNER_DOWN_RIGHT}
{@link #BND_CORNER_DOWN_LEFT CORNER_DOWN_LEFT}
{@link #BND_CORNER_ALL CORNER_ALL}
{@link #BND_CORNER_TOP CORNER_TOP}
{@link #BND_CORNER_DOWN CORNER_DOWN}
{@link #BND_CORNER_LEFT CORNER_LEFT}
{@link #BND_CORNER_RIGHT CORNER_RIGHT}
* @param state the current UI state. One of:
{@link #BND_DEFAULT DEFAULT}
{@link #BND_HOVER HOVER}
{@link #BND_ACTIVE ACTIVE}
* @param iconid if ≥ 0, an icon will be added to the widget
* @param label if not {@code NULL}, a label will be added to the widget
*/
public static void bndToolButton(@NativeType("NVGcontext *") long ctx, float x, float y, float w, float h, int flags, @NativeType("BNDwidgetState") int state, int iconid, @Nullable @NativeType("char const *") ByteBuffer label) {
if (CHECKS) {
check(ctx);
checkNT1Safe(label);
}
nbndToolButton(ctx, x, y, w, h, flags, state, iconid, memAddressSafe(label));
}
/**
* Draws a tool button with its lower left origin at {@code (x,y)} and size of {@code (w,h)}.
*
* @param ctx the NanoVG context
* @param h widget looks best when height is {@link #BND_WIDGET_HEIGHT WIDGET_HEIGHT}
* @param flags the corner flags. One of:
{@link #BND_CORNER_NONE CORNER_NONE}
{@link #BND_CORNER_TOP_LEFT CORNER_TOP_LEFT}
{@link #BND_CORNER_TOP_RIGHT CORNER_TOP_RIGHT}
{@link #BND_CORNER_DOWN_RIGHT CORNER_DOWN_RIGHT}
{@link #BND_CORNER_DOWN_LEFT CORNER_DOWN_LEFT}
{@link #BND_CORNER_ALL CORNER_ALL}
{@link #BND_CORNER_TOP CORNER_TOP}
{@link #BND_CORNER_DOWN CORNER_DOWN}
{@link #BND_CORNER_LEFT CORNER_LEFT}
{@link #BND_CORNER_RIGHT CORNER_RIGHT}
* @param state the current UI state. One of:
{@link #BND_DEFAULT DEFAULT}
{@link #BND_HOVER HOVER}
{@link #BND_ACTIVE ACTIVE}
* @param iconid if ≥ 0, an icon will be added to the widget
* @param label if not {@code NULL}, a label will be added to the widget
*/
public static void bndToolButton(@NativeType("NVGcontext *") long ctx, float x, float y, float w, float h, int flags, @NativeType("BNDwidgetState") int state, int iconid, @Nullable @NativeType("char const *") CharSequence label) {
if (CHECKS) {
check(ctx);
}
MemoryStack stack = stackGet(); int stackPointer = stack.getPointer();
try {
stack.nUTF8Safe(label, true);
long labelEncoded = label == null ? NULL : stack.getPointerAddress();
nbndToolButton(ctx, x, y, w, h, flags, state, iconid, labelEncoded);
} finally {
stack.setPointer(stackPointer);
}
}
// --- [ bndRadioButton ] ---
/** Unsafe version of: {@link #bndRadioButton RadioButton} */
public static native void nbndRadioButton(long ctx, float x, float y, float w, float h, int flags, int state, int iconid, long label);
/**
* Draws a radio button with its lower left origin at {@code (x,y)} and size of {@code (w,h)}.
*
* @param ctx the NanoVG context
* @param h widget looks best when height is {@link #BND_WIDGET_HEIGHT WIDGET_HEIGHT}
* @param flags the corner flags. One of:
{@link #BND_CORNER_NONE CORNER_NONE}
{@link #BND_CORNER_TOP_LEFT CORNER_TOP_LEFT}
{@link #BND_CORNER_TOP_RIGHT CORNER_TOP_RIGHT}
{@link #BND_CORNER_DOWN_RIGHT CORNER_DOWN_RIGHT}
{@link #BND_CORNER_DOWN_LEFT CORNER_DOWN_LEFT}
{@link #BND_CORNER_ALL CORNER_ALL}
{@link #BND_CORNER_TOP CORNER_TOP}
{@link #BND_CORNER_DOWN CORNER_DOWN}
{@link #BND_CORNER_LEFT CORNER_LEFT}
{@link #BND_CORNER_RIGHT CORNER_RIGHT}
* @param state the current UI state. One of:
{@link #BND_DEFAULT DEFAULT}
{@link #BND_HOVER HOVER}
{@link #BND_ACTIVE ACTIVE}
* @param iconid if ≥ 0, an icon will be added to the widget
* @param label if not {@code NULL}, a label will be added to the widget
*/
public static void bndRadioButton(@NativeType("NVGcontext *") long ctx, float x, float y, float w, float h, int flags, @NativeType("BNDwidgetState") int state, int iconid, @Nullable @NativeType("char const *") ByteBuffer label) {
if (CHECKS) {
check(ctx);
checkNT1Safe(label);
}
nbndRadioButton(ctx, x, y, w, h, flags, state, iconid, memAddressSafe(label));
}
/**
* Draws a radio button with its lower left origin at {@code (x,y)} and size of {@code (w,h)}.
*
* @param ctx the NanoVG context
* @param h widget looks best when height is {@link #BND_WIDGET_HEIGHT WIDGET_HEIGHT}
* @param flags the corner flags. One of:
{@link #BND_CORNER_NONE CORNER_NONE}
{@link #BND_CORNER_TOP_LEFT CORNER_TOP_LEFT}
{@link #BND_CORNER_TOP_RIGHT CORNER_TOP_RIGHT}
{@link #BND_CORNER_DOWN_RIGHT CORNER_DOWN_RIGHT}
{@link #BND_CORNER_DOWN_LEFT CORNER_DOWN_LEFT}
{@link #BND_CORNER_ALL CORNER_ALL}
{@link #BND_CORNER_TOP CORNER_TOP}
{@link #BND_CORNER_DOWN CORNER_DOWN}
{@link #BND_CORNER_LEFT CORNER_LEFT}
{@link #BND_CORNER_RIGHT CORNER_RIGHT}
* @param state the current UI state. One of:
{@link #BND_DEFAULT DEFAULT}
{@link #BND_HOVER HOVER}
{@link #BND_ACTIVE ACTIVE}
* @param iconid if ≥ 0, an icon will be added to the widget
* @param label if not {@code NULL}, a label will be added to the widget
*/
public static void bndRadioButton(@NativeType("NVGcontext *") long ctx, float x, float y, float w, float h, int flags, @NativeType("BNDwidgetState") int state, int iconid, @Nullable @NativeType("char const *") CharSequence label) {
if (CHECKS) {
check(ctx);
}
MemoryStack stack = stackGet(); int stackPointer = stack.getPointer();
try {
stack.nUTF8Safe(label, true);
long labelEncoded = label == null ? NULL : stack.getPointerAddress();
nbndRadioButton(ctx, x, y, w, h, flags, state, iconid, labelEncoded);
} finally {
stack.setPointer(stackPointer);
}
}
// --- [ bndTextFieldTextPosition ] ---
/** Unsafe version of: {@link #bndTextFieldTextPosition TextFieldTextPosition} */
public static native int nbndTextFieldTextPosition(long ctx, float x, float y, float w, float h, int iconid, long text, int px, int py);
/**
* Calculates the corresponding text position for given coordinates {@code px/py} in a text field. See {@link #bndTextField TextField} for more info.
*
* @param ctx the NanoVG context
* @param iconid if ≥ 0, an icon will be added to the widget
* @param text if not {@code NULL}, text will be printed to the widget
*/
public static int bndTextFieldTextPosition(@NativeType("NVGcontext *") long ctx, float x, float y, float w, float h, int iconid, @Nullable @NativeType("char const *") ByteBuffer text, int px, int py) {
if (CHECKS) {
check(ctx);
checkNT1Safe(text);
}
return nbndTextFieldTextPosition(ctx, x, y, w, h, iconid, memAddressSafe(text), px, py);
}
/**
* Calculates the corresponding text position for given coordinates {@code px/py} in a text field. See {@link #bndTextField TextField} for more info.
*
* @param ctx the NanoVG context
* @param iconid if ≥ 0, an icon will be added to the widget
* @param text if not {@code NULL}, text will be printed to the widget
*/
public static int bndTextFieldTextPosition(@NativeType("NVGcontext *") long ctx, float x, float y, float w, float h, int iconid, @Nullable @NativeType("char const *") CharSequence text, int px, int py) {
if (CHECKS) {
check(ctx);
}
MemoryStack stack = stackGet(); int stackPointer = stack.getPointer();
try {
stack.nUTF8Safe(text, true);
long textEncoded = text == null ? NULL : stack.getPointerAddress();
return nbndTextFieldTextPosition(ctx, x, y, w, h, iconid, textEncoded, px, py);
} finally {
stack.setPointer(stackPointer);
}
}
// --- [ bndTextField ] ---
/** Unsafe version of: {@link #bndTextField TextField} */
public static native void nbndTextField(long ctx, float x, float y, float w, float h, int flags, int state, int iconid, long text, int cbegin, int cend);
/**
* Draws a text field with its lower left origin at {@code (x,y)} and size of {@code (w,h)}.
*
* @param ctx the NanoVG context
* @param h widget looks best when height is {@link #BND_WIDGET_HEIGHT WIDGET_HEIGHT}
* @param flags the corner flags. One of:
{@link #BND_CORNER_NONE CORNER_NONE}
{@link #BND_CORNER_TOP_LEFT CORNER_TOP_LEFT}
{@link #BND_CORNER_TOP_RIGHT CORNER_TOP_RIGHT}
{@link #BND_CORNER_DOWN_RIGHT CORNER_DOWN_RIGHT}
{@link #BND_CORNER_DOWN_LEFT CORNER_DOWN_LEFT}
{@link #BND_CORNER_ALL CORNER_ALL}
{@link #BND_CORNER_TOP CORNER_TOP}
{@link #BND_CORNER_DOWN CORNER_DOWN}
{@link #BND_CORNER_LEFT CORNER_LEFT}
{@link #BND_CORNER_RIGHT CORNER_RIGHT}
* @param state the current UI state. One of:
{@link #BND_DEFAULT DEFAULT}
{@link #BND_HOVER HOVER}
{@link #BND_ACTIVE ACTIVE}
* @param iconid if ≥ 0, an icon will be added to the widget
* @param text if not {@code NULL}, text will be printed to the widget
* @param cbegin must be ≥ 0 and ≤ {@code strlen(text)} and denotes the beginning of the caret
* @param cend must be ≥ {@code cbegin} and ≤ {@code strlen(text)} and denotes the end of the caret. If {@code cend} < {@code cbegin}, then no caret will
* be drawn.
*/
public static void bndTextField(@NativeType("NVGcontext *") long ctx, float x, float y, float w, float h, int flags, @NativeType("BNDwidgetState") int state, int iconid, @Nullable @NativeType("char const *") ByteBuffer text, int cbegin, int cend) {
if (CHECKS) {
check(ctx);
checkNT1Safe(text);
}
nbndTextField(ctx, x, y, w, h, flags, state, iconid, memAddressSafe(text), cbegin, cend);
}
/**
* Draws a text field with its lower left origin at {@code (x,y)} and size of {@code (w,h)}.
*
* @param ctx the NanoVG context
* @param h widget looks best when height is {@link #BND_WIDGET_HEIGHT WIDGET_HEIGHT}
* @param flags the corner flags. One of:
{@link #BND_CORNER_NONE CORNER_NONE}
{@link #BND_CORNER_TOP_LEFT CORNER_TOP_LEFT}
{@link #BND_CORNER_TOP_RIGHT CORNER_TOP_RIGHT}
{@link #BND_CORNER_DOWN_RIGHT CORNER_DOWN_RIGHT}
{@link #BND_CORNER_DOWN_LEFT CORNER_DOWN_LEFT}
{@link #BND_CORNER_ALL CORNER_ALL}
{@link #BND_CORNER_TOP CORNER_TOP}
{@link #BND_CORNER_DOWN CORNER_DOWN}
{@link #BND_CORNER_LEFT CORNER_LEFT}
{@link #BND_CORNER_RIGHT CORNER_RIGHT}
* @param state the current UI state. One of:
{@link #BND_DEFAULT DEFAULT}
{@link #BND_HOVER HOVER}
{@link #BND_ACTIVE ACTIVE}
* @param iconid if ≥ 0, an icon will be added to the widget
* @param text if not {@code NULL}, text will be printed to the widget
* @param cbegin must be ≥ 0 and ≤ {@code strlen(text)} and denotes the beginning of the caret
* @param cend must be ≥ {@code cbegin} and ≤ {@code strlen(text)} and denotes the end of the caret. If {@code cend} < {@code cbegin}, then no caret will
* be drawn.
*/
public static void bndTextField(@NativeType("NVGcontext *") long ctx, float x, float y, float w, float h, int flags, @NativeType("BNDwidgetState") int state, int iconid, @Nullable @NativeType("char const *") CharSequence text, int cbegin, int cend) {
if (CHECKS) {
check(ctx);
}
MemoryStack stack = stackGet(); int stackPointer = stack.getPointer();
try {
stack.nUTF8Safe(text, true);
long textEncoded = text == null ? NULL : stack.getPointerAddress();
nbndTextField(ctx, x, y, w, h, flags, state, iconid, textEncoded, cbegin, cend);
} finally {
stack.setPointer(stackPointer);
}
}
// --- [ bndOptionButton ] ---
/** Unsafe version of: {@link #bndOptionButton OptionButton} */
public static native void nbndOptionButton(long ctx, float x, float y, float w, float h, int state, long label);
/**
* Draws an option button with its lower left origin at {@code (x,y)} and size of {@code (w,h)}.
*
* @param ctx the NanoVG context
* @param h widget looks best when height is {@link #BND_WIDGET_HEIGHT WIDGET_HEIGHT}
* @param state the current UI state. One of:
{@link #BND_DEFAULT DEFAULT}
{@link #BND_HOVER HOVER}
{@link #BND_ACTIVE ACTIVE}
* @param label if not {@code NULL}, a label will be added to the widget
*/
public static void bndOptionButton(@NativeType("NVGcontext *") long ctx, float x, float y, float w, float h, @NativeType("BNDwidgetState") int state, @Nullable @NativeType("char const *") ByteBuffer label) {
if (CHECKS) {
check(ctx);
checkNT1Safe(label);
}
nbndOptionButton(ctx, x, y, w, h, state, memAddressSafe(label));
}
/**
* Draws an option button with its lower left origin at {@code (x,y)} and size of {@code (w,h)}.
*
* @param ctx the NanoVG context
* @param h widget looks best when height is {@link #BND_WIDGET_HEIGHT WIDGET_HEIGHT}
* @param state the current UI state. One of:
{@link #BND_DEFAULT DEFAULT}
{@link #BND_HOVER HOVER}
{@link #BND_ACTIVE ACTIVE}
* @param label if not {@code NULL}, a label will be added to the widget
*/
public static void bndOptionButton(@NativeType("NVGcontext *") long ctx, float x, float y, float w, float h, @NativeType("BNDwidgetState") int state, @Nullable @NativeType("char const *") CharSequence label) {
if (CHECKS) {
check(ctx);
}
MemoryStack stack = stackGet(); int stackPointer = stack.getPointer();
try {
stack.nUTF8Safe(label, true);
long labelEncoded = label == null ? NULL : stack.getPointerAddress();
nbndOptionButton(ctx, x, y, w, h, state, labelEncoded);
} finally {
stack.setPointer(stackPointer);
}
}
// --- [ bndChoiceButton ] ---
/** Unsafe version of: {@link #bndChoiceButton ChoiceButton} */
public static native void nbndChoiceButton(long ctx, float x, float y, float w, float h, int flags, int state, int iconid, long label);
/**
* Draws a choice button with its lower left origin at {@code (x,y)} and size of {@code (w,h)}.
*
* @param ctx the NanoVG context
* @param h widget looks best when height is {@link #BND_WIDGET_HEIGHT WIDGET_HEIGHT}
* @param flags the corner flags. One of:
{@link #BND_CORNER_NONE CORNER_NONE}
{@link #BND_CORNER_TOP_LEFT CORNER_TOP_LEFT}
{@link #BND_CORNER_TOP_RIGHT CORNER_TOP_RIGHT}
{@link #BND_CORNER_DOWN_RIGHT CORNER_DOWN_RIGHT}
{@link #BND_CORNER_DOWN_LEFT CORNER_DOWN_LEFT}
{@link #BND_CORNER_ALL CORNER_ALL}
{@link #BND_CORNER_TOP CORNER_TOP}
{@link #BND_CORNER_DOWN CORNER_DOWN}
{@link #BND_CORNER_LEFT CORNER_LEFT}
{@link #BND_CORNER_RIGHT CORNER_RIGHT}
* @param state the current UI state. One of:
{@link #BND_DEFAULT DEFAULT}
{@link #BND_HOVER HOVER}
{@link #BND_ACTIVE ACTIVE}
* @param iconid if ≥ 0, an icon will be added to the widget
* @param label if not {@code NULL}, a label will be added to the widget
*/
public static void bndChoiceButton(@NativeType("NVGcontext *") long ctx, float x, float y, float w, float h, int flags, @NativeType("BNDwidgetState") int state, int iconid, @Nullable @NativeType("char const *") ByteBuffer label) {
if (CHECKS) {
check(ctx);
checkNT1Safe(label);
}
nbndChoiceButton(ctx, x, y, w, h, flags, state, iconid, memAddressSafe(label));
}
/**
* Draws a choice button with its lower left origin at {@code (x,y)} and size of {@code (w,h)}.
*
* @param ctx the NanoVG context
* @param h widget looks best when height is {@link #BND_WIDGET_HEIGHT WIDGET_HEIGHT}
* @param flags the corner flags. One of:
{@link #BND_CORNER_NONE CORNER_NONE}
{@link #BND_CORNER_TOP_LEFT CORNER_TOP_LEFT}
{@link #BND_CORNER_TOP_RIGHT CORNER_TOP_RIGHT}
{@link #BND_CORNER_DOWN_RIGHT CORNER_DOWN_RIGHT}
{@link #BND_CORNER_DOWN_LEFT CORNER_DOWN_LEFT}
{@link #BND_CORNER_ALL CORNER_ALL}
{@link #BND_CORNER_TOP CORNER_TOP}
{@link #BND_CORNER_DOWN CORNER_DOWN}
{@link #BND_CORNER_LEFT CORNER_LEFT}
{@link #BND_CORNER_RIGHT CORNER_RIGHT}
* @param state the current UI state. One of:
{@link #BND_DEFAULT DEFAULT}
{@link #BND_HOVER HOVER}
{@link #BND_ACTIVE ACTIVE}
* @param iconid if ≥ 0, an icon will be added to the widget
* @param label if not {@code NULL}, a label will be added to the widget
*/
public static void bndChoiceButton(@NativeType("NVGcontext *") long ctx, float x, float y, float w, float h, int flags, @NativeType("BNDwidgetState") int state, int iconid, @Nullable @NativeType("char const *") CharSequence label) {
if (CHECKS) {
check(ctx);
}
MemoryStack stack = stackGet(); int stackPointer = stack.getPointer();
try {
stack.nUTF8Safe(label, true);
long labelEncoded = label == null ? NULL : stack.getPointerAddress();
nbndChoiceButton(ctx, x, y, w, h, flags, state, iconid, labelEncoded);
} finally {
stack.setPointer(stackPointer);
}
}
// --- [ bndColorButton ] ---
/** Unsafe version of: {@link #bndColorButton ColorButton} */
public static native void nbndColorButton(long ctx, float x, float y, float w, float h, int flags, long color);
/**
* Draws a color button with its lower left origin at {@code (x,y)} and size of {@code (w,h)}.
*
* @param ctx the NanoVG context
* @param h widget looks best when height is {@link #BND_WIDGET_HEIGHT WIDGET_HEIGHT}
* @param flags the corner flags. One of:
{@link #BND_CORNER_NONE CORNER_NONE}
{@link #BND_CORNER_TOP_LEFT CORNER_TOP_LEFT}
{@link #BND_CORNER_TOP_RIGHT CORNER_TOP_RIGHT}
{@link #BND_CORNER_DOWN_RIGHT CORNER_DOWN_RIGHT}
{@link #BND_CORNER_DOWN_LEFT CORNER_DOWN_LEFT}
{@link #BND_CORNER_ALL CORNER_ALL}
{@link #BND_CORNER_TOP CORNER_TOP}
{@link #BND_CORNER_DOWN CORNER_DOWN}
{@link #BND_CORNER_LEFT CORNER_LEFT}
{@link #BND_CORNER_RIGHT CORNER_RIGHT}
*/
public static void bndColorButton(@NativeType("NVGcontext *") long ctx, float x, float y, float w, float h, int flags, @NativeType("NVGcolor") NVGColor color) {
if (CHECKS) {
check(ctx);
}
nbndColorButton(ctx, x, y, w, h, flags, color.address());
}
// --- [ bndNumberField ] ---
/** Unsafe version of: {@link #bndNumberField NumberField} */
public static native void nbndNumberField(long ctx, float x, float y, float w, float h, int flags, int state, long label, long value);
/**
* Draws a number field with its lower left origin at {@code (x,y)} and size of {@code (w,h)}.
*
* @param ctx the NanoVG context
* @param h widget looks best when height is {@link #BND_WIDGET_HEIGHT WIDGET_HEIGHT}
* @param flags the corner flags. One of:
{@link #BND_CORNER_NONE CORNER_NONE}
{@link #BND_CORNER_TOP_LEFT CORNER_TOP_LEFT}
{@link #BND_CORNER_TOP_RIGHT CORNER_TOP_RIGHT}
{@link #BND_CORNER_DOWN_RIGHT CORNER_DOWN_RIGHT}
{@link #BND_CORNER_DOWN_LEFT CORNER_DOWN_LEFT}
{@link #BND_CORNER_ALL CORNER_ALL}
{@link #BND_CORNER_TOP CORNER_TOP}
{@link #BND_CORNER_DOWN CORNER_DOWN}
{@link #BND_CORNER_LEFT CORNER_LEFT}
{@link #BND_CORNER_RIGHT CORNER_RIGHT}
* @param state the current UI state. One of:
{@link #BND_DEFAULT DEFAULT}
{@link #BND_HOVER HOVER}
{@link #BND_ACTIVE ACTIVE}
* @param label if not {@code NULL}, a label will be added to the widget
* @param value if not {@code NULL}, a value will be added to the widget along with a ":" separator
*/
public static void bndNumberField(@NativeType("NVGcontext *") long ctx, float x, float y, float w, float h, int flags, @NativeType("BNDwidgetState") int state, @Nullable @NativeType("char const *") ByteBuffer label, @Nullable @NativeType("char const *") ByteBuffer value) {
if (CHECKS) {
check(ctx);
checkNT1Safe(label);
checkNT1Safe(value);
}
nbndNumberField(ctx, x, y, w, h, flags, state, memAddressSafe(label), memAddressSafe(value));
}
/**
* Draws a number field with its lower left origin at {@code (x,y)} and size of {@code (w,h)}.
*
* @param ctx the NanoVG context
* @param h widget looks best when height is {@link #BND_WIDGET_HEIGHT WIDGET_HEIGHT}
* @param flags the corner flags. One of:
{@link #BND_CORNER_NONE CORNER_NONE}
{@link #BND_CORNER_TOP_LEFT CORNER_TOP_LEFT}
{@link #BND_CORNER_TOP_RIGHT CORNER_TOP_RIGHT}
{@link #BND_CORNER_DOWN_RIGHT CORNER_DOWN_RIGHT}
{@link #BND_CORNER_DOWN_LEFT CORNER_DOWN_LEFT}
{@link #BND_CORNER_ALL CORNER_ALL}
{@link #BND_CORNER_TOP CORNER_TOP}
{@link #BND_CORNER_DOWN CORNER_DOWN}
{@link #BND_CORNER_LEFT CORNER_LEFT}
{@link #BND_CORNER_RIGHT CORNER_RIGHT}
* @param state the current UI state. One of:
{@link #BND_DEFAULT DEFAULT}
{@link #BND_HOVER HOVER}
{@link #BND_ACTIVE ACTIVE}
* @param label if not {@code NULL}, a label will be added to the widget
* @param value if not {@code NULL}, a value will be added to the widget along with a ":" separator
*/
public static void bndNumberField(@NativeType("NVGcontext *") long ctx, float x, float y, float w, float h, int flags, @NativeType("BNDwidgetState") int state, @Nullable @NativeType("char const *") CharSequence label, @Nullable @NativeType("char const *") CharSequence value) {
if (CHECKS) {
check(ctx);
}
MemoryStack stack = stackGet(); int stackPointer = stack.getPointer();
try {
stack.nUTF8Safe(label, true);
long labelEncoded = label == null ? NULL : stack.getPointerAddress();
stack.nUTF8Safe(value, true);
long valueEncoded = value == null ? NULL : stack.getPointerAddress();
nbndNumberField(ctx, x, y, w, h, flags, state, labelEncoded, valueEncoded);
} finally {
stack.setPointer(stackPointer);
}
}
// --- [ bndSlider ] ---
/** Unsafe version of: {@link #bndSlider Slider} */
public static native void nbndSlider(long ctx, float x, float y, float w, float h, int flags, int state, float progress, long label, long value);
/**
* Draws slider control with its lower left origin at {@code (x,y)} and size of {@code (w,h)}.
*
* @param ctx the NanoVG context
* @param h widget looks best when height is {@link #BND_WIDGET_HEIGHT WIDGET_HEIGHT}
* @param flags the corner flags. One of:
{@link #BND_CORNER_NONE CORNER_NONE}
{@link #BND_CORNER_TOP_LEFT CORNER_TOP_LEFT}
{@link #BND_CORNER_TOP_RIGHT CORNER_TOP_RIGHT}
{@link #BND_CORNER_DOWN_RIGHT CORNER_DOWN_RIGHT}
{@link #BND_CORNER_DOWN_LEFT CORNER_DOWN_LEFT}
{@link #BND_CORNER_ALL CORNER_ALL}
{@link #BND_CORNER_TOP CORNER_TOP}
{@link #BND_CORNER_DOWN CORNER_DOWN}
{@link #BND_CORNER_LEFT CORNER_LEFT}
{@link #BND_CORNER_RIGHT CORNER_RIGHT}
* @param state the current UI state. One of:
{@link #BND_DEFAULT DEFAULT}
{@link #BND_HOVER HOVER}
{@link #BND_ACTIVE ACTIVE}
* @param progress must be in the range {@code 0..1} and controls the size of the slider bar
* @param label if not {@code NULL}, a label will be added to the widget
* @param value if not {@code NULL}, a value will be added to the widget along with a ":" separator
*/
public static void bndSlider(@NativeType("NVGcontext *") long ctx, float x, float y, float w, float h, int flags, @NativeType("BNDwidgetState") int state, float progress, @Nullable @NativeType("char const *") ByteBuffer label, @Nullable @NativeType("char const *") ByteBuffer value) {
if (CHECKS) {
check(ctx);
checkNT1Safe(label);
checkNT1Safe(value);
}
nbndSlider(ctx, x, y, w, h, flags, state, progress, memAddressSafe(label), memAddressSafe(value));
}
/**
* Draws slider control with its lower left origin at {@code (x,y)} and size of {@code (w,h)}.
*
* @param ctx the NanoVG context
* @param h widget looks best when height is {@link #BND_WIDGET_HEIGHT WIDGET_HEIGHT}
* @param flags the corner flags. One of:
{@link #BND_CORNER_NONE CORNER_NONE}
{@link #BND_CORNER_TOP_LEFT CORNER_TOP_LEFT}
{@link #BND_CORNER_TOP_RIGHT CORNER_TOP_RIGHT}
{@link #BND_CORNER_DOWN_RIGHT CORNER_DOWN_RIGHT}
{@link #BND_CORNER_DOWN_LEFT CORNER_DOWN_LEFT}
{@link #BND_CORNER_ALL CORNER_ALL}
{@link #BND_CORNER_TOP CORNER_TOP}
{@link #BND_CORNER_DOWN CORNER_DOWN}
{@link #BND_CORNER_LEFT CORNER_LEFT}
{@link #BND_CORNER_RIGHT CORNER_RIGHT}
* @param state the current UI state. One of:
{@link #BND_DEFAULT DEFAULT}
{@link #BND_HOVER HOVER}
{@link #BND_ACTIVE ACTIVE}
* @param progress must be in the range {@code 0..1} and controls the size of the slider bar
* @param label if not {@code NULL}, a label will be added to the widget
* @param value if not {@code NULL}, a value will be added to the widget along with a ":" separator
*/
public static void bndSlider(@NativeType("NVGcontext *") long ctx, float x, float y, float w, float h, int flags, @NativeType("BNDwidgetState") int state, float progress, @Nullable @NativeType("char const *") CharSequence label, @Nullable @NativeType("char const *") CharSequence value) {
if (CHECKS) {
check(ctx);
}
MemoryStack stack = stackGet(); int stackPointer = stack.getPointer();
try {
stack.nUTF8Safe(label, true);
long labelEncoded = label == null ? NULL : stack.getPointerAddress();
stack.nUTF8Safe(value, true);
long valueEncoded = value == null ? NULL : stack.getPointerAddress();
nbndSlider(ctx, x, y, w, h, flags, state, progress, labelEncoded, valueEncoded);
} finally {
stack.setPointer(stackPointer);
}
}
// --- [ bndScrollBar ] ---
/** Unsafe version of: {@link #bndScrollBar ScrollBar} */
public static native void nbndScrollBar(long ctx, float x, float y, float w, float h, int state, float offset, float size);
/**
* Draws scrollbar with its lower left origin at {@code (x,y)} and size of {@code (w,h)}.
*
* @param ctx the NanoVG context
* @param w vertical widget looks best when width is {@link #BND_SCROLLBAR_WIDTH SCROLLBAR_WIDTH}
* @param h horizontal widget looks best when height is {@link #BND_SCROLLBAR_HEIGHT SCROLLBAR_HEIGHT}
* @param state the current UI state. One of:
{@link #BND_DEFAULT DEFAULT}
{@link #BND_HOVER HOVER}
{@link #BND_ACTIVE ACTIVE}
* @param offset is in the range {@code 0..1} and controls the position of the scroll handle
* @param size is in the range {@code 0..1} and controls the size of the scroll handle
*/
public static void bndScrollBar(@NativeType("NVGcontext *") long ctx, float x, float y, float w, float h, @NativeType("BNDwidgetState") int state, float offset, float size) {
if (CHECKS) {
check(ctx);
}
nbndScrollBar(ctx, x, y, w, h, state, offset, size);
}
// --- [ bndMenuBackground ] ---
/** Unsafe version of: {@link #bndMenuBackground MenuBackground} */
public static native void nbndMenuBackground(long ctx, float x, float y, float w, float h, int flags);
/**
* Draws a menu background with its lower left origin at {@code (x,y)} and size of {@code (w,h)}.
*
* @param ctx the NanoVG context
* @param flags the corner flags. One of:
{@link #BND_CORNER_NONE CORNER_NONE}
{@link #BND_CORNER_TOP_LEFT CORNER_TOP_LEFT}
{@link #BND_CORNER_TOP_RIGHT CORNER_TOP_RIGHT}
{@link #BND_CORNER_DOWN_RIGHT CORNER_DOWN_RIGHT}
{@link #BND_CORNER_DOWN_LEFT CORNER_DOWN_LEFT}
{@link #BND_CORNER_ALL CORNER_ALL}
{@link #BND_CORNER_TOP CORNER_TOP}
{@link #BND_CORNER_DOWN CORNER_DOWN}
{@link #BND_CORNER_LEFT CORNER_LEFT}
{@link #BND_CORNER_RIGHT CORNER_RIGHT}
*/
public static void bndMenuBackground(@NativeType("NVGcontext *") long ctx, float x, float y, float w, float h, int flags) {
if (CHECKS) {
check(ctx);
}
nbndMenuBackground(ctx, x, y, w, h, flags);
}
// --- [ bndMenuLabel ] ---
/** Unsafe version of: {@link #bndMenuLabel MenuLabel} */
public static native void nbndMenuLabel(long ctx, float x, float y, float w, float h, int iconid, long label);
/**
* Draws a menu label with its lower left origin at {@code (x,y)} and size of {@code (w,h)}.
*
* @param ctx the NanoVG context
* @param h widget looks best when height is {@link #BND_WIDGET_HEIGHT WIDGET_HEIGHT}
* @param iconid if ≥ 0, an icon will be added to the widget
* @param label if not {@code NULL}, a label will be added to the widget
*/
public static void bndMenuLabel(@NativeType("NVGcontext *") long ctx, float x, float y, float w, float h, int iconid, @Nullable @NativeType("char const *") ByteBuffer label) {
if (CHECKS) {
check(ctx);
checkNT1Safe(label);
}
nbndMenuLabel(ctx, x, y, w, h, iconid, memAddressSafe(label));
}
/**
* Draws a menu label with its lower left origin at {@code (x,y)} and size of {@code (w,h)}.
*
* @param ctx the NanoVG context
* @param h widget looks best when height is {@link #BND_WIDGET_HEIGHT WIDGET_HEIGHT}
* @param iconid if ≥ 0, an icon will be added to the widget
* @param label if not {@code NULL}, a label will be added to the widget
*/
public static void bndMenuLabel(@NativeType("NVGcontext *") long ctx, float x, float y, float w, float h, int iconid, @Nullable @NativeType("char const *") CharSequence label) {
if (CHECKS) {
check(ctx);
}
MemoryStack stack = stackGet(); int stackPointer = stack.getPointer();
try {
stack.nUTF8Safe(label, true);
long labelEncoded = label == null ? NULL : stack.getPointerAddress();
nbndMenuLabel(ctx, x, y, w, h, iconid, labelEncoded);
} finally {
stack.setPointer(stackPointer);
}
}
// --- [ bndMenuItem ] ---
/** Unsafe version of: {@link #bndMenuItem MenuItem} */
public static native void nbndMenuItem(long ctx, float x, float y, float w, float h, int state, int iconid, long label);
/**
* Draws a menu item with its lower left origin at {@code (x,y)} and size of {@code (w,h)}.
*
* @param ctx the NanoVG context
* @param h widget looks best when height is {@link #BND_WIDGET_HEIGHT WIDGET_HEIGHT}
* @param state the current UI state. One of:
{@link #BND_DEFAULT DEFAULT}
{@link #BND_HOVER HOVER}
{@link #BND_ACTIVE ACTIVE}
* @param iconid if ≥ 0, an icon will be added to the widget
* @param label if not {@code NULL}, a label will be added to the widget
*/
public static void bndMenuItem(@NativeType("NVGcontext *") long ctx, float x, float y, float w, float h, @NativeType("BNDwidgetState") int state, int iconid, @Nullable @NativeType("char const *") ByteBuffer label) {
if (CHECKS) {
check(ctx);
checkNT1Safe(label);
}
nbndMenuItem(ctx, x, y, w, h, state, iconid, memAddressSafe(label));
}
/**
* Draws a menu item with its lower left origin at {@code (x,y)} and size of {@code (w,h)}.
*
* @param ctx the NanoVG context
* @param h widget looks best when height is {@link #BND_WIDGET_HEIGHT WIDGET_HEIGHT}
* @param state the current UI state. One of:
{@link #BND_DEFAULT DEFAULT}
{@link #BND_HOVER HOVER}
{@link #BND_ACTIVE ACTIVE}
* @param iconid if ≥ 0, an icon will be added to the widget
* @param label if not {@code NULL}, a label will be added to the widget
*/
public static void bndMenuItem(@NativeType("NVGcontext *") long ctx, float x, float y, float w, float h, @NativeType("BNDwidgetState") int state, int iconid, @Nullable @NativeType("char const *") CharSequence label) {
if (CHECKS) {
check(ctx);
}
MemoryStack stack = stackGet(); int stackPointer = stack.getPointer();
try {
stack.nUTF8Safe(label, true);
long labelEncoded = label == null ? NULL : stack.getPointerAddress();
nbndMenuItem(ctx, x, y, w, h, state, iconid, labelEncoded);
} finally {
stack.setPointer(stackPointer);
}
}
// --- [ bndTooltipBackground ] ---
/** Unsafe version of: {@link #bndTooltipBackground TooltipBackground} */
public static native void nbndTooltipBackground(long ctx, float x, float y, float w, float h);
/**
* Draws a tooltip background with its lower left origin at {@code (x,y)} and size of {@code (w,h)}.
*
* @param ctx the NanoVG context
*/
public static void bndTooltipBackground(@NativeType("NVGcontext *") long ctx, float x, float y, float w, float h) {
if (CHECKS) {
check(ctx);
}
nbndTooltipBackground(ctx, x, y, w, h);
}
// --- [ bndNodePort ] ---
/** Unsafe version of: {@link #bndNodePort NodePort} */
public static native void nbndNodePort(long ctx, float x, float y, int state, long color);
/**
* Draws a node port at the given position filled with the given color.
*
* @param ctx the NanoVG context
* @param state the current UI state. One of:
{@link #BND_DEFAULT DEFAULT}
{@link #BND_HOVER HOVER}
{@link #BND_ACTIVE ACTIVE}
*/
public static void bndNodePort(@NativeType("NVGcontext *") long ctx, float x, float y, @NativeType("BNDwidgetState") int state, @NativeType("NVGcolor") NVGColor color) {
if (CHECKS) {
check(ctx);
}
nbndNodePort(ctx, x, y, state, color.address());
}
// --- [ bndNodeWire ] ---
/** Unsafe version of: {@link #bndNodeWire NodeWire} */
public static native void nbndNodeWire(long ctx, float x0, float y0, float x1, float y1, int state0, int state1);
/**
* Draws a node wire originating at {@code (x0,y0)} and floating to {@code (x1,y1)}, with a colored gradient based on the states {@code state0} and
* {@code state1}:
*
*
*
{@link #BND_DEFAULT DEFAULT}: default wire color
*
{@link #BND_HOVER HOVER}: selected wire color
*
{@link #BND_ACTIVE ACTIVE}: dragged wire color
*
*
* @param ctx the NanoVG context
* @param state0 origin wire color. One of:
{@link #BND_DEFAULT DEFAULT}
{@link #BND_HOVER HOVER}
{@link #BND_ACTIVE ACTIVE}
* @param state1 ending wire color. One of:
{@link #BND_DEFAULT DEFAULT}
{@link #BND_HOVER HOVER}
{@link #BND_ACTIVE ACTIVE}
*/
public static void bndNodeWire(@NativeType("NVGcontext *") long ctx, float x0, float y0, float x1, float y1, @NativeType("BNDwidgetState") int state0, @NativeType("BNDwidgetState") int state1) {
if (CHECKS) {
check(ctx);
}
nbndNodeWire(ctx, x0, y0, x1, y1, state0, state1);
}
// --- [ bndColoredNodeWire ] ---
/** Unsafe version of: {@link #bndColoredNodeWire ColoredNodeWire} */
public static native void nbndColoredNodeWire(long ctx, float x0, float y0, float x1, float y1, long color0, long color1);
/**
* Draws a node wire originating at {@code (x0,y0)} and floating to {@code (x1,y1)}, with a colored gradient based on the two colors {@code color0} and
* {@code color1}.
*
* @param ctx the NanoVG context
*/
public static void bndColoredNodeWire(@NativeType("NVGcontext *") long ctx, float x0, float y0, float x1, float y1, @NativeType("NVGcolor") NVGColor color0, @NativeType("NVGcolor") NVGColor color1) {
if (CHECKS) {
check(ctx);
}
nbndColoredNodeWire(ctx, x0, y0, x1, y1, color0.address(), color1.address());
}
// --- [ bndNodeBackground ] ---
/** Unsafe version of: {@link #bndNodeBackground NodeBackground} */
public static native void nbndNodeBackground(long ctx, float x, float y, float w, float h, int state, int iconid, long label, long titleColor);
/**
* Draws a node background with its upper left origin at {@code (x,y)} and size of {@code (w,h)}.
*
* @param ctx the NanoVG context
* @param state the current UI state. One of:
{@link #BND_DEFAULT DEFAULT}
{@link #BND_HOVER HOVER}
{@link #BND_ACTIVE ACTIVE}
* @param iconid if ≥ 0, an icon will be added to the widget
* @param label if not {@code NULL}, a label will be added to the widget
* @param titleColor provides the base color for the title bar
*/
public static void bndNodeBackground(@NativeType("NVGcontext *") long ctx, float x, float y, float w, float h, @NativeType("BNDwidgetState") int state, int iconid, @Nullable @NativeType("char const *") ByteBuffer label, @NativeType("NVGcolor") NVGColor titleColor) {
if (CHECKS) {
check(ctx);
checkNT1Safe(label);
}
nbndNodeBackground(ctx, x, y, w, h, state, iconid, memAddressSafe(label), titleColor.address());
}
/**
* Draws a node background with its upper left origin at {@code (x,y)} and size of {@code (w,h)}.
*
* @param ctx the NanoVG context
* @param state the current UI state. One of:
{@link #BND_DEFAULT DEFAULT}
{@link #BND_HOVER HOVER}
{@link #BND_ACTIVE ACTIVE}
* @param iconid if ≥ 0, an icon will be added to the widget
* @param label if not {@code NULL}, a label will be added to the widget
* @param titleColor provides the base color for the title bar
*/
public static void bndNodeBackground(@NativeType("NVGcontext *") long ctx, float x, float y, float w, float h, @NativeType("BNDwidgetState") int state, int iconid, @Nullable @NativeType("char const *") CharSequence label, @NativeType("NVGcolor") NVGColor titleColor) {
if (CHECKS) {
check(ctx);
}
MemoryStack stack = stackGet(); int stackPointer = stack.getPointer();
try {
stack.nUTF8Safe(label, true);
long labelEncoded = label == null ? NULL : stack.getPointerAddress();
nbndNodeBackground(ctx, x, y, w, h, state, iconid, labelEncoded, titleColor.address());
} finally {
stack.setPointer(stackPointer);
}
}
// --- [ bndSplitterWidgets ] ---
/** Unsafe version of: {@link #bndSplitterWidgets SplitterWidgets} */
public static native void nbndSplitterWidgets(long ctx, float x, float y, float w, float h);
/**
* Draws a window with the upper right and lower left splitter widgets into the rectangle at origin {@code (x,y)} and size {@code (w, h)}.
*
* @param ctx the NanoVG context
*/
public static void bndSplitterWidgets(@NativeType("NVGcontext *") long ctx, float x, float y, float w, float h) {
if (CHECKS) {
check(ctx);
}
nbndSplitterWidgets(ctx, x, y, w, h);
}
// --- [ bndJoinAreaOverlay ] ---
/** Unsafe version of: {@link #bndJoinAreaOverlay JoinAreaOverlay} */
public static native void nbndJoinAreaOverlay(long ctx, float x, float y, float w, float h, int vertical, int mirror);
/**
* Draws the join area overlay stencil into the rectangle at origin {@code (x,y)} and size {@code (w,h)}.
*
* @param ctx the NanoVG context
* @param vertical is 0 or 1 and designates the arrow orientation
* @param mirror is 0 or 1 and flips the arrow side
*/
public static void bndJoinAreaOverlay(@NativeType("NVGcontext *") long ctx, float x, float y, float w, float h, @NativeType("int") boolean vertical, @NativeType("int") boolean mirror) {
if (CHECKS) {
check(ctx);
}
nbndJoinAreaOverlay(ctx, x, y, w, h, vertical ? 1 : 0, mirror ? 1 : 0);
}
// --- [ bndLabelWidth ] ---
/** Unsafe version of: {@link #bndLabelWidth LabelWidth} */
public static native float nbndLabelWidth(long ctx, int iconid, long label);
/**
* Returns the ideal width for a label with given icon and text
*
* @param ctx the NanoVG context
*/
public static float bndLabelWidth(@NativeType("NVGcontext *") long ctx, int iconid, @Nullable @NativeType("char const *") ByteBuffer label) {
if (CHECKS) {
check(ctx);
checkNT1Safe(label);
}
return nbndLabelWidth(ctx, iconid, memAddressSafe(label));
}
/**
* Returns the ideal width for a label with given icon and text
*
* @param ctx the NanoVG context
*/
public static float bndLabelWidth(@NativeType("NVGcontext *") long ctx, int iconid, @Nullable @NativeType("char const *") CharSequence label) {
if (CHECKS) {
check(ctx);
}
MemoryStack stack = stackGet(); int stackPointer = stack.getPointer();
try {
stack.nUTF8Safe(label, true);
long labelEncoded = label == null ? NULL : stack.getPointerAddress();
return nbndLabelWidth(ctx, iconid, labelEncoded);
} finally {
stack.setPointer(stackPointer);
}
}
// --- [ bndLabelHeight ] ---
/** Unsafe version of: {@link #bndLabelHeight LabelHeight} */
public static native float nbndLabelHeight(long ctx, int iconid, long label, float width);
/**
* Returns the height for a label with given icon, text and width; this function is primarily useful in conjunction with multiline labels and textboxes.
*
* @param ctx the NanoVG context
*/
public static float bndLabelHeight(@NativeType("NVGcontext *") long ctx, int iconid, @Nullable @NativeType("char const *") ByteBuffer label, float width) {
if (CHECKS) {
check(ctx);
checkNT1Safe(label);
}
return nbndLabelHeight(ctx, iconid, memAddressSafe(label), width);
}
/**
* Returns the height for a label with given icon, text and width; this function is primarily useful in conjunction with multiline labels and textboxes.
*
* @param ctx the NanoVG context
*/
public static float bndLabelHeight(@NativeType("NVGcontext *") long ctx, int iconid, @Nullable @NativeType("char const *") CharSequence label, float width) {
if (CHECKS) {
check(ctx);
}
MemoryStack stack = stackGet(); int stackPointer = stack.getPointer();
try {
stack.nUTF8Safe(label, true);
long labelEncoded = label == null ? NULL : stack.getPointerAddress();
return nbndLabelHeight(ctx, iconid, labelEncoded, width);
} finally {
stack.setPointer(stackPointer);
}
}
// --- [ bndTransparent ] ---
/** Unsafe version of: {@link #bndTransparent Transparent} */
public static native void nbndTransparent(long color, long __result);
/** Makes color transparent using the default alpha value. */
@NativeType("NVGcolor")
public static NVGColor bndTransparent(@NativeType("NVGcolor") NVGColor color, @NativeType("NVGcolor") NVGColor __result) {
nbndTransparent(color.address(), __result.address());
return __result;
}
// --- [ bndOffsetColor ] ---
/** Unsafe version of: {@link #bndOffsetColor OffsetColor} */
public static native void nbndOffsetColor(long color, int delta, long __result);
/**
* Offsets a color by a given integer delta.
*
* @param delta in the range -100 to 100
*/
@NativeType("NVGcolor")
public static NVGColor bndOffsetColor(@NativeType("NVGcolor") NVGColor color, int delta, @NativeType("NVGcolor") NVGColor __result) {
nbndOffsetColor(color.address(), delta, __result.address());
return __result;
}
// --- [ bndSelectCorners ] ---
/** Unsafe version of: {@link #bndSelectCorners SelectCorners} */
public static native void nbndSelectCorners(long radiuses, float r, int flags);
/**
* Assigns radius {@code r} to the four entries of array {@code radiuses} depending on whether the corner is marked as sharp or not.
*
* @param flags the corner flags. One of:
{@link #BND_CORNER_NONE CORNER_NONE}
{@link #BND_CORNER_TOP_LEFT CORNER_TOP_LEFT}
{@link #BND_CORNER_TOP_RIGHT CORNER_TOP_RIGHT}
{@link #BND_CORNER_DOWN_RIGHT CORNER_DOWN_RIGHT}
{@link #BND_CORNER_DOWN_LEFT CORNER_DOWN_LEFT}
{@link #BND_CORNER_ALL CORNER_ALL}
{@link #BND_CORNER_TOP CORNER_TOP}
{@link #BND_CORNER_DOWN CORNER_DOWN}
{@link #BND_CORNER_LEFT CORNER_LEFT}
{@link #BND_CORNER_RIGHT CORNER_RIGHT}
*/
public static void bndSelectCorners(@NativeType("float *") FloatBuffer radiuses, float r, int flags) {
if (CHECKS) {
check(radiuses, 4);
}
nbndSelectCorners(memAddress(radiuses), r, flags);
}
// --- [ bndInnerColors ] ---
/** Unsafe version of: {@link #bndInnerColors InnerColors} */
public static native void nbndInnerColors(long shade_top, long shade_down, long theme, int state, int flipActive);
/**
* Computes the upper and lower gradient colors for the inner box from a widget theme and the widgets state.
*
* @param state the current UI state. One of:
{@link #BND_DEFAULT DEFAULT}
{@link #BND_HOVER HOVER}
{@link #BND_ACTIVE ACTIVE}
* @param flipActive if set and the {@code state} is {@link #BND_ACTIVE ACTIVE}, the upper and lower colors will be swapped
*/
public static void bndInnerColors(@NativeType("NVGcolor *") NVGColor shade_top, @NativeType("NVGcolor *") NVGColor shade_down, @NativeType("BNDwidgetTheme const *") BNDwidgetTheme theme, @NativeType("BNDwidgetState") int state, @NativeType("int") boolean flipActive) {
nbndInnerColors(shade_top.address(), shade_down.address(), theme.address(), state, flipActive ? 1 : 0);
}
// --- [ bndTextColor ] ---
/** Unsafe version of: {@link #bndTextColor TextColor} */
public static native void nbndTextColor(long theme, int state, long __result);
/**
* Computes the text color for a widget label from a widget theme and the widgets state.
*
* @param state the current UI state. One of:
{@link #BND_DEFAULT DEFAULT}
{@link #BND_HOVER HOVER}
{@link #BND_ACTIVE ACTIVE}
*/
@NativeType("NVGcolor")
public static NVGColor bndTextColor(@NativeType("BNDwidgetTheme const *") BNDwidgetTheme theme, @NativeType("BNDwidgetState") int state, @NativeType("NVGcolor") NVGColor __result) {
nbndTextColor(theme.address(), state, __result.address());
return __result;
}
// --- [ bndScrollHandleRect ] ---
/** Unsafe version of: {@link #bndScrollHandleRect ScrollHandleRect} */
public static native void nbndScrollHandleRect(long x, long y, long w, long h, float offset, float size);
/**
* Computes the bounds of the scrollbar handle from the scrollbar size and the handle's offset and size.
*
* @param offset is in the range {@code 0..1} and defines the position of the scroll handle
* @param size is in the range {@code 0..1} and defines the size of the scroll handle
*/
public static void bndScrollHandleRect(@NativeType("float *") FloatBuffer x, @NativeType("float *") FloatBuffer y, @NativeType("float *") FloatBuffer w, @NativeType("float *") FloatBuffer h, float offset, float size) {
if (CHECKS) {
check(x, 1);
check(y, 1);
check(w, 1);
check(h, 1);
}
nbndScrollHandleRect(memAddress(x), memAddress(y), memAddress(w), memAddress(h), offset, size);
}
// --- [ bndRoundedBox ] ---
/** Unsafe version of: {@link #bndRoundedBox RoundedBox} */
public static native void nbndRoundedBox(long ctx, float x, float y, float w, float h, float cr0, float cr1, float cr2, float cr3);
/**
* Adds a rounded box path at position {@code (x,y)} with size {@code (w,h)} and a separate radius for each corner listed in clockwise order, so that
* {@code cr0} = top left, {@code cr1} = top right, {@code cr2} = bottom right, {@code cr3} = bottom left; this is a low level drawing function: the path
* must be stroked or filled to become visible.
*
* @param ctx the NanoVG context
*/
public static void bndRoundedBox(@NativeType("NVGcontext *") long ctx, float x, float y, float w, float h, float cr0, float cr1, float cr2, float cr3) {
if (CHECKS) {
check(ctx);
}
nbndRoundedBox(ctx, x, y, w, h, cr0, cr1, cr2, cr3);
}
// --- [ bndBackground ] ---
/** Unsafe version of: {@link #bndBackground Background} */
public static native void nbndBackground(long ctx, float x, float y, float w, float h);
/**
* Draws a flat panel without any decorations at position {@code (x,y)} with size {@code (w,h)} and fills it with {@code backgroundColor}.
*
* @param ctx the NanoVG context
*/
public static void bndBackground(@NativeType("NVGcontext *") long ctx, float x, float y, float w, float h) {
if (CHECKS) {
check(ctx);
}
nbndBackground(ctx, x, y, w, h);
}
// --- [ bndBevel ] ---
/** Unsafe version of: {@link #bndBevel Bevel} */
public static native void nbndBevel(long ctx, float x, float y, float w, float h);
/**
* Draws a beveled border at position {@code (x,y)} with size {@code (w,h)} shaded with lighter and darker versions of {@code backgroundColor}.
*
* @param ctx the NanoVG context
*/
public static void bndBevel(@NativeType("NVGcontext *") long ctx, float x, float y, float w, float h) {
if (CHECKS) {
check(ctx);
}
nbndBevel(ctx, x, y, w, h);
}
// --- [ bndBevelInset ] ---
/** Unsafe version of: {@link #bndBevelInset BevelInset} */
public static native void nbndBevelInset(long ctx, float x, float y, float w, float h, float cr2, float cr3);
/**
* Draws a lower inset for a rounded box at position {@code (x,y)} with size {@code (w,h)} that gives the impression the surface has been pushed in.
* {@code cr2} and {@code cr3} contain the radiuses of the bottom right and bottom left corners of the rounded box.
*
* @param ctx the NanoVG context
*/
public static void bndBevelInset(@NativeType("NVGcontext *") long ctx, float x, float y, float w, float h, float cr2, float cr3) {
if (CHECKS) {
check(ctx);
}
nbndBevelInset(ctx, x, y, w, h, cr2, cr3);
}
// --- [ bndIcon ] ---
/** Unsafe version of: {@link #bndIcon Icon} */
public static native void nbndIcon(long ctx, float x, float y, int iconid);
/**
* Draws an icon with {@code (x,y)} as its upper left coordinate.
*
* @param ctx the NanoVG context
* @param iconid selects the icon from the sheet. One of:
*/
public static void bndIcon(@NativeType("NVGcontext *") long ctx, float x, float y, int iconid) {
if (CHECKS) {
check(ctx);
}
nbndIcon(ctx, x, y, iconid);
}
// --- [ bndDropShadow ] ---
/** Unsafe version of: {@link #bndDropShadow DropShadow} */
public static native void nbndDropShadow(long ctx, float x, float y, float w, float h, float r, float feather, float alpha);
/**
* Draws a drop shadow around the rounded box at {@code (x,y)} with size {@code (w,h)} and radius {@code r}, with {@code feather} as its maximum range in
* pixels. No shadow will be painted inside the rounded box.
*
* @param ctx the NanoVG context
*/
public static void bndDropShadow(@NativeType("NVGcontext *") long ctx, float x, float y, float w, float h, float r, float feather, float alpha) {
if (CHECKS) {
check(ctx);
}
nbndDropShadow(ctx, x, y, w, h, r, feather, alpha);
}
// --- [ bndInnerBox ] ---
/** Unsafe version of: {@link #bndInnerBox InnerBox} */
public static native void nbndInnerBox(long ctx, float x, float y, float w, float h, float cr0, float cr1, float cr2, float cr3, long shade_top, long shade_down);
/**
* Draws the inner part of a widget box, with a gradient from {@code shade_top} to {@code shade_down}. If {@code h>w}, the gradient will be horizontal
* instead of vertical.
*
* @param ctx the NanoVG context
*/
public static void bndInnerBox(@NativeType("NVGcontext *") long ctx, float x, float y, float w, float h, float cr0, float cr1, float cr2, float cr3, @NativeType("NVGcolor") NVGColor shade_top, @NativeType("NVGcolor") NVGColor shade_down) {
if (CHECKS) {
check(ctx);
}
nbndInnerBox(ctx, x, y, w, h, cr0, cr1, cr2, cr3, shade_top.address(), shade_down.address());
}
// --- [ bndOutlineBox ] ---
/** Unsafe version of: {@link #bndOutlineBox OutlineBox} */
public static native void nbndOutlineBox(long ctx, float x, float y, float w, float h, float cr0, float cr1, float cr2, float cr3, long color);
/**
* Draws the outline part of a widget box with the given color.
*
* @param ctx the NanoVG context
*/
public static void bndOutlineBox(@NativeType("NVGcontext *") long ctx, float x, float y, float w, float h, float cr0, float cr1, float cr2, float cr3, @NativeType("NVGcolor") NVGColor color) {
if (CHECKS) {
check(ctx);
}
nbndOutlineBox(ctx, x, y, w, h, cr0, cr1, cr2, cr3, color.address());
}
// --- [ bndIconLabelValue ] ---
/** Unsafe version of: {@link #bndIconLabelValue IconLabelValue} */
public static native void nbndIconLabelValue(long ctx, float x, float y, float w, float h, int iconid, long color, int align, float fontsize, long label, long value);
/**
* Draws an optional icon specified by {@code iconid} and an optional label with given {@code alignment}, {@code fontsize} and {@code color} within a
* widget box.
*
* @param ctx the NanoVG context
* @param iconid if ≥ 0, an icon will be drawn and the labels remaining space will be adjusted
* @param align one of:
{@link #BND_LEFT LEFT}
{@link #BND_CENTER CENTER}
* @param label if not {@code NULL}, it will be drawn with the specified {@code alignment}, {@code fontsize} and {@code color}
* @param value if not {@code NULL}, {@code label} and {@code value} will be drawn with a ":" separator inbetween
*/
public static void bndIconLabelValue(@NativeType("NVGcontext *") long ctx, float x, float y, float w, float h, int iconid, @NativeType("NVGcolor") NVGColor color, int align, float fontsize, @Nullable @NativeType("char const *") ByteBuffer label, @Nullable @NativeType("char const *") ByteBuffer value) {
if (CHECKS) {
check(ctx);
checkNT1Safe(label);
checkNT1Safe(value);
}
nbndIconLabelValue(ctx, x, y, w, h, iconid, color.address(), align, fontsize, memAddressSafe(label), memAddressSafe(value));
}
/**
* Draws an optional icon specified by {@code iconid} and an optional label with given {@code alignment}, {@code fontsize} and {@code color} within a
* widget box.
*
* @param ctx the NanoVG context
* @param iconid if ≥ 0, an icon will be drawn and the labels remaining space will be adjusted
* @param align one of:
{@link #BND_LEFT LEFT}
{@link #BND_CENTER CENTER}
* @param label if not {@code NULL}, it will be drawn with the specified {@code alignment}, {@code fontsize} and {@code color}
* @param value if not {@code NULL}, {@code label} and {@code value} will be drawn with a ":" separator inbetween
*/
public static void bndIconLabelValue(@NativeType("NVGcontext *") long ctx, float x, float y, float w, float h, int iconid, @NativeType("NVGcolor") NVGColor color, int align, float fontsize, @Nullable @NativeType("char const *") CharSequence label, @Nullable @NativeType("char const *") CharSequence value) {
if (CHECKS) {
check(ctx);
}
MemoryStack stack = stackGet(); int stackPointer = stack.getPointer();
try {
stack.nUTF8Safe(label, true);
long labelEncoded = label == null ? NULL : stack.getPointerAddress();
stack.nUTF8Safe(value, true);
long valueEncoded = value == null ? NULL : stack.getPointerAddress();
nbndIconLabelValue(ctx, x, y, w, h, iconid, color.address(), align, fontsize, labelEncoded, valueEncoded);
} finally {
stack.setPointer(stackPointer);
}
}
// --- [ bndNodeIconLabel ] ---
/** Unsafe version of: {@link #bndNodeIconLabel NodeIconLabel} */
public static native void nbndNodeIconLabel(long ctx, float x, float y, float w, float h, int iconid, long color, long shadowColor, int align, float fontsize, long label);
/**
* Draws an optional icon specified by {@code iconid} and an optional label with given {@code alignment}, {@code fontsize} and {@code color} within a node
* title bar.
*
* @param ctx the NanoVG context
* @param iconid if ≥ 0, an icon will be drawn
* @param label if not {@code NULL}, it will be drawn with the specified {@code alignment}, {@code fontsize} and {@code color}
*/
public static void bndNodeIconLabel(@NativeType("NVGcontext *") long ctx, float x, float y, float w, float h, int iconid, @NativeType("NVGcolor") NVGColor color, @NativeType("NVGcolor") NVGColor shadowColor, int align, float fontsize, @Nullable @NativeType("char const *") ByteBuffer label) {
if (CHECKS) {
check(ctx);
checkNT1Safe(label);
}
nbndNodeIconLabel(ctx, x, y, w, h, iconid, color.address(), shadowColor.address(), align, fontsize, memAddressSafe(label));
}
/**
* Draws an optional icon specified by {@code iconid} and an optional label with given {@code alignment}, {@code fontsize} and {@code color} within a node
* title bar.
*
* @param ctx the NanoVG context
* @param iconid if ≥ 0, an icon will be drawn
* @param label if not {@code NULL}, it will be drawn with the specified {@code alignment}, {@code fontsize} and {@code color}
*/
public static void bndNodeIconLabel(@NativeType("NVGcontext *") long ctx, float x, float y, float w, float h, int iconid, @NativeType("NVGcolor") NVGColor color, @NativeType("NVGcolor") NVGColor shadowColor, int align, float fontsize, @Nullable @NativeType("char const *") CharSequence label) {
if (CHECKS) {
check(ctx);
}
MemoryStack stack = stackGet(); int stackPointer = stack.getPointer();
try {
stack.nUTF8Safe(label, true);
long labelEncoded = label == null ? NULL : stack.getPointerAddress();
nbndNodeIconLabel(ctx, x, y, w, h, iconid, color.address(), shadowColor.address(), align, fontsize, labelEncoded);
} finally {
stack.setPointer(stackPointer);
}
}
// --- [ bndIconLabelTextPosition ] ---
/** Unsafe version of: {@link #bndIconLabelTextPosition IconLabelTextPosition} */
public static native int nbndIconLabelTextPosition(long ctx, float x, float y, float w, float h, int iconid, float fontsize, long label, int px, int py);
/**
* Calculates the corresponding text position for given coordinates {@code px/py} in an {@code iconLabel}. See {@link #bndIconLabelCaret IconLabelCaret} for more info.
*
* @param ctx the NanoVG context
*/
public static int bndIconLabelTextPosition(@NativeType("NVGcontext *") long ctx, float x, float y, float w, float h, int iconid, float fontsize, @Nullable @NativeType("char const *") ByteBuffer label, int px, int py) {
if (CHECKS) {
check(ctx);
checkNT1Safe(label);
}
return nbndIconLabelTextPosition(ctx, x, y, w, h, iconid, fontsize, memAddressSafe(label), px, py);
}
/**
* Calculates the corresponding text position for given coordinates {@code px/py} in an {@code iconLabel}. See {@link #bndIconLabelCaret IconLabelCaret} for more info.
*
* @param ctx the NanoVG context
*/
public static int bndIconLabelTextPosition(@NativeType("NVGcontext *") long ctx, float x, float y, float w, float h, int iconid, float fontsize, @Nullable @NativeType("char const *") CharSequence label, int px, int py) {
if (CHECKS) {
check(ctx);
}
MemoryStack stack = stackGet(); int stackPointer = stack.getPointer();
try {
stack.nUTF8Safe(label, true);
long labelEncoded = label == null ? NULL : stack.getPointerAddress();
return nbndIconLabelTextPosition(ctx, x, y, w, h, iconid, fontsize, labelEncoded, px, py);
} finally {
stack.setPointer(stackPointer);
}
}
// --- [ bndIconLabelCaret ] ---
/** Unsafe version of: {@link #bndIconLabelCaret IconLabelCaret} */
public static native void nbndIconLabelCaret(long ctx, float x, float y, float w, float h, int iconid, long color, float fontsize, long label, long caretcolor, int cbegin, int cend);
/**
* Draws an optional icon specified by {@code iconid}, an optional label and a caret with given {@code fontsize} and {@code color} within a widget box.
*
* @param ctx the NanoVG context
* @param iconid if ≥ 0, an icon will be drawn and the labels remaining space will be adjusted
* @param label if not {@code NULL}, it will be drawn with the specified {@code alignment}, {@code fontsize} and {@code color}
* @param cbegin must be ≥ 0 and ≤ {@code strlen(text)} and denotes the beginning of the caret
* @param cend must be ≥ {@code cbegin} and ≤ {@code strlen(text)} and denotes the end of the caret. If {@code cend} < {@code cbegin}, then no caret will
* be drawn.
*/
public static void bndIconLabelCaret(@NativeType("NVGcontext *") long ctx, float x, float y, float w, float h, int iconid, @NativeType("NVGcolor") NVGColor color, float fontsize, @Nullable @NativeType("char const *") ByteBuffer label, @NativeType("NVGcolor") NVGColor caretcolor, int cbegin, int cend) {
if (CHECKS) {
check(ctx);
checkNT1Safe(label);
}
nbndIconLabelCaret(ctx, x, y, w, h, iconid, color.address(), fontsize, memAddressSafe(label), caretcolor.address(), cbegin, cend);
}
/**
* Draws an optional icon specified by {@code iconid}, an optional label and a caret with given {@code fontsize} and {@code color} within a widget box.
*
* @param ctx the NanoVG context
* @param iconid if ≥ 0, an icon will be drawn and the labels remaining space will be adjusted
* @param label if not {@code NULL}, it will be drawn with the specified {@code alignment}, {@code fontsize} and {@code color}
* @param cbegin must be ≥ 0 and ≤ {@code strlen(text)} and denotes the beginning of the caret
* @param cend must be ≥ {@code cbegin} and ≤ {@code strlen(text)} and denotes the end of the caret. If {@code cend} < {@code cbegin}, then no caret will
* be drawn.
*/
public static void bndIconLabelCaret(@NativeType("NVGcontext *") long ctx, float x, float y, float w, float h, int iconid, @NativeType("NVGcolor") NVGColor color, float fontsize, @Nullable @NativeType("char const *") CharSequence label, @NativeType("NVGcolor") NVGColor caretcolor, int cbegin, int cend) {
if (CHECKS) {
check(ctx);
}
MemoryStack stack = stackGet(); int stackPointer = stack.getPointer();
try {
stack.nUTF8Safe(label, true);
long labelEncoded = label == null ? NULL : stack.getPointerAddress();
nbndIconLabelCaret(ctx, x, y, w, h, iconid, color.address(), fontsize, labelEncoded, caretcolor.address(), cbegin, cend);
} finally {
stack.setPointer(stackPointer);
}
}
// --- [ bndCheck ] ---
/** Unsafe version of: {@link #bndCheck Check} */
public static native void nbndCheck(long ctx, float ox, float oy, long color);
/**
* Draws a checkmark for an option box with the given upper left coordinates {@code (ox,oy)} with the specified {@code color}.
*
* @param ctx the NanoVG context
*/
public static void bndCheck(@NativeType("NVGcontext *") long ctx, float ox, float oy, @NativeType("NVGcolor") NVGColor color) {
if (CHECKS) {
check(ctx);
}
nbndCheck(ctx, ox, oy, color.address());
}
// --- [ bndArrow ] ---
/** Unsafe version of: {@link #bndArrow Arrow} */
public static native void nbndArrow(long ctx, float x, float y, float s, long color);
/**
* Draws a horizontal arrow for a number field with its center at {@code (x,y)} and size {@code s}.
*
* @param ctx the NanoVG context
* @param s if negative, the arrow points to the left
*/
public static void bndArrow(@NativeType("NVGcontext *") long ctx, float x, float y, float s, @NativeType("NVGcolor") NVGColor color) {
if (CHECKS) {
check(ctx);
}
nbndArrow(ctx, x, y, s, color.address());
}
// --- [ bndUpDownArrow ] ---
/** Unsafe version of: {@link #bndUpDownArrow UpDownArrow} */
public static native void nbndUpDownArrow(long ctx, float x, float y, float s, long color);
/**
* Draws an up/down arrow for a choice box with its center at {@code (x,y)} and size {@code s}.
*
* @param ctx the NanoVG context
*/
public static void bndUpDownArrow(@NativeType("NVGcontext *") long ctx, float x, float y, float s, @NativeType("NVGcolor") NVGColor color) {
if (CHECKS) {
check(ctx);
}
nbndUpDownArrow(ctx, x, y, s, color.address());
}
// --- [ bndNodeArrowDown ] ---
/** Unsafe version of: {@link #bndNodeArrowDown NodeArrowDown} */
public static native void nbndNodeArrowDown(long ctx, float x, float y, float s, long color);
/**
* Draws a node down-arrow with its tip at {@code (x,y)} and size {@code s}
*
* @param ctx the NanoVG context
*/
public static void bndNodeArrowDown(@NativeType("NVGcontext *") long ctx, float x, float y, float s, @NativeType("NVGcolor") NVGColor color) {
if (CHECKS) {
check(ctx);
}
nbndNodeArrowDown(ctx, x, y, s, color.address());
}
// --- [ bndNodeWireColor ] ---
/** Unsafe version of: {@link #bndNodeWireColor NodeWireColor} */
public static native void nbndNodeWireColor(long theme, int state, long __result);
/**
* Returns the color of a node wire based on state.
*
* @param state {@link #BND_HOVER HOVER} indicates selected state, {@link #BND_ACTIVE ACTIVE} indicates dragged state
*/
@NativeType("NVGcolor")
public static NVGColor bndNodeWireColor(@NativeType("BNDnodeTheme const *") BNDnodeTheme theme, @NativeType("BNDwidgetState") int state, @NativeType("NVGcolor") NVGColor __result) {
nbndNodeWireColor(theme.address(), state, __result.address());
return __result;
}
/** Array version of: {@link #nbndSelectCorners} */
public static native void nbndSelectCorners(float[] radiuses, float r, int flags);
/** Array version of: {@link #bndSelectCorners SelectCorners} */
public static void bndSelectCorners(@NativeType("float *") float[] radiuses, float r, int flags) {
if (CHECKS) {
check(radiuses, 4);
}
nbndSelectCorners(radiuses, r, flags);
}
/** Array version of: {@link #nbndScrollHandleRect} */
public static native void nbndScrollHandleRect(float[] x, float[] y, float[] w, float[] h, float offset, float size);
/** Array version of: {@link #bndScrollHandleRect ScrollHandleRect} */
public static void bndScrollHandleRect(@NativeType("float *") float[] x, @NativeType("float *") float[] y, @NativeType("float *") float[] w, @NativeType("float *") float[] h, float offset, float size) {
if (CHECKS) {
check(x, 1);
check(y, 1);
check(w, 1);
check(h, 1);
}
nbndScrollHandleRect(x, y, w, h, offset, size);
}
public static int BND_ICONID(int x, int y) {
return x | (y << 8);
}
}