Files
source/S/lib--widget--button.h.html
github-actions[bot] 08571174ab Deploy to GitHub Pages
2026-02-01 17:32:02 +00:00

95 lines
13 KiB
HTML

<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
<html xmlns='http://www.w3.org/1999/xhtml'>
<head>
<title>lib/widget/button.h</title>
<meta name='robots' content='noindex,nofollow' />
<meta name='generator' content='GLOBAL-6.6.11' />
<meta http-equiv='Content-Style-Type' content='text/css' />
<link rel='stylesheet' type='text/css' href='../style.css' />
</head>
<body>
<!-- beginning of fixed guide -->
<div id='guide'><ul>
<li><a href='#TOP'><img class='icon' src='../icons/first.png' alt='[^]' /></a></li>
<li><a href='#BOTTOM'><img class='icon' src='../icons/last.png' alt='[v]' /></a></li>
<li><a href='#TOP'><img class='icon' src='../icons/top.png' alt='[top]' /></a></li>
<li><a href='#BOTTOM'><img class='icon' src='../icons/bottom.png' alt='[bottom]' /></a></li>
<li><a href='../mains.html'><img class='icon' src='../icons/index.png' alt='[index]' /></a></li>
<li><a href='../help.html'><img class='icon' src='../icons/help.png' alt='[help]' /></a></li>
<li class='standout'><span><a href='../files/lib.html'>lib</a>/<a href='../files/lib--widget.html'>widget</a>/button.h</span></li>
</ul></div>
<!-- end of fixed guide -->
<div align='right'>Manual pages:
<a href=man/mc.html>mc</a> &bullet; <a href=man/mcdiff.html>mcdiff</a> &bullet; <a href=man/mcedit.html>mcedit</a> &bullet; <a href=man/mcview.html>mcview</a>
</div>
<a id='TOP' name='TOP'></a><h2 class='header'><a href='../mains.html'>root</a>/<a href='../files/lib.html'>lib</a>/<a href='../files/lib--widget.html'>widget</a>/button.h</h2>
<em class='comment'>/* <img class='icon' src='../icons/n_left.png' alt='[previous]' /><img class='icon' src='../icons/n_right.png' alt='[next]' /><img class='icon' src='../icons/n_first.png' alt='[first]' /><img class='icon' src='../icons/n_last.png' alt='[last]' /><img class='icon' src='../icons/n_top.png' alt='[top]' /><a href='#BOTTOM'><img class='icon' src='../icons/bottom.png' alt='[bottom]' /></a><a href='../mains.html'><img class='icon' src='../icons/index.png' alt='[index]' /></a><a href='../help.html'><img class='icon' src='../icons/help.png' alt='[help]' /></a>&nbsp;<input type='text' readonly onfocus='this.select();' value='+1 lib/widget/button.h' /> */</em>
<hr />
<h2 class='header'><a href='lib--widget.h.html#L25' title='Included from 25 in lib/widget.h.'>INCLUDED FROM</a></h2>
<hr />
<pre>
<a id='L1' name='L1'></a> 1
<a id='L2' name='L2'></a> 2 <em class='comment'>/** \file button.h</em>
<a id='L3' name='L3'></a> 3 <em class='comment'> * \brief Header: WButton widget</em>
<a id='L4' name='L4'></a> 4 <em class='comment'> */</em>
<a id='L5' name='L5'></a> 5
<a id='L6' name='L6'></a> 6 <em class='sharp'>#ifndef</em> <a href='../S/lib--widget--button.h.html#L7' title='Defined at 7 in lib/widget/button.h.'>MC__WIDGET_BUTTON_H</a>
<a id='L7' name='L7'></a> 7 <em class='sharp'>#define</em> <a href='../S/lib--widget--button.h.html#L6' title='Referred from 6 in lib/widget/button.h.'>MC__WIDGET_BUTTON_H</a>
<a id='L8' name='L8'></a> 8
<a id='L9' name='L9'></a> 9 <em class='comment'>/*** typedefs(not structures) and defined constants **********************************************/</em>
<a id='L10' name='L10'></a> 10
<a id='L11' name='L11'></a> 11 <em class='sharp'>#define</em> <a href='../R/BUTTON.html' title='Multiple referred from 11 places.'>BUTTON</a>(<a href='../Y/x.html' title='Multiple used in 677 places.'>x</a>) ((<a href='../D/WButton.html' title='Multiple defined in 2 places.'>WButton</a> *) (<a href='../Y/x.html' title='Multiple used in 677 places.'>x</a>))
<a id='L12' name='L12'></a> 12
<a id='L13' name='L13'></a> 13 <strong class='reserved'>struct</strong> <a href='../D/WButton.html' title='Multiple defined in 2 places.'>WButton</a>;
<a id='L14' name='L14'></a> 14
<a id='L15' name='L15'></a> 15 <em class='comment'>/* button callback */</em>
<a id='L16' name='L16'></a> 16 <em class='comment'>/* return 0 to continue work with dialog, non-zero to close */</em>
<a id='L17' name='L17'></a> 17 <strong class='reserved'>typedef</strong> <strong class='reserved'>int</strong> (*<a href='../Y/bcback_fn.html' title='Multiple used in 8 places.'>bcback_fn</a>) (<strong class='reserved'>struct</strong> <a href='../D/WButton.html' title='Multiple defined in 2 places.'>WButton</a> *<a href='../Y/button.html' title='Multiple used in 82 places.'>button</a>, <strong class='reserved'>int</strong> <a href='../Y/action.html' title='Multiple used in 144 places.'>action</a>);
<a id='L18' name='L18'></a> 18
<a id='L19' name='L19'></a> 19 <em class='comment'>/*** enums ***************************************************************************************/</em>
<a id='L20' name='L20'></a> 20
<a id='L21' name='L21'></a> 21 <strong class='reserved'>typedef</strong> <strong class='reserved'>enum</strong>
<a id='L22' name='L22'></a> 22 <em class='brace'>{</em>
<a id='L23' name='L23'></a> 23 <a href='../R/HIDDEN_BUTTON.html' title='Multiple referred from 4 places.'>HIDDEN_BUTTON</a> = 0,
<a id='L24' name='L24'></a> 24 <a href='../R/NARROW_BUTTON.html' title='Multiple referred from 16 places.'>NARROW_BUTTON</a> = 1,
<a id='L25' name='L25'></a> 25 <a href='../R/NORMAL_BUTTON.html' title='Multiple referred from 68 places.'>NORMAL_BUTTON</a> = 2,
<a id='L26' name='L26'></a> 26 <a href='../R/DEFPUSH_BUTTON.html' title='Multiple referred from 23 places.'>DEFPUSH_BUTTON</a> = 3
<a id='L27' name='L27'></a> 27 <em class='brace'>}</em> <a href='../R/button_flags_t.html' title='Multiple referred from 11 places.'>button_flags_t</a>;
<a id='L28' name='L28'></a> 28
<a id='L29' name='L29'></a> 29 <em class='comment'>/*** structures declarations (and typedefs of structures)*****************************************/</em>
<a id='L30' name='L30'></a> 30
<a id='L31' name='L31'></a> 31 <strong class='reserved'>typedef</strong> <strong class='reserved'>struct</strong> <a href='../R/WButton.html' title='Multiple referred from 46 places.'>WButton</a>
<a id='L32' name='L32'></a> 32 <em class='brace'>{</em>
<a id='L33' name='L33'></a> 33 <a href='../D/Widget.html' title='Multiple defined in 2 places.'>Widget</a> <a href='../Y/widget.html' title='Multiple used in 164 places.'>widget</a>;
<a id='L34' name='L34'></a> 34 <strong class='reserved'>int</strong> <a href='../Y/action.html' title='Multiple used in 144 places.'>action</a>; <em class='comment'>// what to do when pressed</em>
<a id='L35' name='L35'></a> 35
<a id='L36' name='L36'></a> 36 <a href='../S/lib--widget--button.h.html#L27' title='Defined at 27 in lib/widget/button.h.'>button_flags_t</a> <a href='../Y/flags.html' title='Multiple used in 398 places.'>flags</a>; <em class='comment'>// button flags</em>
<a id='L37' name='L37'></a> 37 <a href='../D/hotkey_t.html' title='Multiple defined in 2 places.'>hotkey_t</a> <a href='../Y/text.html' title='Multiple used in 951 places.'>text</a>; <em class='comment'>// text of button, contain hotkey too</em>
<a id='L38' name='L38'></a> 38 <strong class='reserved'>int</strong> <a href='../Y/hotpos.html' title='Multiple used in 15 places.'>hotpos</a>; <em class='comment'>// offset hot KEY char in text</em>
<a id='L39' name='L39'></a> 39 <a href='../Y/bcback_fn.html' title='Multiple used in 8 places.'>bcback_fn</a> <a href='../Y/callback.html' title='Multiple used in 108 places.'>callback</a>; <em class='comment'>// callback function</em>
<a id='L40' name='L40'></a> 40 <em class='brace'>}</em> <a href='../R/WButton.html' title='Multiple referred from 46 places.'>WButton</a>;
<a id='L41' name='L41'></a> 41
<a id='L42' name='L42'></a> 42 <em class='comment'>/*** global variables defined in .c file *********************************************************/</em>
<a id='L43' name='L43'></a> 43
<a id='L44' name='L44'></a> 44 <em class='comment'>/*** declarations of public functions ************************************************************/</em>
<a id='L45' name='L45'></a> 45
<a id='L46' name='L46'></a> 46 <a href='../D/WButton.html' title='Multiple defined in 2 places.'>WButton</a> *<a href='../S/lib--widget--button.c.html#L207' title='Defined at 207 in lib/widget/button.c.'>button_new</a> (<strong class='reserved'>int</strong> <a href='../Y/y.html' title='Multiple used in 587 places.'>y</a>, <strong class='reserved'>int</strong> <a href='../Y/x.html' title='Multiple used in 677 places.'>x</a>, <strong class='reserved'>int</strong> <a href='../Y/action.html' title='Multiple used in 144 places.'>action</a>, <a href='../S/lib--widget--button.h.html#L27' title='Defined at 27 in lib/widget/button.h.'>button_flags_t</a> <a href='../Y/flags.html' title='Multiple used in 398 places.'>flags</a>, <strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/text.html' title='Multiple used in 951 places.'>text</a>,
<a id='L47' name='L47'></a> 47 <a href='../Y/bcback_fn.html' title='Multiple used in 8 places.'>bcback_fn</a> <a href='../Y/callback.html' title='Multiple used in 108 places.'>callback</a>);
<a id='L48' name='L48'></a> 48 <strong class='reserved'>char</strong> *<a href='../S/lib--widget--button.c.html#L231' title='Defined at 231 in lib/widget/button.c.'>button_get_text</a> (<strong class='reserved'>const</strong> <a href='../D/WButton.html' title='Multiple defined in 2 places.'>WButton</a> *<a href='../Y/b.html' title='Multiple used in 653 places.'>b</a>);
<a id='L49' name='L49'></a> 49 <strong class='reserved'>void</strong> <a href='../S/lib--widget--button.c.html#L239' title='Defined at 239 in lib/widget/button.c.'>button_set_text</a> (<a href='../D/WButton.html' title='Multiple defined in 2 places.'>WButton</a> *<a href='../Y/b.html' title='Multiple used in 653 places.'>b</a>, <strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/text.html' title='Multiple used in 951 places.'>text</a>);
<a id='L50' name='L50'></a> 50 <strong class='reserved'>int</strong> <a href='../S/lib--widget--button.c.html#L261' title='Defined at 261 in lib/widget/button.c.'>button_get_width</a> (<strong class='reserved'>const</strong> <a href='../D/WButton.html' title='Multiple defined in 2 places.'>WButton</a> *<a href='../Y/b.html' title='Multiple used in 653 places.'>b</a>);
<a id='L51' name='L51'></a> 51
<a id='L52' name='L52'></a> 52 <a href='../S/lib--widget--widget-common.h.html#L66' title='Defined at 66 in lib/widget/widget-common.h.'>cb_ret_t</a> <a href='../S/lib--widget--button.c.html#L62' title='Defined at 62 in lib/widget/button.c.'>button_default_callback</a> (<a href='../D/Widget.html' title='Multiple defined in 2 places.'>Widget</a> *<a href='../Y/w.html' title='Multiple used in 1387 places.'>w</a>, <a href='../D/Widget.html' title='Multiple defined in 2 places.'>Widget</a> *<a href='../Y/sender.html' title='Multiple used in 173 places.'>sender</a>, <a href='../S/lib--widget--widget-common.h.html#L53' title='Defined at 53 in lib/widget/widget-common.h.'>widget_msg_t</a> <a href='../Y/msg.html' title='Multiple used in 342 places.'>msg</a>, <strong class='reserved'>int</strong> <a href='../Y/parm.html' title='Multiple used in 220 places.'>parm</a>,
<a id='L53' name='L53'></a> 53 <strong class='reserved'>void</strong> *<a href='../Y/data.html' title='Multiple used in 916 places.'>data</a>);
<a id='L54' name='L54'></a> 54 <strong class='reserved'>void</strong> <a href='../S/lib--widget--button.c.html#L184' title='Defined at 184 in lib/widget/button.c.'>button_mouse_default_callback</a> (<a href='../D/Widget.html' title='Multiple defined in 2 places.'>Widget</a> *<a href='../Y/w.html' title='Multiple used in 1387 places.'>w</a>, <a href='../S/lib--widget--mouse.h.html#L34' title='Defined at 34 in lib/widget/mouse.h.'>mouse_msg_t</a> <a href='../Y/msg.html' title='Multiple used in 342 places.'>msg</a>, <a href='../S/lib--widget--mouse.h.html#L53' title='Defined at 53 in lib/widget/mouse.h.'>mouse_event_t</a> *<a href='../Y/event.html' title='Multiple used in 188 places.'>event</a>);
<a id='L55' name='L55'></a> 55
<a id='L56' name='L56'></a> 56 <em class='comment'>/*** inline functions ****************************************************************************/</em>
<a id='L57' name='L57'></a> 57
<a id='L58' name='L58'></a> 58 <em class='sharp'>#endif</em>
</pre>
<hr />
<a id='BOTTOM' name='BOTTOM'></a>
<em class='comment'>/* <img class='icon' src='../icons/n_left.png' alt='[previous]' /><img class='icon' src='../icons/n_right.png' alt='[next]' /><img class='icon' src='../icons/n_first.png' alt='[first]' /><img class='icon' src='../icons/n_last.png' alt='[last]' /><a href='#TOP'><img class='icon' src='../icons/top.png' alt='[top]' /></a><img class='icon' src='../icons/n_bottom.png' alt='[bottom]' /><a href='../mains.html'><img class='icon' src='../icons/index.png' alt='[index]' /></a><a href='../help.html'><img class='icon' src='../icons/help.png' alt='[help]' /></a>&nbsp;<input type='text' readonly onfocus='this.select();' value='+58 lib/widget/button.h' /> */</em>
</body>
</html>