lights FAQ Forum github.com/luapower/winapi

Native OS APIs
winapi
winapi.wglpanel
winapi.cairopanel
objc
xlib

basebuttonclass

Base class for button-like controls


require'winapi.basebuttonclass'

This module implements the BaseButton class which is the base class for buttons and button-like controls. BaseButton is for subclassing, not for instantiation. Nevertheless, it contains properties and methods that are common to all buttons and button-like controls which are documented here.

BaseButton

Hierarchy

Initial fields and properties

NOTE: in the table below i means initial field, r means property which can be read, w means property which can be set.

field/property irw description default reference
tabstop irw focus on tab true WS_TABSTOP
halign irw horiz. align: 'left', 'right', 'center' BS_LEFT,...
valign irw vert. align: 'top', 'bottom', 'center' BS_TOP,...
word_wrap irw word wrapping BS_MULTILINE
flat irw flat appearance BS_FLAT
double_clicks irw enable double-click events BS_NOTIFY
image_list irw see below (*) BCM_SETIMAGELIST
icon irw icon BM_SETIMAGE
bitmap irw bitmap BM_SETIMAGE

(*) the image_list property is a table with the fields:

* `image_list`: a `HIMAGELIST`
* `align`: 'left', 'right', 'top', 'bottom', 'center'
* `margin`: the margin around the image

Events

event description reference
on_click() clicked BN_CLICKED
on_double_click() double clicked BN_DOUBLECLICKED
on_focus() focused BN_SETFOCUS
on_blur() unfocused BN_KILLFOCUS

Last updated: 2 years ago | Edit on GitHub

Pkg type:Lua+ffi
Version: r5-0-gb9d53e5
Last commit:
License: PD
Requires: glue  luajit 
Required by: cairo  cplayer  nw  winapi.cairopanel  winapi.wglpanel 

Top