LuaSTG-x Core API
im::Widget Class Reference
Inheritance diagram for im::Widget:
im::About im::Bullet im::Button im::Checkbox im::ChildWindow im::CollapsingHeader im::Combo im::Console im::ImageButton im::InputText im::LogWindow im::lstg::GameResInfo im::lstg::KeyState im::lstg::PerformanceInfo im::lstg::THlibInfo im::ProgressBar im::RadioButton im::RadioButtonGroup im::Selectable im::SelectableGroup im::TabBar im::TabItem im::Text im::TreeNode im::VariableWatch im::Window

Public Member Functions

static function Widget (local handler)
 
function _handler ()
 
function addChild (local child, local localZOrder, local name)
 
function addChildChain (local ...)
 
function addChildren (local ...)
 
static function AllowKeyboardFocus (local allow_keyboard_focus)
 
static function Bullet ()
 
static function Button (local label_or_id, local onClick, local size_or_dir, local style)
 
static function buttonRepeat (local repeat_)
 
static function CCNode (local node, local tint_color, local border_color)
 
static function CCNodeButton (local node, local frame_padding, local bg_color, local tint_color)
 
static function Checkbox (local label, local checked, local onChange, local onCheck)
 
static function ChildWindow (local id, local size, local border, local flags)
 
static function clipRect (local clip_rect_min, local clip_rect_max, local intersect_with_current_clip_rect)
 
static function CollapsingHeader (local label, local flags, local closable)
 
static function Combo (local label, local items, local current, local flags)
 
function ctor (local ...)
 
function getContentSize ()
 
function getParam (local idx)
 
function getReturn (local idx)
 
function handler ()
 
static function id (local id)
 
static function InputText (local label, local string, local onChange, local width)
 
static function itemWidth (local item_width)
 
static function MenuBar ()
 
static function ProgressBar (local fraction, local size, local overlay)
 
static function propertyConst (local label, local value, local params)
 
static function propertyHeader (local label, local data, local k, local params)
 
static function propertyInput (local label, local data, local k, local params)
 
static function RadioButton (local label, local checked, local checker, local onCheck)
 
static function RadioButtonGroup (local labels, local onChange, local initIndex, local sameLine)
 
static function Selectable (local label, local selected, local flags, local size, local onSelect)
 
static function SelectableGroup (local labels, local current, local flags, local sizes, local onSelect)
 
function setContentSize (local size)
 
function setHandler (local f)
 
function setParam (local idx, local value)
 
static function style (local colors, local vars)
 
static function styleColor (local idx, local color)
 
static function styleColors (local t)
 
static function styleVar (local idx, local value)
 
static function styleVars (local t)
 
static function TabBar (local id, local flags)
 
static function TabItem (local name, local open, local flags)
 
static function Text (local string, local color, local style)
 
static function textWrapPos (local pos)
 
static function TreeNode (local label, local flags)
 
static function Window (local name, local open, local flags)
 
static function wrapper (local onPush, local onPop)
 

Constructor & Destructor Documentation

◆ Widget()

static function Widget ( local  handler)

Member Function Documentation

◆ _handler()

function _handler ( )

◆ addChild()

function addChild ( local  child,
local  localZOrder,
local  name 
)

◆ addChildChain()

function addChildChain ( local ...  )

◆ addChildren()

function addChildren ( local ...  )

◆ AllowKeyboardFocus()

static function AllowKeyboardFocus ( local  allow_keyboard_focus)
Returns
im.Widget allow focusing using TAB/Shift-TAB, enabled by default but you can disable it for certain widgets
Parameters
allow_keyboard_focusboolean

◆ Bullet()

static function Bullet ( )
Returns
im.Bullet

◆ Button()

static function Button ( local  label_or_id,
local  onClick,
local  size_or_dir,
local  style 
)
Returns
im.Button

◆ buttonRepeat()

static function buttonRepeat ( local  repeat_)

in 'repeat' mode, Button*() functions return repeated true in a typematic manner (using io.KeyRepeatDelay/io.KeyRepeatRate setting). Note that you can call IsItemActive() after any Button() to tell if the button is held in the current frame.

Parameters
repeat_boolean

◆ CCNode()

static function CCNode ( local  node,
local  tint_color,
local  border_color 
)

◆ CCNodeButton()

static function CCNodeButton ( local  node,
local  frame_padding,
local  bg_color,
local  tint_color 
)

◆ Checkbox()

static function Checkbox ( local  label,
local  checked,
local  onChange,
local  onCheck 
)
Returns
im.Checkbox

◆ ChildWindow()

static function ChildWindow ( local  id,
local  size,
local  border,
local  flags 
)

◆ clipRect()

static function clipRect ( local  clip_rect_min,
local  clip_rect_max,
local  intersect_with_current_clip_rect 
)
Parameters
clip_rect_minImVec2
clip_rect_maxImVec2
intersect_with_current_clip_rectboolean

◆ CollapsingHeader()

static function CollapsingHeader ( local  label,
local  flags,
local  closable 
)

◆ Combo()

static function Combo ( local  label,
local  items,
local  current,
local  flags 
)
Returns
im.Combo

◆ ctor()

function ctor ( local ...  )

◆ getContentSize()

function getContentSize ( )

◆ getParam()

function getParam ( local  idx)

◆ getReturn()

function getReturn ( local  idx)

◆ handler()

function handler ( )

◆ id()

static function id ( local  id)
  • Read the FAQ for more details about how ID are handled in dear imgui. If you are creating widgets in a loop you most

    likely want to push a unique identifier (e.g. object pointer, loop index) to uniquely differentiate them.

  • The resulting ID are hashes of the entire stack.
  • You can also use the "Label##foobar" syntax within widget label to distinguish them from each others.
  • In this header file we use the "label"/"name" terminology to denote a string that will be displayed and used as an ID,

    whereas "str_id" denote a string that is only used as an ID and not normally displayed.

Parameters
idnumber|string

◆ InputText()

static function InputText ( local  label,
local  string,
local  onChange,
local  width 
)
Returns
im.InputText

◆ itemWidth()

static function itemWidth ( local  item_width)

set width of items for common large "item+label" widgets. >0.0f: width in pixels, <0.0f align xx pixels to the right of window (so -1.0f always align width to the right side). 0.0f = default to ~2/3 of windows width,

Parameters
item_widthnumber

◆ MenuBar()

static function MenuBar ( )

◆ ProgressBar()

static function ProgressBar ( local  fraction,
local  size,
local  overlay 
)

◆ propertyConst()

static function propertyConst ( local  label,
local  value,
local  params 
)

◆ propertyHeader()

static function propertyHeader ( local  label,
local  data,
local  k,
local  params 
)

◆ propertyInput()

static function propertyInput ( local  label,
local  data,
local  k,
local  params 
)
Parameters
labelstring
datatable
kstring
paramstable
Returns
boolean

◆ RadioButton()

static function RadioButton ( local  label,
local  checked,
local  checker,
local  onCheck 
)

◆ RadioButtonGroup()

static function RadioButtonGroup ( local  labels,
local  onChange,
local  initIndex,
local  sameLine 
)

◆ Selectable()

static function Selectable ( local  label,
local  selected,
local  flags,
local  size,
local  onSelect 
)
Returns
im.Selectable

◆ SelectableGroup()

static function SelectableGroup ( local  labels,
local  current,
local  flags,
local  sizes,
local  onSelect 
)

◆ setContentSize()

function setContentSize ( local  size)

◆ setHandler()

function setHandler ( local  f)

◆ setParam()

function setParam ( local  idx,
local  value 
)

◆ style()

static function style ( local  colors,
local  vars 
)

◆ styleColor()

static function styleColor ( local  idx,
local  color 
)

◆ styleColors()

static function styleColors ( local  t)

◆ styleVar()

static function styleVar ( local  idx,
local  value 
)

◆ styleVars()

static function styleVars ( local  t)

◆ TabBar()

static function TabBar ( local  id,
local  flags 
)
Returns
im.TabBar

◆ TabItem()

static function TabItem ( local  name,
local  open,
local  flags 
)
Returns
im.TabItem

◆ Text()

static function Text ( local  string,
local  color,
local  style 
)
Returns
im.Text

◆ textWrapPos()

static function textWrapPos ( local  pos)

word-wrapping for Text*() commands. < 0.0f: no wrapping; 0.0f: wrap to end of window (or column); > 0.0f: wrap at 'wrap_pos_x' position in window local space

Parameters
posnumber

◆ TreeNode()

static function TreeNode ( local  label,
local  flags 
)
Returns
im.TreeNode

◆ Window()

static function Window ( local  name,
local  open,
local  flags 
)
Returns
im.Window

◆ wrapper()

static function wrapper ( local  onPush,
local  onPop 
)
Returns
im.Widget

The documentation for this class was generated from the following file: