CEF4Delphi/docs/html/uCEFMenuButton.TCefMenuButtonRef.html
2024-02-24 12:01:31 +01:00

98 lines
7.3 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<title>cef4delphi: uCEFMenuButton: Class TCefMenuButtonRef</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="generator" content="PasDoc 0.16.0-snapshot">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<link rel="StyleSheet" type="text/css" href="pasdoc.css">
</head>
<body>
<span id="TCefMenuButtonRef"></span><h1 class="cio">Class TCefMenuButtonRef</h1>
<div class="sections">
<div class="one_section"><a class="section" href="#PasDoc-Description">Description</a></div><div class="one_section"><a class="section" href="#PasDoc-Hierarchy">Hierarchy</a></div><div class="one_section">Fields</div><div class="one_section"><a class="section" href="#PasDoc-Methods">Methods</a></div><div class="one_section">Properties</div></div>
<span id="PasDoc-Description"></span><h2 class="unit">Unit</h2>
<p class="unitlink">
<a href="uCEFMenuButton.html">uCEFMenuButton</a></p>
<h2 class="declaration">Declaration</h2>
<p class="declaration">
<code>type TCefMenuButtonRef = class(<a class="normal" href="uCEFLabelButton.TCefLabelButtonRef.html">TCefLabelButtonRef</a>, <a class="normal" href="uCEFInterfaces.ICefMenuButton.html">ICefMenuButton</a>)</code></p>
<h2 class="description">Description</h2>
<p>
MenuButton is a button with optional text, icon and/or menu marker that shows a menu when clicked with the left mouse button. All size and position values are in density independent pixels (DIP) unless otherwise indicated. Methods must be called on the browser process UI thread unless otherwise indicated. </p>
<p>
<p>&lt;see href=&quot;<a href="https://bitbucket.org/chromiumembedded/cef/src/master/include/capi/views/cef_menu_button_capi.h">https://bitbucket.org/chromiumembedded/cef/src/master/include/capi/views/cef_menu_button_capi.h</a>&quot;&gt;CEF source file: /include/capi/views/cef_menu_button_capi.h (cef_menu_button_t))</p>
<span id="PasDoc-Hierarchy"></span><h2 class="hierarchy">Hierarchy</h2>
<ul class="hierarchy"><li class="ancestor">TInterfacedObject</li>
<li class="ancestor"><a class="normal" href="uCEFBaseRefCounted.TCefBaseRefCountedRef.html">TCefBaseRefCountedRef</a></li>
<li class="ancestor"><a class="normal" href="uCEFView.TCefViewRef.html">TCefViewRef</a></li>
<li class="ancestor"><a class="normal" href="uCEFButton.TCefButtonRef.html">TCefButtonRef</a></li>
<li class="ancestor"><a class="normal" href="uCEFLabelButton.TCefLabelButtonRef.html">TCefLabelButtonRef</a></li>
<li class="thisitem">TCefMenuButtonRef</li></ul><h2 class="overview">Overview</h2>
<span id="PasDoc-Methods"></span><h3 class="summary">Methods</h3>
<table class="summary wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><code>procedure <strong><a href="uCEFMenuButton.TCefMenuButtonRef.html#ShowMenu-ICefMenuModel-TCefPoint-TCefMenuAnchorPosition-">ShowMenu</a></strong>(const menu_model: <a href="uCEFInterfaces.ICefMenuModel.html">ICefMenuModel</a>; const screen_point: <a href="uCEFTypes.TCefPoint.html">TCefPoint</a>; anchor_position: <a href="uCEFTypes.html#TCefMenuAnchorPosition">TCefMenuAnchorPosition</a>);</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><code>procedure <strong><a href="uCEFMenuButton.TCefMenuButtonRef.html#TriggerMenu">TriggerMenu</a></strong>;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>class function <strong><a href="uCEFMenuButton.TCefMenuButtonRef.html#UnWrap-Pointer-">UnWrap</a></strong>(data: Pointer): <a href="uCEFInterfaces.ICefMenuButton.html">ICefMenuButton</a>;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>class function <strong><a href="uCEFMenuButton.TCefMenuButtonRef.html#CreateMenuButton-ICefMenuButtonDelegate-ustring-">CreateMenuButton</a></strong>(const delegate: <a href="uCEFInterfaces.ICefMenuButtonDelegate.html">ICefMenuButtonDelegate</a>; const text: <a href="uCEFTypes.html#ustring">ustring</a>): <a href="uCEFInterfaces.ICefMenuButton.html">ICefMenuButton</a>;</code></td>
</tr>
</table>
<h2 class="description">Description</h2>
<h3 class="detail">Methods</h3>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><span id="ShowMenu-ICefMenuModel-TCefPoint-TCefMenuAnchorPosition-"></span><code>procedure <strong>ShowMenu</strong>(const menu_model: <a href="uCEFInterfaces.ICefMenuModel.html">ICefMenuModel</a>; const screen_point: <a href="uCEFTypes.TCefPoint.html">TCefPoint</a>; anchor_position: <a href="uCEFTypes.html#TCefMenuAnchorPosition">TCefMenuAnchorPosition</a>);</code></td>
</tr>
<tr><td colspan="2">
<p>
Show a menu with contents |menu_model|. |screen_point| specifies the menu position in screen coordinates. |anchor_position| specifies how the menu will be anchored relative to |screen_point|. This function should be called from ICefMenuButtonDelegate.OnMenuButtonPressed(). </p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><span id="TriggerMenu"></span><code>procedure <strong>TriggerMenu</strong>;</code></td>
</tr>
<tr><td colspan="2">
<p>
Show the menu for this button. Results in a call to ICefMenuButtonDelegate.OnMenuButtonPressed(). </p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><span id="UnWrap-Pointer-"></span><code>class function <strong>UnWrap</strong>(data: Pointer): <a href="uCEFInterfaces.ICefMenuButton.html">ICefMenuButton</a>;</code></td>
</tr>
<tr><td colspan="2">
<p>
Returns a ICefMenuButton instance using a PCefMenuButton data pointer. </p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><span id="CreateMenuButton-ICefMenuButtonDelegate-ustring-"></span><code>class function <strong>CreateMenuButton</strong>(const delegate: <a href="uCEFInterfaces.ICefMenuButtonDelegate.html">ICefMenuButtonDelegate</a>; const text: <a href="uCEFTypes.html#ustring">ustring</a>): <a href="uCEFInterfaces.ICefMenuButton.html">ICefMenuButton</a>;</code></td>
</tr>
<tr><td colspan="2">
<p>
Create a new MenuButton. A |delegate| must be provided to call show_menu() when the button is clicked. |text| will be shown on the MenuButton and used as the default accessible name. If |with_frame| is true (1) the button will have a visible frame at all times, center alignment, additional padding and a default minimum size of 70x33 DIP. If |with_frame| is false (0) the button will only have a visible frame on hover/press, left alignment, less padding and no default minimum size. </p>
</td></tr>
</table>
<hr><span class="appinfo"><em>Generated by <a href="https://pasdoc.github.io/">PasDoc 0.16.0-snapshot</a>. </em>
</span>
</body></html>