Nebula
Loading...
Searching...
No Matches
Nebula.DrawSurface Class Reference

Detailed Description

The ImGui calls the property inspector draws through.

ImGui has one context, and it is the editor's. A managed drawing library allocates its own, so the managed side cannot draw with an ImGui of its own and goes through these instead.

These are only reachable from inside the editor's draw, which is what keeps a build with no editor from ever calling them.

A row is the key in column 0 and one widget in column 1. The widget answers with true when the value changed, and the value it worked on comes back through the buffer the caller gave, because the surface owns no memory the managed side can read afterwards.

Public Types

enum  RowCode { None = 0 , Remove = 1 , Marker = 2 }
 What a section row answered with. More...

Static Public Member Functions

static RowCode Section (string title, string propertyName, bool authored)
 The section row.
static bool BeginTable (string id)
static void EndTable ()
static void RowText (string key, string value, string description)
static void RowTextDisabled (string key, string value, string description)
static unsafe bool RowInt (string key, int value, out int result, string description)
static unsafe bool RowFloat (string key, float value, out float result, string description)
static unsafe bool RowBool (string key, bool value, out bool result, string description)
static unsafe bool RowString (string key, string value, byte[] buffer, string description)
 The value the user typed is written into the buffer the caller gave.
static unsafe bool RowCombo (string key, byte[] options, int index, out int result, string description)
 The options are the names separated by a zero byte and terminated by two, which is the form ImGui's combo takes.
static unsafe bool RowFloats (string key, float[] values, int count, string description)
 The components of one field.
static void PushId (string id)
static void PopId ()
static void TextDisabled (string text)
static bool RowMarker (string key, bool authored, string tip)
 The override marker on a row, drawn after the widget the row's value column has.
static bool IsAnyItemActive ()

Private Member Functions

static int SectionCall (string title, string propertyName, [MarshalAs(UnmanagedType.I1)] bool authored)
static bool BeginTableCall (string id)
static void EndTableCall ()
static void RowTextCall (string key, string value, string description)
static void RowTextDisabledCall (string key, string value, string description)
static bool RowIntCall (string key, int value, IntPtr outValue, string description)
static bool RowFloatCall (string key, float value, IntPtr outValue, string description)
static bool RowBoolCall (string key, [MarshalAs(UnmanagedType.I1)] bool value, IntPtr outValue, string description)
static bool RowStringCall (string key, string value, IntPtr outBuffer, int outLen, string description)
static bool RowComboCall (string key, IntPtr options, int index, IntPtr outIndex, string description)
static bool RowFloatsCall (string key, IntPtr values, int count, string description)
static void PushIdCall (string id)
static void PopIdCall ()
static void TextDisabledCall (string text)
static bool RowMarkerCall (string key, [MarshalAs(UnmanagedType.I1)] bool authored, string tip)
static bool IsAnyItemActiveCall ()

Member Enumeration Documentation

◆ RowCode

What a section row answered with.

A row this side draws can only answer with a number across the boundary, so this is what the number reads as here.

Enumerator
None 
Remove 
Marker 

Member Function Documentation

◆ BeginTable()

bool Nebula.DrawSurface.BeginTable ( string id)
inlinestatic

◆ BeginTableCall()

bool Nebula.DrawSurface.BeginTableCall ( string id)
private

◆ EndTable()

void Nebula.DrawSurface.EndTable ( )
inlinestatic

◆ EndTableCall()

void Nebula.DrawSurface.EndTableCall ( )
private

◆ IsAnyItemActive()

bool Nebula.DrawSurface.IsAnyItemActive ( )
inlinestatic

◆ IsAnyItemActiveCall()

bool Nebula.DrawSurface.IsAnyItemActiveCall ( )
private

◆ PopId()

void Nebula.DrawSurface.PopId ( )
inlinestatic

◆ PopIdCall()

void Nebula.DrawSurface.PopIdCall ( )
private

◆ PushId()

void Nebula.DrawSurface.PushId ( string id)
inlinestatic

◆ PushIdCall()

void Nebula.DrawSurface.PushIdCall ( string id)
private

◆ RowBool()

unsafe bool Nebula.DrawSurface.RowBool ( string key,
bool value,
out bool result,
string description )
inlinestatic

◆ RowBoolCall()

bool Nebula.DrawSurface.RowBoolCall ( string key,
[MarshalAs(UnmanagedType.I1)] bool value,
IntPtr outValue,
string description )
private

◆ RowCombo()

unsafe bool Nebula.DrawSurface.RowCombo ( string key,
byte[] options,
int index,
out int result,
string description )
inlinestatic

The options are the names separated by a zero byte and terminated by two, which is the form ImGui's combo takes.

The buffer has to be one the caller owns.

◆ RowComboCall()

bool Nebula.DrawSurface.RowComboCall ( string key,
IntPtr options,
int index,
IntPtr outIndex,
string description )
private

◆ RowFloat()

unsafe bool Nebula.DrawSurface.RowFloat ( string key,
float value,
out float result,
string description )
inlinestatic

◆ RowFloatCall()

bool Nebula.DrawSurface.RowFloatCall ( string key,
float value,
IntPtr outValue,
string description )
private

◆ RowFloats()

unsafe bool Nebula.DrawSurface.RowFloats ( string key,
float[] values,
int count,
string description )
inlinestatic

The components of one field.

The values are written back into the buffer the caller gave, which is what lets one call cover Vector2, Vector3, Vector4 and Quaternion.

◆ RowFloatsCall()

bool Nebula.DrawSurface.RowFloatsCall ( string key,
IntPtr values,
int count,
string description )
private

◆ RowInt()

unsafe bool Nebula.DrawSurface.RowInt ( string key,
int value,
out int result,
string description )
inlinestatic

◆ RowIntCall()

bool Nebula.DrawSurface.RowIntCall ( string key,
int value,
IntPtr outValue,
string description )
private

◆ RowMarker()

bool Nebula.DrawSurface.RowMarker ( string key,
bool authored,
string tip )
inlinestatic

The override marker on a row, drawn after the widget the row's value column has.

It is only drawn when the caller says the row is the instance's own, and the answer is true when it was pressed. What a press means is not this side's decision: it only says which row it was on.

◆ RowMarkerCall()

bool Nebula.DrawSurface.RowMarkerCall ( string key,
[MarshalAs(UnmanagedType.I1)] bool authored,
string tip )
private

◆ RowString()

unsafe bool Nebula.DrawSurface.RowString ( string key,
string value,
byte[] buffer,
string description )
inlinestatic

The value the user typed is written into the buffer the caller gave.

◆ RowStringCall()

bool Nebula.DrawSurface.RowStringCall ( string key,
string value,
IntPtr outBuffer,
int outLen,
string description )
private

◆ RowText()

void Nebula.DrawSurface.RowText ( string key,
string value,
string description )
inlinestatic

◆ RowTextCall()

void Nebula.DrawSurface.RowTextCall ( string key,
string value,
string description )
private

◆ RowTextDisabled()

void Nebula.DrawSurface.RowTextDisabled ( string key,
string value,
string description )
inlinestatic

◆ RowTextDisabledCall()

void Nebula.DrawSurface.RowTextDisabledCall ( string key,
string value,
string description )
private

◆ Section()

RowCode Nebula.DrawSurface.Section ( string title,
string propertyName,
bool authored )
inlinestatic

The section row.

The remove button is drawn when the property name is given, and the override marker when the caller says the property has keys this instance authored.

◆ SectionCall()

int Nebula.DrawSurface.SectionCall ( string title,
string propertyName,
[MarshalAs(UnmanagedType.I1)] bool authored )
private

◆ TextDisabled()

void Nebula.DrawSurface.TextDisabled ( string text)
inlinestatic

◆ TextDisabledCall()

void Nebula.DrawSurface.TextDisabledCall ( string text)
private

The documentation for this class was generated from the following file:
  • /github/workspace/code/addons/nsharp/NebulaEngine/level/DrawSurface.cs