Overview   Project   Class   Tree   Index 
CEF3 C++ API Docs - Version 80.1.4+g8927396+chromium-80.0.3987.149
FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD

(default)
Class CefWindow

CefBaseRefCounted
   |
   +--CefView
         |
         +--CefPanel
               |
               +--CefWindow

   in cef_window.h

class CefWindow
extends CefPanel

A Window is a top-level Window/widget in the Views hierarchy. By default it will have a non-client area with title bar, icon and buttons that supports moving and resizing. 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
 virtual void Activate()= 0
          Activate the Window, assuming it already exists and is visible.
 virtual void BringToTop()= 0
          Bring this Window to the top of other Windows in the Windowing system.
 virtual void CancelMenu()= 0
          Cancel the menu that is currently showing, if any.
 virtual void CenterWindow( const CefSize& size )= 0
          Sizes the Window to |size| and centers it in the current display.
 virtual void Close()= 0
          Close the Window.
 static CefRefPtr< CefWindow > CreateTopLevelWindow( CefRefPtr< CefWindowDelegate > delegate )
          Create a new Window.
 virtual void Deactivate()= 0
          Deactivate the Window, making the next Window in the Z order the active Window.
 virtual CefRect GetClientAreaBoundsInScreen()= 0
          Returns the bounds (size and position) of this Window's client area.
 virtual CefRefPtr< CefDisplay > GetDisplay()= 0
          Returns the Display that most closely intersects the bounds of this Window.
 virtual CefString GetTitle()= 0
          Get the Window title.
 virtual CefRefPtr< CefImage > GetWindowAppIcon()= 0
          Get the Window App icon.
 virtual CefWindowHandle GetWindowHandle()= 0
          Retrieve the platform window handle for this Window.
 virtual CefRefPtr< CefImage > GetWindowIcon()= 0
          Get the Window icon.
 virtual void Hide()= 0
          Hide the Window.
 virtual bool IsActive()= 0
          Returns whether the Window is the currently active Window.
 virtual bool IsAlwaysOnTop()= 0
          Returns whether the Window has been set to be on top of other Windows in the Windowing system.
 virtual bool IsClosed()= 0
          Returns true if the Window has been closed.
 virtual bool IsFullscreen()= 0
          Returns true if the Window is fullscreen.
 virtual bool IsMaximized()= 0
          Returns true if the Window is maximized.
 virtual bool IsMinimized()= 0
          Returns true if the Window is minimized.
 virtual void Maximize()= 0
          Maximize the Window.
 virtual void Minimize()= 0
          Minimize the Window.
 virtual void RemoveAccelerator( int command_id )= 0
          Remove the keyboard accelerator for the specified |command_id|.
 virtual void RemoveAllAccelerators()= 0
          Remove all keyboard accelerators.
 virtual void Restore()= 0
          Restore the Window.
 virtual void SendKeyPress( int key_code, uint32 event_flags )= 0
          Simulate a key press.
 virtual void SendMouseEvents( cef_mouse_button_type_t button, bool mouse_down, bool mouse_up )= 0
          Simulate mouse down and/or mouse up events.
 virtual void SendMouseMove( int screen_x, int screen_y )= 0
          Simulate a mouse move.
 virtual void SetAccelerator( int command_id, int key_code, bool shift_pressed, bool ctrl_pressed, bool alt_pressed )= 0
          Set the keyboard accelerator for the specified |command_id|.
 virtual void SetAlwaysOnTop( bool on_top )= 0
          Set the Window to be on top of other Windows in the Windowing system.
 virtual void SetDraggableRegions( const std::vector< CefDraggableRegion >& regions )= 0
          Set the regions where mouse events will be intercepted by this Window to support drag operations.
 virtual void SetFullscreen( bool fullscreen )= 0
          Set fullscreen Window state.
 virtual void SetTitle( const CefString& title )= 0
          Set the Window title.
 virtual void SetWindowAppIcon( CefRefPtr< CefImage > image )= 0
          Set the Window App icon.
 virtual void SetWindowIcon( CefRefPtr< CefImage > image )= 0
          Set the Window icon.
 virtual void Show()= 0
          Show the Window.
 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|.
   
Methods inherited from class CefPanel
CreatePanel, AsWindow, SetToFillLayout, SetToBoxLayout, GetLayout, Layout, AddChildView, AddChildViewAt, ReorderChildView, RemoveChildView, RemoveAllChildViews, GetChildViewCount, GetChildViewAt
   
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

Activate

public virtual void Activate()= 0;
Activate the Window, assuming it already exists and is visible.

BringToTop

public virtual void BringToTop()= 0;
Bring this Window to the top of other Windows in the Windowing system.

CancelMenu

public virtual void CancelMenu()= 0;
Cancel the menu that is currently showing, if any.

CenterWindow

public virtual void CenterWindow( const CefSize& size )= 0;
Sizes the Window to |size| and centers it in the current display.

Close

public virtual void Close()= 0;
Close the Window.

CreateTopLevelWindow

public static CefRefPtr< CefWindow > CreateTopLevelWindow( CefRefPtr< CefWindowDelegate > delegate );
Create a new Window.

Deactivate

public virtual void Deactivate()= 0;
Deactivate the Window, making the next Window in the Z order the active Window.

GetClientAreaBoundsInScreen

public virtual CefRect GetClientAreaBoundsInScreen()= 0;
Returns the bounds (size and position) of this Window's client area. Position is in screen coordinates.

GetDisplay

public virtual CefRefPtr< CefDisplay > GetDisplay()= 0;
Returns the Display that most closely intersects the bounds of this Window. May return NULL if this Window is not currently displayed.

GetTitle

public virtual CefString GetTitle()= 0;
Get the Window title.

GetWindowAppIcon

public virtual CefRefPtr< CefImage > GetWindowAppIcon()= 0;
Get the Window App icon.

GetWindowHandle

public virtual CefWindowHandle GetWindowHandle()= 0;
Retrieve the platform window handle for this Window.

GetWindowIcon

public virtual CefRefPtr< CefImage > GetWindowIcon()= 0;
Get the Window icon.

Hide

public virtual void Hide()= 0;
Hide the Window.

IsActive

public virtual bool IsActive()= 0;
Returns whether the Window is the currently active Window.

IsAlwaysOnTop

public virtual bool IsAlwaysOnTop()= 0;
Returns whether the Window has been set to be on top of other Windows in the Windowing system.

IsClosed

public virtual bool IsClosed()= 0;
Returns true if the Window has been closed.

IsFullscreen

public virtual bool IsFullscreen()= 0;
Returns true if the Window is fullscreen.

IsMaximized

public virtual bool IsMaximized()= 0;
Returns true if the Window is maximized.

IsMinimized

public virtual bool IsMinimized()= 0;
Returns true if the Window is minimized.

Maximize

public virtual void Maximize()= 0;
Maximize the Window.

Minimize

public virtual void Minimize()= 0;
Minimize the Window.

RemoveAccelerator

public virtual void RemoveAccelerator( int command_id )= 0;
Remove the keyboard accelerator for the specified |command_id|.

RemoveAllAccelerators

public virtual void RemoveAllAccelerators()= 0;
Remove all keyboard accelerators.

Restore

public virtual void Restore()= 0;
Restore the Window.

SendKeyPress

public virtual void SendKeyPress( int key_code, uint32 event_flags )= 0;
Simulate a key press. |key_code| is the VKEY_* value from Chromium's ui/events/keycodes/keyboard_codes.h header (VK_* values on Windows). |event_flags| is some combination of EVENTFLAG_SHIFT_DOWN, EVENTFLAG_CONTROL_DOWN and/or EVENTFLAG_ALT_DOWN. This method is exposed primarily for testing purposes.

SendMouseEvents

public virtual void SendMouseEvents( cef_mouse_button_type_t button, bool mouse_down, bool mouse_up )= 0;
Simulate mouse down and/or mouse up events. |button| is the mouse button type. If |mouse_down| is true a mouse down event will be sent. If |mouse_up| is true a mouse up event will be sent. If both are true a mouse down event will be sent followed by a mouse up event (equivalent to clicking the mouse button). The events will be sent using the current cursor position so make sure to call SendMouseMove() first to position the mouse. This method is exposed primarily for testing purposes.

SendMouseMove

public virtual void SendMouseMove( int screen_x, int screen_y )= 0;
Simulate a mouse move. The mouse cursor will be moved to the specified (screen_x, screen_y) position. This method is exposed primarily for testing purposes.

SetAccelerator

public virtual void SetAccelerator( int command_id, int key_code, bool shift_pressed, bool ctrl_pressed, bool alt_pressed )= 0;
Set the keyboard accelerator for the specified |command_id|. |key_code| can be any virtual key or character value. CefWindowDelegate::OnAccelerator will be called if the keyboard combination is triggered while this window has focus.

SetAlwaysOnTop

public virtual void SetAlwaysOnTop( bool on_top )= 0;
Set the Window to be on top of other Windows in the Windowing system.

SetDraggableRegions

public virtual void SetDraggableRegions( const std::vector< CefDraggableRegion >& regions )= 0;
Set the regions where mouse events will be intercepted by this Window to support drag operations. Call this method with an empty vector to clear the draggable regions. The draggable region bounds should be in window coordinates.

SetFullscreen

public virtual void SetFullscreen( bool fullscreen )= 0;
Set fullscreen Window state.

SetTitle

public virtual void SetTitle( const CefString& title )= 0;
Set the Window title.

SetWindowAppIcon

public virtual void SetWindowAppIcon( CefRefPtr< CefImage > image )= 0;
Set the Window App icon. This should be a larger icon for use in the host environment app switching UI. On Windows, this is the ICON_BIG used in Alt-Tab list and Windows taskbar. The Window icon will be used by default if no Window App icon is specified.

SetWindowIcon

public virtual void SetWindowIcon( CefRefPtr< CefImage > image )= 0;
Set the Window icon. This should be a 16x16 icon suitable for use in the Windows's title bar.

Show

public virtual void Show()= 0;
Show the Window.

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|.

 Overview   Project   Class   Tree   Index 
CEF3 C++ API Docs - Version 80.1.4+g8927396+chromium-80.0.3987.149
FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD

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