Overview   Project   Class   Tree   Index 
CEF3 C++ API Docs - Version 75.1.4+g4210896+chromium-75.0.3770.100
FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD

(default)
Class CefMenuButton

CefBaseRefCounted
   |
   +--CefView
         |
         +--CefButton
               |
               +--CefLabelButton
                     |
                     +--CefMenuButton

   in cef_menu_button.h

class CefMenuButton
extends CefLabelButton

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.


Method Summary
 static CefRefPtr< CefMenuButton > CreateMenuButton( CefRefPtr< CefMenuButtonDelegate > delegate, const CefString& text, bool with_frame )
          Create a new MenuButton.
 virtual void ShowMenu( CefRefPtr< CefMenuModel > menu_model, const CefPoint& screen_point, cef_menu_anchor_position_t anchor_position )= 0
          Show a menu with contents |menu_model|.
 virtual void TriggerMenu()= 0
          Show the menu for this button.
   
Methods inherited from class CefLabelButton
CreateLabelButton, AsMenuButton, SetText, GetText, SetImage, GetImage, SetTextColor, SetEnabledTextColors, SetFontList, SetHorizontalAlignment, SetMinimumSize, SetMaximumSize
   
Methods inherited from class CefButton
AsLabelButton, SetState, GetState, SetInkDropEnabled, SetTooltipText, SetAccessibleName
   
Methods inherited from class CefView
AsBrowserView, AsButton, AsPanel, AsScrollView, AsTextfield, GetTypeString, ToString, IsValid, IsAttached, IsSame, GetDelegate, GetWindow, GetID, SetID, GetGroupID, SetGroupID, GetParentView, GetViewForID, SetBounds, GetBounds, GetBoundsInScreen, SetSize, GetSize, SetPosition, GetPosition, GetPreferredSize, SizeToPreferredSize, GetMinimumSize, GetMaximumSize, GetHeightForWidth, InvalidateLayout, SetVisible, IsVisible, IsDrawn, SetEnabled, IsEnabled, SetFocusable, IsFocusable, IsAccessibilityFocusable, RequestFocus, SetBackgroundColor, GetBackgroundColor, ConvertPointToScreen, ConvertPointFromScreen, ConvertPointToWindow, ConvertPointFromWindow, ConvertPointToView, ConvertPointFromView
   
Methods inherited from class CefBaseRefCounted
AddRef, Release, HasOneRef, HasAtLeastOneRef
 

Method Detail

CreateMenuButton

public static CefRefPtr< CefMenuButton > CreateMenuButton( CefRefPtr< CefMenuButtonDelegate > delegate, const CefString& text, bool with_frame );
Create a new MenuButton. A |delegate| must be provided to call ShowMenu() when the button is clicked. |text| will be shown on the MenuButton and used as the default accessible name. If |with_frame| is true 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 the button will only have a visible frame on hover/press, left alignment, less padding and no default minimum size.

ShowMenu

public virtual void ShowMenu( CefRefPtr< CefMenuModel > menu_model, const CefPoint& screen_point, cef_menu_anchor_position_t anchor_position )= 0;
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 method should be called from CefMenuButtonDelegate::OnMenuButtonPressed().

TriggerMenu

public virtual void TriggerMenu()= 0;
Show the menu for this button. Results in a call to CefMenuButtonDelegate::OnMenuButtonPressed().

 Overview   Project   Class   Tree   Index 
CEF3 C++ API Docs - Version 75.1.4+g4210896+chromium-75.0.3770.100
FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD

Chromium Embedded Framework (CEF) Copyright © 2016 Marshall A. Greenblatt