mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Update include/ comments to Doxygen formatting (see issue #3384)
See related guidelines in the issue.
This commit is contained in:
@ -43,29 +43,29 @@
|
||||
class CefView;
|
||||
|
||||
///
|
||||
// A Layout manager that arranges child views vertically or horizontally in a
|
||||
// side-by-side fashion with spacing around and between the child views. The
|
||||
// child views are always sized according to their preferred size. If the
|
||||
// host's bounds provide insufficient space, child views will be clamped.
|
||||
// Excess space will not be distributed. Methods must be called on the browser
|
||||
// process UI thread unless otherwise indicated.
|
||||
/// A Layout manager that arranges child views vertically or horizontally in a
|
||||
/// side-by-side fashion with spacing around and between the child views. The
|
||||
/// child views are always sized according to their preferred size. If the
|
||||
/// host's bounds provide insufficient space, child views will be clamped.
|
||||
/// Excess space will not be distributed. Methods must be called on the browser
|
||||
/// process UI thread unless otherwise indicated.
|
||||
///
|
||||
/*--cef(source=library)--*/
|
||||
class CefBoxLayout : public CefLayout {
|
||||
public:
|
||||
///
|
||||
// Set the flex weight for the given |view|. Using the preferred size as
|
||||
// the basis, free space along the main axis is distributed to views in the
|
||||
// ratio of their flex weights. Similarly, if the views will overflow the
|
||||
// parent, space is subtracted in these ratios. A flex of 0 means this view is
|
||||
// not resized. Flex values must not be negative.
|
||||
/// Set the flex weight for the given |view|. Using the preferred size as
|
||||
/// the basis, free space along the main axis is distributed to views in the
|
||||
/// ratio of their flex weights. Similarly, if the views will overflow the
|
||||
/// parent, space is subtracted in these ratios. A flex of 0 means this view
|
||||
/// is not resized. Flex values must not be negative.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetFlexForView(CefRefPtr<CefView> view, int flex) = 0;
|
||||
|
||||
///
|
||||
// Clears the flex for the given |view|, causing it to use the default flex
|
||||
// specified via CefBoxLayoutSettings.default_flex.
|
||||
/// Clears the flex for the given |view|, causing it to use the default flex
|
||||
/// specified via CefBoxLayoutSettings.default_flex.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void ClearFlexForView(CefRefPtr<CefView> view) = 0;
|
||||
|
@ -43,18 +43,18 @@
|
||||
#include "include/views/cef_view.h"
|
||||
|
||||
///
|
||||
// A View hosting a CefBrowser instance. Methods must be called on the browser
|
||||
// process UI thread unless otherwise indicated.
|
||||
/// A View hosting a CefBrowser instance. Methods must be called on the browser
|
||||
/// process UI thread unless otherwise indicated.
|
||||
///
|
||||
/*--cef(source=library)--*/
|
||||
class CefBrowserView : public CefView {
|
||||
public:
|
||||
///
|
||||
// Create a new BrowserView. The underlying CefBrowser will not be created
|
||||
// until this view is added to the views hierarchy. The optional |extra_info|
|
||||
// parameter provides an opportunity to specify extra information specific
|
||||
// to the created browser that will be passed to
|
||||
// CefRenderProcessHandler::OnBrowserCreated() in the render process.
|
||||
/// Create a new BrowserView. The underlying CefBrowser will not be created
|
||||
/// until this view is added to the views hierarchy. The optional |extra_info|
|
||||
/// parameter provides an opportunity to specify extra information specific
|
||||
/// to the created browser that will be passed to
|
||||
/// CefRenderProcessHandler::OnBrowserCreated() in the render process.
|
||||
///
|
||||
/*--cef(optional_param=client,optional_param=url,
|
||||
optional_param=request_context,optional_param=delegate,
|
||||
@ -68,37 +68,37 @@ class CefBrowserView : public CefView {
|
||||
CefRefPtr<CefBrowserViewDelegate> delegate);
|
||||
|
||||
///
|
||||
// Returns the BrowserView associated with |browser|.
|
||||
/// Returns the BrowserView associated with |browser|.
|
||||
///
|
||||
/*--cef()--*/
|
||||
static CefRefPtr<CefBrowserView> GetForBrowser(CefRefPtr<CefBrowser> browser);
|
||||
|
||||
///
|
||||
// Returns the CefBrowser hosted by this BrowserView. Will return NULL if the
|
||||
// browser has not yet been created or has already been destroyed.
|
||||
/// Returns the CefBrowser hosted by this BrowserView. Will return NULL if the
|
||||
/// browser has not yet been created or has already been destroyed.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefBrowser> GetBrowser() = 0;
|
||||
|
||||
///
|
||||
// Returns the Chrome toolbar associated with this BrowserView. Only supported
|
||||
// when using the Chrome runtime. The CefBrowserViewDelegate::
|
||||
// GetChromeToolbarType() method must return a value other than
|
||||
// CEF_CTT_NONE and the toolbar will not be available until after this
|
||||
// BrowserView is added to a CefWindow and CefViewDelegate::OnWindowChanged()
|
||||
// has been called.
|
||||
/// Returns the Chrome toolbar associated with this BrowserView. Only
|
||||
/// supported when using the Chrome runtime. The CefBrowserViewDelegate::
|
||||
/// GetChromeToolbarType() method must return a value other than
|
||||
/// CEF_CTT_NONE and the toolbar will not be available until after this
|
||||
/// BrowserView is added to a CefWindow and CefViewDelegate::OnWindowChanged()
|
||||
/// has been called.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefView> GetChromeToolbar() = 0;
|
||||
|
||||
///
|
||||
// Sets whether accelerators registered with CefWindow::SetAccelerator are
|
||||
// triggered before or after the event is sent to the CefBrowser. If
|
||||
// |prefer_accelerators| is true then the matching accelerator will be
|
||||
// triggered immediately and the event will not be sent to the CefBrowser. If
|
||||
// |prefer_accelerators| is false then the matching accelerator will only be
|
||||
// triggered if the event is not handled by web content or by
|
||||
// CefKeyboardHandler. The default value is false.
|
||||
/// Sets whether accelerators registered with CefWindow::SetAccelerator are
|
||||
/// triggered before or after the event is sent to the CefBrowser. If
|
||||
/// |prefer_accelerators| is true then the matching accelerator will be
|
||||
/// triggered immediately and the event will not be sent to the CefBrowser. If
|
||||
/// |prefer_accelerators| is false then the matching accelerator will only be
|
||||
/// triggered if the event is not handled by web content or by
|
||||
/// CefKeyboardHandler. The default value is false.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetPreferAccelerators(bool prefer_accelerators) = 0;
|
||||
|
@ -45,9 +45,9 @@ class CefBrowser;
|
||||
class CefBrowserView;
|
||||
|
||||
///
|
||||
// Implement this interface to handle BrowserView events. The methods of this
|
||||
// class will be called on the browser process UI thread unless otherwise
|
||||
// indicated.
|
||||
/// Implement this interface to handle BrowserView events. The methods of this
|
||||
/// class will be called on the browser process UI thread unless otherwise
|
||||
/// indicated.
|
||||
///
|
||||
/*--cef(source=client)--*/
|
||||
class CefBrowserViewDelegate : public CefViewDelegate {
|
||||
@ -55,31 +55,31 @@ class CefBrowserViewDelegate : public CefViewDelegate {
|
||||
typedef cef_chrome_toolbar_type_t ChromeToolbarType;
|
||||
|
||||
///
|
||||
// Called when |browser| associated with |browser_view| is created. This
|
||||
// method will be called after CefLifeSpanHandler::OnAfterCreated() is called
|
||||
// for |browser| and before OnPopupBrowserViewCreated() is called for
|
||||
// |browser|'s parent delegate if |browser| is a popup.
|
||||
/// Called when |browser| associated with |browser_view| is created. This
|
||||
/// method will be called after CefLifeSpanHandler::OnAfterCreated() is called
|
||||
/// for |browser| and before OnPopupBrowserViewCreated() is called for
|
||||
/// |browser|'s parent delegate if |browser| is a popup.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void OnBrowserCreated(CefRefPtr<CefBrowserView> browser_view,
|
||||
CefRefPtr<CefBrowser> browser) {}
|
||||
|
||||
///
|
||||
// Called when |browser| associated with |browser_view| is destroyed. Release
|
||||
// all references to |browser| and do not attempt to execute any methods on
|
||||
// |browser| after this callback returns. This method will be called before
|
||||
// CefLifeSpanHandler::OnBeforeClose() is called for |browser|.
|
||||
/// Called when |browser| associated with |browser_view| is destroyed. Release
|
||||
/// all references to |browser| and do not attempt to execute any methods on
|
||||
/// |browser| after this callback returns. This method will be called before
|
||||
/// CefLifeSpanHandler::OnBeforeClose() is called for |browser|.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void OnBrowserDestroyed(CefRefPtr<CefBrowserView> browser_view,
|
||||
CefRefPtr<CefBrowser> browser) {}
|
||||
|
||||
///
|
||||
// Called before a new popup BrowserView is created. The popup originated
|
||||
// from |browser_view|. |settings| and |client| are the values returned from
|
||||
// CefLifeSpanHandler::OnBeforePopup(). |is_devtools| will be true if the
|
||||
// popup will be a DevTools browser. Return the delegate that will be used for
|
||||
// the new popup BrowserView.
|
||||
/// Called before a new popup BrowserView is created. The popup originated
|
||||
/// from |browser_view|. |settings| and |client| are the values returned from
|
||||
/// CefLifeSpanHandler::OnBeforePopup(). |is_devtools| will be true if the
|
||||
/// popup will be a DevTools browser. Return the delegate that will be used
|
||||
/// for the new popup BrowserView.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefBrowserViewDelegate> GetDelegateForPopupBrowserView(
|
||||
@ -91,13 +91,13 @@ class CefBrowserViewDelegate : public CefViewDelegate {
|
||||
}
|
||||
|
||||
///
|
||||
// Called after |popup_browser_view| is created. This method will be called
|
||||
// after CefLifeSpanHandler::OnAfterCreated() and OnBrowserCreated() are
|
||||
// called for the new popup browser. The popup originated from |browser_view|.
|
||||
// |is_devtools| will be true if the popup is a DevTools browser. Optionally
|
||||
// add |popup_browser_view| to the views hierarchy yourself and return true.
|
||||
// Otherwise return false and a default CefWindow will be created for the
|
||||
// popup.
|
||||
/// Called after |popup_browser_view| is created. This method will be called
|
||||
/// after CefLifeSpanHandler::OnAfterCreated() and OnBrowserCreated() are
|
||||
/// called for the new popup browser. The popup originated from
|
||||
/// |browser_view|. |is_devtools| will be true if the popup is a DevTools
|
||||
/// browser. Optionally add |popup_browser_view| to the views hierarchy
|
||||
/// yourself and return true. Otherwise return false and a default CefWindow
|
||||
/// will be created for the popup.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool OnPopupBrowserViewCreated(
|
||||
@ -108,9 +108,9 @@ class CefBrowserViewDelegate : public CefViewDelegate {
|
||||
}
|
||||
|
||||
///
|
||||
// Returns the Chrome toolbar type that will be available via
|
||||
// CefBrowserView::GetChromeToolbar(). See that method for related
|
||||
// documentation.
|
||||
/// Returns the Chrome toolbar type that will be available via
|
||||
/// CefBrowserView::GetChromeToolbar(). See that method for related
|
||||
/// documentation.
|
||||
///
|
||||
/*--cef(default_retval=CEF_CTT_NONE)--*/
|
||||
virtual ChromeToolbarType GetChromeToolbarType() { return CEF_CTT_NONE; }
|
||||
|
@ -43,46 +43,47 @@
|
||||
class CefLabelButton;
|
||||
|
||||
///
|
||||
// A View representing a button. Depending on the specific type, the button
|
||||
// could be implemented by a native control or custom rendered. Methods must be
|
||||
// called on the browser process UI thread unless otherwise indicated.
|
||||
/// A View representing a button. Depending on the specific type, the button
|
||||
/// could be implemented by a native control or custom rendered. Methods must be
|
||||
/// called on the browser process UI thread unless otherwise indicated.
|
||||
///
|
||||
/*--cef(source=library)--*/
|
||||
class CefButton : public CefView {
|
||||
public:
|
||||
///
|
||||
// Returns this Button as a LabelButton or NULL if this is not a LabelButton.
|
||||
/// Returns this Button as a LabelButton or NULL if this is not a LabelButton.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefLabelButton> AsLabelButton() = 0;
|
||||
|
||||
///
|
||||
// Sets the current display state of the Button.
|
||||
/// Sets the current display state of the Button.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetState(cef_button_state_t state) = 0;
|
||||
|
||||
///
|
||||
// Returns the current display state of the Button.
|
||||
/// Returns the current display state of the Button.
|
||||
///
|
||||
/*--cef(default_retval=CEF_BUTTON_STATE_NORMAL)--*/
|
||||
virtual cef_button_state_t GetState() = 0;
|
||||
|
||||
///
|
||||
// Sets the Button will use an ink drop effect for displaying state changes.
|
||||
/// Sets the Button will use an ink drop effect for displaying state changes.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetInkDropEnabled(bool enabled) = 0;
|
||||
|
||||
///
|
||||
// Sets the tooltip text that will be displayed when the user hovers the mouse
|
||||
// cursor over the Button.
|
||||
/// Sets the tooltip text that will be displayed when the user hovers the
|
||||
/// mouse cursor over the Button.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetTooltipText(const CefString& tooltip_text) = 0;
|
||||
|
||||
///
|
||||
// Sets the accessible name that will be exposed to assistive technology (AT).
|
||||
/// Sets the accessible name that will be exposed to assistive technology
|
||||
/// (AT).
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetAccessibleName(const CefString& name) = 0;
|
||||
|
@ -43,20 +43,20 @@
|
||||
class CefButton;
|
||||
|
||||
///
|
||||
// Implement this interface to handle Button events. The methods of this class
|
||||
// will be called on the browser process UI thread unless otherwise indicated.
|
||||
/// Implement this interface to handle Button events. The methods of this class
|
||||
/// will be called on the browser process UI thread unless otherwise indicated.
|
||||
///
|
||||
/*--cef(source=client)--*/
|
||||
class CefButtonDelegate : public CefViewDelegate {
|
||||
public:
|
||||
///
|
||||
// Called when |button| is pressed.
|
||||
/// Called when |button| is pressed.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void OnButtonPressed(CefRefPtr<CefButton> button) = 0;
|
||||
|
||||
///
|
||||
// Called when the state of |button| changes.
|
||||
/// Called when the state of |button| changes.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void OnButtonStateChanged(CefRefPtr<CefButton> button) {}
|
||||
|
@ -43,34 +43,34 @@
|
||||
#include "include/cef_base.h"
|
||||
|
||||
///
|
||||
// This class typically, but not always, corresponds to a physical display
|
||||
// connected to the system. A fake Display may exist on a headless system, or a
|
||||
// Display may correspond to a remote, virtual display. All size and position
|
||||
// values are in density independent pixel (DIP) coordinates unless otherwise
|
||||
// indicated. Methods must be called on the browser process UI thread unless
|
||||
// otherwise indicated.
|
||||
/// This class typically, but not always, corresponds to a physical display
|
||||
/// connected to the system. A fake Display may exist on a headless system, or a
|
||||
/// Display may correspond to a remote, virtual display. All size and position
|
||||
/// values are in density independent pixel (DIP) coordinates unless otherwise
|
||||
/// indicated. Methods must be called on the browser process UI thread unless
|
||||
/// otherwise indicated.
|
||||
///
|
||||
/*--cef(source=library)--*/
|
||||
class CefDisplay : public CefBaseRefCounted {
|
||||
public:
|
||||
///
|
||||
// Returns the primary Display.
|
||||
/// Returns the primary Display.
|
||||
///
|
||||
/*--cef()--*/
|
||||
static CefRefPtr<CefDisplay> GetPrimaryDisplay();
|
||||
|
||||
///
|
||||
// Returns the Display nearest |point|. Set |input_pixel_coords| to true if
|
||||
// |point| is in pixel screen coordinates instead of DIP screen coordinates.
|
||||
/// Returns the Display nearest |point|. Set |input_pixel_coords| to true if
|
||||
/// |point| is in pixel screen coordinates instead of DIP screen coordinates.
|
||||
///
|
||||
/*--cef()--*/
|
||||
static CefRefPtr<CefDisplay> GetDisplayNearestPoint(const CefPoint& point,
|
||||
bool input_pixel_coords);
|
||||
|
||||
///
|
||||
// Returns the Display that most closely intersects |bounds|. Set
|
||||
// |input_pixel_coords| to true if |bounds| is in pixel screen coordinates
|
||||
// instead of DIP screen coordinates.
|
||||
/// Returns the Display that most closely intersects |bounds|. Set
|
||||
/// |input_pixel_coords| to true if |bounds| is in pixel screen coordinates
|
||||
/// instead of DIP screen coordinates.
|
||||
///
|
||||
/*--cef()--*/
|
||||
static CefRefPtr<CefDisplay> GetDisplayMatchingBounds(
|
||||
@ -78,64 +78,64 @@ class CefDisplay : public CefBaseRefCounted {
|
||||
bool input_pixel_coords);
|
||||
|
||||
///
|
||||
// Returns the total number of Displays. Mirrored displays are excluded; this
|
||||
// method is intended to return the number of distinct, usable displays.
|
||||
/// Returns the total number of Displays. Mirrored displays are excluded; this
|
||||
/// method is intended to return the number of distinct, usable displays.
|
||||
///
|
||||
/*--cef()--*/
|
||||
static size_t GetDisplayCount();
|
||||
|
||||
///
|
||||
// Returns all Displays. Mirrored displays are excluded; this method is
|
||||
// intended to return distinct, usable displays.
|
||||
/// Returns all Displays. Mirrored displays are excluded; this method is
|
||||
/// intended to return distinct, usable displays.
|
||||
///
|
||||
/*--cef(count_func=displays:GetDisplayCount)--*/
|
||||
static void GetAllDisplays(std::vector<CefRefPtr<CefDisplay>>& displays);
|
||||
|
||||
///
|
||||
// Returns the unique identifier for this Display.
|
||||
/// Returns the unique identifier for this Display.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual int64 GetID() = 0;
|
||||
|
||||
///
|
||||
// Returns this Display's device pixel scale factor. This specifies how much
|
||||
// the UI should be scaled when the actual output has more pixels than
|
||||
// standard displays (which is around 100~120dpi). The potential return values
|
||||
// differ by platform.
|
||||
/// Returns this Display's device pixel scale factor. This specifies how much
|
||||
/// the UI should be scaled when the actual output has more pixels than
|
||||
/// standard displays (which is around 100~120dpi). The potential return
|
||||
/// values differ by platform.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual float GetDeviceScaleFactor() = 0;
|
||||
|
||||
///
|
||||
// Convert |point| from DIP coordinates to pixel coordinates using this
|
||||
// Display's device scale factor.
|
||||
/// Convert |point| from DIP coordinates to pixel coordinates using this
|
||||
/// Display's device scale factor.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void ConvertPointToPixels(CefPoint& point) = 0;
|
||||
|
||||
///
|
||||
// Convert |point| from pixel coordinates to DIP coordinates using this
|
||||
// Display's device scale factor.
|
||||
/// Convert |point| from pixel coordinates to DIP coordinates using this
|
||||
/// Display's device scale factor.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void ConvertPointFromPixels(CefPoint& point) = 0;
|
||||
|
||||
///
|
||||
// Returns this Display's bounds in DIP screen coordinates. This is the full
|
||||
// size of the display.
|
||||
/// Returns this Display's bounds in DIP screen coordinates. This is the full
|
||||
/// size of the display.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRect GetBounds() = 0;
|
||||
|
||||
///
|
||||
// Returns this Display's work area in DIP screen coordinates. This excludes
|
||||
// areas of the display that are occupied with window manager toolbars, etc.
|
||||
/// Returns this Display's work area in DIP screen coordinates. This excludes
|
||||
/// areas of the display that are occupied with window manager toolbars, etc.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRect GetWorkArea() = 0;
|
||||
|
||||
///
|
||||
// Returns this Display's rotation in degrees.
|
||||
/// Returns this Display's rotation in degrees.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual int GetRotation() = 0;
|
||||
|
@ -41,9 +41,9 @@
|
||||
#include "include/views/cef_layout.h"
|
||||
|
||||
///
|
||||
// A simple Layout that causes the associated Panel's one child to be sized to
|
||||
// match the bounds of its parent. Methods must be called on the browser process
|
||||
// UI thread unless otherwise indicated.
|
||||
/// A simple Layout that causes the associated Panel's one child to be sized to
|
||||
/// match the bounds of its parent. Methods must be called on the browser
|
||||
/// process UI thread unless otherwise indicated.
|
||||
///
|
||||
/*--cef(source=library)--*/
|
||||
class CefFillLayout : public CefLayout {};
|
||||
|
@ -45,16 +45,16 @@
|
||||
class CefMenuButton;
|
||||
|
||||
///
|
||||
// LabelButton is a button with optional text and/or icon. Methods must be
|
||||
// called on the browser process UI thread unless otherwise indicated.
|
||||
/// LabelButton is a button with optional text and/or icon. Methods must be
|
||||
/// called on the browser process UI thread unless otherwise indicated.
|
||||
///
|
||||
/*--cef(source=library)--*/
|
||||
class CefLabelButton : public CefButton {
|
||||
public:
|
||||
///
|
||||
// Create a new LabelButton. A |delegate| must be provided to handle the
|
||||
// button click. |text| will be shown on the LabelButton and used as the
|
||||
// default accessible name.
|
||||
/// Create a new LabelButton. A |delegate| must be provided to handle the
|
||||
/// button click. |text| will be shown on the LabelButton and used as the
|
||||
/// default accessible name.
|
||||
///
|
||||
/*--cef(optional_param=text)--*/
|
||||
static CefRefPtr<CefLabelButton> CreateLabelButton(
|
||||
@ -62,84 +62,85 @@ class CefLabelButton : public CefButton {
|
||||
const CefString& text);
|
||||
|
||||
///
|
||||
// Returns this LabelButton as a MenuButton or NULL if this is not a
|
||||
// MenuButton.
|
||||
/// Returns this LabelButton as a MenuButton or NULL if this is not a
|
||||
/// MenuButton.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefMenuButton> AsMenuButton() = 0;
|
||||
|
||||
///
|
||||
// Sets the text shown on the LabelButton. By default |text| will also be used
|
||||
// as the accessible name.
|
||||
/// Sets the text shown on the LabelButton. By default |text| will also be
|
||||
/// used as the accessible name.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetText(const CefString& text) = 0;
|
||||
|
||||
///
|
||||
// Returns the text shown on the LabelButton.
|
||||
/// Returns the text shown on the LabelButton.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefString GetText() = 0;
|
||||
|
||||
///
|
||||
// Sets the image shown for |button_state|. When this Button is drawn if no
|
||||
// image exists for the current state then the image for
|
||||
// CEF_BUTTON_STATE_NORMAL, if any, will be shown.
|
||||
/// Sets the image shown for |button_state|. When this Button is drawn if no
|
||||
/// image exists for the current state then the image for
|
||||
/// CEF_BUTTON_STATE_NORMAL, if any, will be shown.
|
||||
///
|
||||
/*--cef(optional_param=image)--*/
|
||||
virtual void SetImage(cef_button_state_t button_state,
|
||||
CefRefPtr<CefImage> image) = 0;
|
||||
|
||||
///
|
||||
// Returns the image shown for |button_state|. If no image exists for that
|
||||
// state then the image for CEF_BUTTON_STATE_NORMAL will be returned.
|
||||
/// Returns the image shown for |button_state|. If no image exists for that
|
||||
/// state then the image for CEF_BUTTON_STATE_NORMAL will be returned.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefImage> GetImage(cef_button_state_t button_state) = 0;
|
||||
|
||||
///
|
||||
// Sets the text color shown for the specified button |for_state| to |color|.
|
||||
/// Sets the text color shown for the specified button |for_state| to |color|.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetTextColor(cef_button_state_t for_state,
|
||||
cef_color_t color) = 0;
|
||||
|
||||
///
|
||||
// Sets the text colors shown for the non-disabled states to |color|.
|
||||
/// Sets the text colors shown for the non-disabled states to |color|.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetEnabledTextColors(cef_color_t color) = 0;
|
||||
|
||||
///
|
||||
// Sets the font list. The format is "<FONT_FAMILY_LIST>,[STYLES] <SIZE>",
|
||||
// where:
|
||||
// - FONT_FAMILY_LIST is a comma-separated list of font family names,
|
||||
// - STYLES is an optional space-separated list of style names (case-sensitive
|
||||
// "Bold" and "Italic" are supported), and
|
||||
// - SIZE is an integer font size in pixels with the suffix "px".
|
||||
//
|
||||
// Here are examples of valid font description strings:
|
||||
// - "Arial, Helvetica, Bold Italic 14px"
|
||||
// - "Arial, 14px"
|
||||
/// Sets the font list. The format is "<FONT_FAMILY_LIST>,[STYLES] <SIZE>",
|
||||
/// where:
|
||||
/// - FONT_FAMILY_LIST is a comma-separated list of font family names,
|
||||
/// - STYLES is an optional space-separated list of style names
|
||||
/// (case-sensitive
|
||||
/// "Bold" and "Italic" are supported), and
|
||||
/// - SIZE is an integer font size in pixels with the suffix "px".
|
||||
///
|
||||
/// Here are examples of valid font description strings:
|
||||
/// - "Arial, Helvetica, Bold Italic 14px"
|
||||
/// - "Arial, 14px"
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetFontList(const CefString& font_list) = 0;
|
||||
|
||||
///
|
||||
// Sets the horizontal alignment; reversed in RTL. Default is
|
||||
// CEF_HORIZONTAL_ALIGNMENT_CENTER.
|
||||
/// Sets the horizontal alignment; reversed in RTL. Default is
|
||||
/// CEF_HORIZONTAL_ALIGNMENT_CENTER.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetHorizontalAlignment(cef_horizontal_alignment_t alignment) = 0;
|
||||
|
||||
///
|
||||
// Reset the minimum size of this LabelButton to |size|.
|
||||
/// Reset the minimum size of this LabelButton to |size|.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetMinimumSize(const CefSize& size) = 0;
|
||||
|
||||
///
|
||||
// Reset the maximum size of this LabelButton to |size|.
|
||||
/// Reset the maximum size of this LabelButton to |size|.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetMaximumSize(const CefSize& size) = 0;
|
||||
|
@ -44,27 +44,27 @@ class CefBoxLayout;
|
||||
class CefFillLayout;
|
||||
|
||||
///
|
||||
// A Layout handles the sizing of the children of a Panel according to
|
||||
// implementation-specific heuristics. Methods must be called on the browser
|
||||
// process UI thread unless otherwise indicated.
|
||||
/// A Layout handles the sizing of the children of a Panel according to
|
||||
/// implementation-specific heuristics. Methods must be called on the browser
|
||||
/// process UI thread unless otherwise indicated.
|
||||
///
|
||||
/*--cef(source=library)--*/
|
||||
class CefLayout : public CefBaseRefCounted {
|
||||
public:
|
||||
///
|
||||
// Returns this Layout as a BoxLayout or NULL if this is not a BoxLayout.
|
||||
/// Returns this Layout as a BoxLayout or NULL if this is not a BoxLayout.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefBoxLayout> AsBoxLayout() = 0;
|
||||
|
||||
///
|
||||
// Returns this Layout as a FillLayout or NULL if this is not a FillLayout.
|
||||
/// Returns this Layout as a FillLayout or NULL if this is not a FillLayout.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefFillLayout> AsFillLayout() = 0;
|
||||
|
||||
///
|
||||
// Returns true if this Layout is valid.
|
||||
/// Returns true if this Layout is valid.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool IsValid() = 0;
|
||||
|
@ -43,22 +43,23 @@
|
||||
#include "include/views/cef_menu_button_delegate.h"
|
||||
|
||||
///
|
||||
// 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.
|
||||
/// 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.
|
||||
///
|
||||
/*--cef(source=library)--*/
|
||||
class CefMenuButton : public CefLabelButton {
|
||||
public:
|
||||
///
|
||||
// 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.
|
||||
/// 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.
|
||||
///
|
||||
/*--cef(optional_param=text)--*/
|
||||
static CefRefPtr<CefMenuButton> CreateMenuButton(
|
||||
@ -66,10 +67,10 @@ class CefMenuButton : public CefLabelButton {
|
||||
const CefString& text);
|
||||
|
||||
///
|
||||
// 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().
|
||||
/// 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().
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void ShowMenu(CefRefPtr<CefMenuModel> menu_model,
|
||||
@ -77,8 +78,8 @@ class CefMenuButton : public CefLabelButton {
|
||||
cef_menu_anchor_position_t anchor_position) = 0;
|
||||
|
||||
///
|
||||
// Show the menu for this button. Results in a call to
|
||||
// CefMenuButtonDelegate::OnMenuButtonPressed().
|
||||
/// Show the menu for this button. Results in a call to
|
||||
/// CefMenuButtonDelegate::OnMenuButtonPressed().
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void TriggerMenu() = 0;
|
||||
|
@ -43,24 +43,24 @@
|
||||
class CefMenuButton;
|
||||
|
||||
///
|
||||
// MenuButton pressed lock is released when this object is destroyed.
|
||||
/// MenuButton pressed lock is released when this object is destroyed.
|
||||
///
|
||||
/*--cef(source=library)--*/
|
||||
class CefMenuButtonPressedLock : public CefBaseRefCounted {};
|
||||
|
||||
///
|
||||
// Implement this interface to handle MenuButton events. The methods of this
|
||||
// class will be called on the browser process UI thread unless otherwise
|
||||
// indicated.
|
||||
/// Implement this interface to handle MenuButton events. The methods of this
|
||||
/// class will be called on the browser process UI thread unless otherwise
|
||||
/// indicated.
|
||||
///
|
||||
/*--cef(source=client)--*/
|
||||
class CefMenuButtonDelegate : public CefButtonDelegate {
|
||||
public:
|
||||
///
|
||||
// Called when |button| is pressed. Call CefMenuButton::ShowMenu() to show a
|
||||
// popup menu at |screen_point|. When showing a custom popup such as a window
|
||||
// keep a reference to |button_pressed_lock| until the popup is hidden to
|
||||
// maintain the pressed button state.
|
||||
/// Called when |button| is pressed. Call CefMenuButton::ShowMenu() to show a
|
||||
/// popup menu at |screen_point|. When showing a custom popup such as a window
|
||||
/// keep a reference to |button_pressed_lock| until the popup is hidden to
|
||||
/// maintain the pressed button state.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void OnMenuButtonPressed(
|
||||
|
@ -44,163 +44,164 @@ class CefView;
|
||||
class CefWindow;
|
||||
|
||||
///
|
||||
// Controller for an overlay that contains a contents View added via
|
||||
// CefWindow::AddOverlayView. Methods exposed by this controller should be
|
||||
// called in preference to methods of the same name exposed by the contents View
|
||||
// unless otherwise indicated. Methods must be called on the browser process UI
|
||||
// thread unless otherwise indicated.
|
||||
/// Controller for an overlay that contains a contents View added via
|
||||
/// CefWindow::AddOverlayView. Methods exposed by this controller should be
|
||||
/// called in preference to methods of the same name exposed by the contents
|
||||
/// View unless otherwise indicated. Methods must be called on the browser
|
||||
/// process UI thread unless otherwise indicated.
|
||||
///
|
||||
/*--cef(source=library)--*/
|
||||
class CefOverlayController : public CefBaseRefCounted {
|
||||
public:
|
||||
///
|
||||
// Returns true if this object is valid.
|
||||
/// Returns true if this object is valid.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool IsValid() = 0;
|
||||
|
||||
///
|
||||
// Returns true if this object is the same as |that| object.
|
||||
/// Returns true if this object is the same as |that| object.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool IsSame(CefRefPtr<CefOverlayController> that) = 0;
|
||||
|
||||
///
|
||||
// Returns the contents View for this overlay.
|
||||
/// Returns the contents View for this overlay.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefView> GetContentsView() = 0;
|
||||
|
||||
///
|
||||
// Returns the top-level Window hosting this overlay. Use this method instead
|
||||
// of calling GetWindow() on the contents View.
|
||||
/// Returns the top-level Window hosting this overlay. Use this method instead
|
||||
/// of calling GetWindow() on the contents View.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefWindow> GetWindow() = 0;
|
||||
|
||||
///
|
||||
// Returns the docking mode for this overlay.
|
||||
/// Returns the docking mode for this overlay.
|
||||
///
|
||||
/*--cef(default_retval=CEF_DOCKING_MODE_TOP_LEFT)--*/
|
||||
virtual cef_docking_mode_t GetDockingMode() = 0;
|
||||
|
||||
///
|
||||
// Destroy this overlay.
|
||||
/// Destroy this overlay.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void Destroy() = 0;
|
||||
|
||||
///
|
||||
// Sets the bounds (size and position) of this overlay. This will set the
|
||||
// bounds of the contents View to match and trigger a re-layout if necessary.
|
||||
// |bounds| is in parent coordinates and any insets configured on this overlay
|
||||
// will be ignored. Use this method only for overlays created with a docking
|
||||
// mode value of CEF_DOCKING_MODE_CUSTOM. With other docking modes modify the
|
||||
// insets of this overlay and/or layout of the contents View and call
|
||||
// SizeToPreferredSize() instead to calculate the new size and re-position the
|
||||
// overlay if necessary.
|
||||
/// Sets the bounds (size and position) of this overlay. This will set the
|
||||
/// bounds of the contents View to match and trigger a re-layout if necessary.
|
||||
/// |bounds| is in parent coordinates and any insets configured on this
|
||||
/// overlay will be ignored. Use this method only for overlays created with a
|
||||
/// docking mode value of CEF_DOCKING_MODE_CUSTOM. With other docking modes
|
||||
/// modify the insets of this overlay and/or layout of the contents View and
|
||||
/// call SizeToPreferredSize() instead to calculate the new size and
|
||||
/// re-position the overlay if necessary.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetBounds(const CefRect& bounds) = 0;
|
||||
|
||||
///
|
||||
// Returns the bounds (size and position) of this overlay in parent
|
||||
// coordinates.
|
||||
/// Returns the bounds (size and position) of this overlay in parent
|
||||
/// coordinates.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRect GetBounds() = 0;
|
||||
|
||||
///
|
||||
// Returns the bounds (size and position) of this overlay in DIP screen
|
||||
// coordinates.
|
||||
/// Returns the bounds (size and position) of this overlay in DIP screen
|
||||
/// coordinates.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRect GetBoundsInScreen() = 0;
|
||||
|
||||
///
|
||||
// Sets the size of this overlay without changing the position. This will set
|
||||
// the size of the contents View to match and trigger a re-layout if
|
||||
// necessary. |size| is in parent coordinates and any insets configured on
|
||||
// this overlay will be ignored. Use this method only for overlays created
|
||||
// with a docking mode value of CEF_DOCKING_MODE_CUSTOM. With other docking
|
||||
// modes modify the insets of this overlay and/or layout of the contents View
|
||||
// and call SizeToPreferredSize() instead to calculate the new size and
|
||||
// re-position the overlay if necessary.
|
||||
/// Sets the size of this overlay without changing the position. This will set
|
||||
/// the size of the contents View to match and trigger a re-layout if
|
||||
/// necessary. |size| is in parent coordinates and any insets configured on
|
||||
/// this overlay will be ignored. Use this method only for overlays created
|
||||
/// with a docking mode value of CEF_DOCKING_MODE_CUSTOM. With other docking
|
||||
/// modes modify the insets of this overlay and/or layout of the contents View
|
||||
/// and call SizeToPreferredSize() instead to calculate the new size and
|
||||
/// re-position the overlay if necessary.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetSize(const CefSize& size) = 0;
|
||||
|
||||
///
|
||||
// Returns the size of this overlay in parent coordinates.
|
||||
/// Returns the size of this overlay in parent coordinates.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefSize GetSize() = 0;
|
||||
|
||||
///
|
||||
// Sets the position of this overlay without changing the size. |position| is
|
||||
// in parent coordinates and any insets configured on this overlay will
|
||||
// be ignored. Use this method only for overlays created with a docking mode
|
||||
// value of CEF_DOCKING_MODE_CUSTOM. With other docking modes modify the
|
||||
// insets of this overlay and/or layout of the contents View and call
|
||||
// SizeToPreferredSize() instead to calculate the new size and re-position the
|
||||
// overlay if necessary.
|
||||
/// Sets the position of this overlay without changing the size. |position| is
|
||||
/// in parent coordinates and any insets configured on this overlay will
|
||||
/// be ignored. Use this method only for overlays created with a docking mode
|
||||
/// value of CEF_DOCKING_MODE_CUSTOM. With other docking modes modify the
|
||||
/// insets of this overlay and/or layout of the contents View and call
|
||||
/// SizeToPreferredSize() instead to calculate the new size and re-position
|
||||
/// the overlay if necessary.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetPosition(const CefPoint& position) = 0;
|
||||
|
||||
///
|
||||
// Returns the position of this overlay in parent coordinates.
|
||||
/// Returns the position of this overlay in parent coordinates.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefPoint GetPosition() = 0;
|
||||
|
||||
///
|
||||
// Sets the insets for this overlay. |insets| is in parent coordinates. Use
|
||||
// this method only for overlays created with a docking mode value other than
|
||||
// CEF_DOCKING_MODE_CUSTOM.
|
||||
/// Sets the insets for this overlay. |insets| is in parent coordinates. Use
|
||||
/// this method only for overlays created with a docking mode value other than
|
||||
/// CEF_DOCKING_MODE_CUSTOM.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetInsets(const CefInsets& insets) = 0;
|
||||
|
||||
///
|
||||
// Returns the insets for this overlay in parent coordinates.
|
||||
/// Returns the insets for this overlay in parent coordinates.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefInsets GetInsets() = 0;
|
||||
|
||||
///
|
||||
// Size this overlay to its preferred size and trigger a re-layout if
|
||||
// necessary. The position of overlays created with a docking mode value of
|
||||
// CEF_DOCKING_MODE_CUSTOM will not be modified by calling this method. With
|
||||
// other docking modes this method may re-position the overlay if necessary to
|
||||
// accommodate the new size and any insets configured on the contents View.
|
||||
/// Size this overlay to its preferred size and trigger a re-layout if
|
||||
/// necessary. The position of overlays created with a docking mode value of
|
||||
/// CEF_DOCKING_MODE_CUSTOM will not be modified by calling this method. With
|
||||
/// other docking modes this method may re-position the overlay if necessary
|
||||
/// to accommodate the new size and any insets configured on the contents
|
||||
/// View.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SizeToPreferredSize() = 0;
|
||||
|
||||
///
|
||||
// Sets whether this overlay is visible. Overlays are hidden by default. If
|
||||
// this overlay is hidden then it and any child Views will not be drawn and,
|
||||
// if any of those Views currently have focus, then focus will also be
|
||||
// cleared. Painting is scheduled as needed.
|
||||
/// Sets whether this overlay is visible. Overlays are hidden by default. If
|
||||
/// this overlay is hidden then it and any child Views will not be drawn and,
|
||||
/// if any of those Views currently have focus, then focus will also be
|
||||
/// cleared. Painting is scheduled as needed.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetVisible(bool visible) = 0;
|
||||
|
||||
///
|
||||
// Returns whether this overlay is visible. A View may be visible but still
|
||||
// not drawn in a Window if any parent Views are hidden. Call IsDrawn() to
|
||||
// determine whether this overlay and all parent Views are visible and will be
|
||||
// drawn.
|
||||
/// Returns whether this overlay is visible. A View may be visible but still
|
||||
/// not drawn in a Window if any parent Views are hidden. Call IsDrawn() to
|
||||
/// determine whether this overlay and all parent Views are visible and will
|
||||
/// be drawn.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool IsVisible() = 0;
|
||||
|
||||
///
|
||||
// Returns whether this overlay is visible and drawn in a Window. A View is
|
||||
// drawn if it and all parent Views are visible. To determine if the
|
||||
// containing Window is visible to the user on-screen call IsVisible() on the
|
||||
// Window.
|
||||
/// Returns whether this overlay is visible and drawn in a Window. A View is
|
||||
/// drawn if it and all parent Views are visible. To determine if the
|
||||
/// containing Window is visible to the user on-screen call IsVisible() on the
|
||||
/// Window.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool IsDrawn() = 0;
|
||||
|
@ -47,92 +47,92 @@ class CefLayout;
|
||||
class CefWindow;
|
||||
|
||||
///
|
||||
// A Panel is a container in the views hierarchy that can contain other Views
|
||||
// as children. Methods must be called on the browser process UI thread unless
|
||||
// otherwise indicated.
|
||||
/// A Panel is a container in the views hierarchy that can contain other Views
|
||||
/// as children. Methods must be called on the browser process UI thread unless
|
||||
/// otherwise indicated.
|
||||
///
|
||||
/*--cef(source=library)--*/
|
||||
class CefPanel : public CefView {
|
||||
public:
|
||||
///
|
||||
// Create a new Panel.
|
||||
/// Create a new Panel.
|
||||
///
|
||||
/*--cef(optional_param=delegate)--*/
|
||||
static CefRefPtr<CefPanel> CreatePanel(CefRefPtr<CefPanelDelegate> delegate);
|
||||
|
||||
///
|
||||
// Returns this Panel as a Window or NULL if this is not a Window.
|
||||
/// Returns this Panel as a Window or NULL if this is not a Window.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefWindow> AsWindow() = 0;
|
||||
|
||||
///
|
||||
// Set this Panel's Layout to FillLayout and return the FillLayout object.
|
||||
/// Set this Panel's Layout to FillLayout and return the FillLayout object.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefFillLayout> SetToFillLayout() = 0;
|
||||
|
||||
///
|
||||
// Set this Panel's Layout to BoxLayout and return the BoxLayout object.
|
||||
/// Set this Panel's Layout to BoxLayout and return the BoxLayout object.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefBoxLayout> SetToBoxLayout(
|
||||
const CefBoxLayoutSettings& settings) = 0;
|
||||
|
||||
///
|
||||
// Get the Layout.
|
||||
/// Get the Layout.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefLayout> GetLayout() = 0;
|
||||
|
||||
///
|
||||
// Lay out the child Views (set their bounds based on sizing heuristics
|
||||
// specific to the current Layout).
|
||||
/// Lay out the child Views (set their bounds based on sizing heuristics
|
||||
/// specific to the current Layout).
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void Layout() = 0;
|
||||
|
||||
///
|
||||
// Add a child View.
|
||||
/// Add a child View.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void AddChildView(CefRefPtr<CefView> view) = 0;
|
||||
|
||||
///
|
||||
// Add a child View at the specified |index|. If |index| matches the result of
|
||||
// GetChildCount() then the View will be added at the end.
|
||||
/// Add a child View at the specified |index|. If |index| matches the result
|
||||
/// of GetChildCount() then the View will be added at the end.
|
||||
///
|
||||
/*--cef(index_param=index)--*/
|
||||
virtual void AddChildViewAt(CefRefPtr<CefView> view, int index) = 0;
|
||||
|
||||
///
|
||||
// Move the child View to the specified |index|. A negative value for |index|
|
||||
// will move the View to the end.
|
||||
/// Move the child View to the specified |index|. A negative value for |index|
|
||||
/// will move the View to the end.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void ReorderChildView(CefRefPtr<CefView> view, int index) = 0;
|
||||
|
||||
///
|
||||
// Remove a child View. The View can then be added to another Panel.
|
||||
/// Remove a child View. The View can then be added to another Panel.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void RemoveChildView(CefRefPtr<CefView> view) = 0;
|
||||
|
||||
///
|
||||
// Remove all child Views. The removed Views will be deleted if the client
|
||||
// holds no references to them.
|
||||
/// Remove all child Views. The removed Views will be deleted if the client
|
||||
/// holds no references to them.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void RemoveAllChildViews() = 0;
|
||||
|
||||
///
|
||||
// Returns the number of child Views.
|
||||
/// Returns the number of child Views.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual size_t GetChildViewCount() = 0;
|
||||
|
||||
///
|
||||
// Returns the child View at the specified |index|.
|
||||
/// Returns the child View at the specified |index|.
|
||||
///
|
||||
/*--cef(index_param=index)--*/
|
||||
virtual CefRefPtr<CefView> GetChildViewAt(int index) = 0;
|
||||
|
@ -41,8 +41,8 @@
|
||||
#include "include/views/cef_view_delegate.h"
|
||||
|
||||
///
|
||||
// Implement this interface to handle Panel events. The methods of this class
|
||||
// will be called on the browser process UI thread unless otherwise indicated.
|
||||
/// Implement this interface to handle Panel events. The methods of this class
|
||||
/// will be called on the browser process UI thread unless otherwise indicated.
|
||||
///
|
||||
/*--cef(source=client)--*/
|
||||
class CefPanelDelegate : public CefViewDelegate {};
|
||||
|
@ -41,59 +41,59 @@
|
||||
#include "include/views/cef_view.h"
|
||||
|
||||
///
|
||||
// A ScrollView will show horizontal and/or vertical scrollbars when necessary
|
||||
// based on the size of the attached content view. Methods must be called on the
|
||||
// browser process UI thread unless otherwise indicated.
|
||||
/// A ScrollView will show horizontal and/or vertical scrollbars when necessary
|
||||
/// based on the size of the attached content view. Methods must be called on
|
||||
/// the browser process UI thread unless otherwise indicated.
|
||||
///
|
||||
/*--cef(source=library)--*/
|
||||
class CefScrollView : public CefView {
|
||||
public:
|
||||
///
|
||||
// Create a new ScrollView.
|
||||
/// Create a new ScrollView.
|
||||
///
|
||||
/*--cef(optional_param=delegate)--*/
|
||||
static CefRefPtr<CefScrollView> CreateScrollView(
|
||||
CefRefPtr<CefViewDelegate> delegate);
|
||||
|
||||
///
|
||||
// Set the content View. The content View must have a specified size (e.g.
|
||||
// via CefView::SetBounds or CefViewDelegate::GetPreferredSize).
|
||||
/// Set the content View. The content View must have a specified size (e.g.
|
||||
/// via CefView::SetBounds or CefViewDelegate::GetPreferredSize).
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetContentView(CefRefPtr<CefView> view) = 0;
|
||||
|
||||
///
|
||||
// Returns the content View.
|
||||
/// Returns the content View.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefView> GetContentView() = 0;
|
||||
|
||||
///
|
||||
// Returns the visible region of the content View.
|
||||
/// Returns the visible region of the content View.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRect GetVisibleContentRect() = 0;
|
||||
|
||||
///
|
||||
// Returns true if the horizontal scrollbar is currently showing.
|
||||
/// Returns true if the horizontal scrollbar is currently showing.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool HasHorizontalScrollbar() = 0;
|
||||
|
||||
///
|
||||
// Returns the height of the horizontal scrollbar.
|
||||
/// Returns the height of the horizontal scrollbar.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual int GetHorizontalScrollbarHeight() = 0;
|
||||
|
||||
///
|
||||
// Returns true if the vertical scrollbar is currently showing.
|
||||
/// Returns true if the vertical scrollbar is currently showing.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool HasVerticalScrollbar() = 0;
|
||||
|
||||
///
|
||||
// Returns the width of the vertical scrollbar.
|
||||
/// Returns the width of the vertical scrollbar.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual int GetVerticalScrollbarWidth() = 0;
|
||||
|
@ -42,177 +42,178 @@
|
||||
#include "include/views/cef_view.h"
|
||||
|
||||
///
|
||||
// A Textfield supports editing of text. This control is custom rendered with no
|
||||
// platform-specific code. Methods must be called on the browser process UI
|
||||
// thread unless otherwise indicated.
|
||||
/// A Textfield supports editing of text. This control is custom rendered with
|
||||
/// no platform-specific code. Methods must be called on the browser process UI
|
||||
/// thread unless otherwise indicated.
|
||||
///
|
||||
/*--cef(source=library)--*/
|
||||
class CefTextfield : public CefView {
|
||||
public:
|
||||
///
|
||||
// Create a new Textfield.
|
||||
/// Create a new Textfield.
|
||||
///
|
||||
/*--cef(optional_param=delegate)--*/
|
||||
static CefRefPtr<CefTextfield> CreateTextfield(
|
||||
CefRefPtr<CefTextfieldDelegate> delegate);
|
||||
|
||||
///
|
||||
// Sets whether the text will be displayed as asterisks.
|
||||
/// Sets whether the text will be displayed as asterisks.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetPasswordInput(bool password_input) = 0;
|
||||
|
||||
///
|
||||
// Returns true if the text will be displayed as asterisks.
|
||||
/// Returns true if the text will be displayed as asterisks.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool IsPasswordInput() = 0;
|
||||
|
||||
///
|
||||
// Sets whether the text will read-only.
|
||||
/// Sets whether the text will read-only.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetReadOnly(bool read_only) = 0;
|
||||
|
||||
///
|
||||
// Returns true if the text is read-only.
|
||||
/// Returns true if the text is read-only.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool IsReadOnly() = 0;
|
||||
|
||||
///
|
||||
// Returns the currently displayed text.
|
||||
/// Returns the currently displayed text.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefString GetText() = 0;
|
||||
|
||||
///
|
||||
// Sets the contents to |text|. The cursor will be moved to end of the text if
|
||||
// the current position is outside of the text range.
|
||||
/// Sets the contents to |text|. The cursor will be moved to end of the text
|
||||
/// if the current position is outside of the text range.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetText(const CefString& text) = 0;
|
||||
|
||||
///
|
||||
// Appends |text| to the previously-existing text.
|
||||
/// Appends |text| to the previously-existing text.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void AppendText(const CefString& text) = 0;
|
||||
|
||||
///
|
||||
// Inserts |text| at the current cursor position replacing any selected text.
|
||||
/// Inserts |text| at the current cursor position replacing any selected text.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void InsertOrReplaceText(const CefString& text) = 0;
|
||||
|
||||
///
|
||||
// Returns true if there is any selected text.
|
||||
/// Returns true if there is any selected text.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool HasSelection() = 0;
|
||||
|
||||
///
|
||||
// Returns the currently selected text.
|
||||
/// Returns the currently selected text.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefString GetSelectedText() = 0;
|
||||
|
||||
///
|
||||
// Selects all text. If |reversed| is true the range will end at the logical
|
||||
// beginning of the text; this generally shows the leading portion of text
|
||||
// that overflows its display area.
|
||||
/// Selects all text. If |reversed| is true the range will end at the logical
|
||||
/// beginning of the text; this generally shows the leading portion of text
|
||||
/// that overflows its display area.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SelectAll(bool reversed) = 0;
|
||||
|
||||
///
|
||||
// Clears the text selection and sets the caret to the end.
|
||||
/// Clears the text selection and sets the caret to the end.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void ClearSelection() = 0;
|
||||
|
||||
///
|
||||
// Returns the selected logical text range.
|
||||
/// Returns the selected logical text range.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRange GetSelectedRange() = 0;
|
||||
|
||||
///
|
||||
// Selects the specified logical text range.
|
||||
/// Selects the specified logical text range.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SelectRange(const CefRange& range) = 0;
|
||||
|
||||
///
|
||||
// Returns the current cursor position.
|
||||
/// Returns the current cursor position.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual size_t GetCursorPosition() = 0;
|
||||
|
||||
///
|
||||
// Sets the text color.
|
||||
/// Sets the text color.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetTextColor(cef_color_t color) = 0;
|
||||
|
||||
///
|
||||
// Returns the text color.
|
||||
/// Returns the text color.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual cef_color_t GetTextColor() = 0;
|
||||
|
||||
///
|
||||
// Sets the selection text color.
|
||||
/// Sets the selection text color.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetSelectionTextColor(cef_color_t color) = 0;
|
||||
|
||||
///
|
||||
// Returns the selection text color.
|
||||
/// Returns the selection text color.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual cef_color_t GetSelectionTextColor() = 0;
|
||||
|
||||
///
|
||||
// Sets the selection background color.
|
||||
/// Sets the selection background color.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetSelectionBackgroundColor(cef_color_t color) = 0;
|
||||
|
||||
///
|
||||
// Returns the selection background color.
|
||||
/// Returns the selection background color.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual cef_color_t GetSelectionBackgroundColor() = 0;
|
||||
|
||||
///
|
||||
// Sets the font list. The format is "<FONT_FAMILY_LIST>,[STYLES] <SIZE>",
|
||||
// where:
|
||||
// - FONT_FAMILY_LIST is a comma-separated list of font family names,
|
||||
// - STYLES is an optional space-separated list of style names (case-sensitive
|
||||
// "Bold" and "Italic" are supported), and
|
||||
// - SIZE is an integer font size in pixels with the suffix "px".
|
||||
//
|
||||
// Here are examples of valid font description strings:
|
||||
// - "Arial, Helvetica, Bold Italic 14px"
|
||||
// - "Arial, 14px"
|
||||
/// Sets the font list. The format is "<FONT_FAMILY_LIST>,[STYLES] <SIZE>",
|
||||
/// where:
|
||||
/// - FONT_FAMILY_LIST is a comma-separated list of font family names,
|
||||
/// - STYLES is an optional space-separated list of style names
|
||||
/// (case-sensitive
|
||||
/// "Bold" and "Italic" are supported), and
|
||||
/// - SIZE is an integer font size in pixels with the suffix "px".
|
||||
///
|
||||
/// Here are examples of valid font description strings:
|
||||
/// - "Arial, Helvetica, Bold Italic 14px"
|
||||
/// - "Arial, 14px"
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetFontList(const CefString& font_list) = 0;
|
||||
|
||||
///
|
||||
// Applies |color| to the specified |range| without changing the default
|
||||
// color. If |range| is empty the color will be set on the complete text
|
||||
// contents.
|
||||
/// Applies |color| to the specified |range| without changing the default
|
||||
/// color. If |range| is empty the color will be set on the complete text
|
||||
/// contents.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void ApplyTextColor(cef_color_t color, const CefRange& range) = 0;
|
||||
|
||||
///
|
||||
// Applies |style| to the specified |range| without changing the default
|
||||
// style. If |add| is true the style will be added, otherwise the style will
|
||||
// be removed. If |range| is empty the style will be set on the complete text
|
||||
// contents.
|
||||
/// Applies |style| to the specified |range| without changing the default
|
||||
/// style. If |add| is true the style will be added, otherwise the style will
|
||||
/// be removed. If |range| is empty the style will be set on the complete text
|
||||
/// contents.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void ApplyTextStyle(cef_text_style_t style,
|
||||
@ -220,46 +221,46 @@ class CefTextfield : public CefView {
|
||||
const CefRange& range) = 0;
|
||||
|
||||
///
|
||||
// Returns true if the action associated with the specified command id is
|
||||
// enabled. See additional comments on ExecuteCommand().
|
||||
/// Returns true if the action associated with the specified command id is
|
||||
/// enabled. See additional comments on ExecuteCommand().
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool IsCommandEnabled(cef_text_field_commands_t command_id) = 0;
|
||||
|
||||
///
|
||||
// Performs the action associated with the specified command id.
|
||||
/// Performs the action associated with the specified command id.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void ExecuteCommand(cef_text_field_commands_t command_id) = 0;
|
||||
|
||||
///
|
||||
// Clears Edit history.
|
||||
/// Clears Edit history.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void ClearEditHistory() = 0;
|
||||
|
||||
///
|
||||
// Sets the placeholder text that will be displayed when the Textfield is
|
||||
// empty.
|
||||
/// Sets the placeholder text that will be displayed when the Textfield is
|
||||
/// empty.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetPlaceholderText(const CefString& text) = 0;
|
||||
|
||||
///
|
||||
// Returns the placeholder text that will be displayed when the Textfield is
|
||||
// empty.
|
||||
/// Returns the placeholder text that will be displayed when the Textfield is
|
||||
/// empty.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefString GetPlaceholderText() = 0;
|
||||
|
||||
///
|
||||
// Sets the placeholder text color.
|
||||
/// Sets the placeholder text color.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetPlaceholderTextColor(cef_color_t color) = 0;
|
||||
|
||||
///
|
||||
// Set the accessible name that will be exposed to assistive technology (AT).
|
||||
/// Set the accessible name that will be exposed to assistive technology (AT).
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetAccessibleName(const CefString& name) = 0;
|
||||
|
@ -43,17 +43,17 @@
|
||||
class CefTextfield;
|
||||
|
||||
///
|
||||
// Implement this interface to handle Textfield events. The methods of this
|
||||
// class will be called on the browser process UI thread unless otherwise
|
||||
// indicated.
|
||||
/// Implement this interface to handle Textfield events. The methods of this
|
||||
/// class will be called on the browser process UI thread unless otherwise
|
||||
/// indicated.
|
||||
///
|
||||
/*--cef(source=client)--*/
|
||||
class CefTextfieldDelegate : public CefViewDelegate {
|
||||
public:
|
||||
///
|
||||
// Called when |textfield| recieves a keyboard event. |event| contains
|
||||
// information about the keyboard event. Return true if the keyboard event was
|
||||
// handled or false otherwise for default handling.
|
||||
/// Called when |textfield| recieves a keyboard event. |event| contains
|
||||
/// information about the keyboard event. Return true if the keyboard event
|
||||
/// was handled or false otherwise for default handling.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool OnKeyEvent(CefRefPtr<CefTextfield> textfield,
|
||||
@ -62,7 +62,7 @@ class CefTextfieldDelegate : public CefViewDelegate {
|
||||
}
|
||||
|
||||
///
|
||||
// Called after performing a user action that may change |textfield|.
|
||||
/// Called after performing a user action that may change |textfield|.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void OnAfterUserAction(CefRefPtr<CefTextfield> textfield) {}
|
||||
|
@ -48,372 +48,376 @@ class CefTextfield;
|
||||
class CefWindow;
|
||||
|
||||
///
|
||||
// A View is a rectangle within the views View hierarchy. It is the base class
|
||||
// for all Views. 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.
|
||||
/// A View is a rectangle within the views View hierarchy. It is the base class
|
||||
/// for all Views. 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.
|
||||
///
|
||||
/*--cef(source=library)--*/
|
||||
class CefView : public CefBaseRefCounted {
|
||||
public:
|
||||
///
|
||||
// Returns this View as a BrowserView or NULL if this is not a BrowserView.
|
||||
/// Returns this View as a BrowserView or NULL if this is not a BrowserView.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefBrowserView> AsBrowserView() = 0;
|
||||
|
||||
///
|
||||
// Returns this View as a Button or NULL if this is not a Button.
|
||||
/// Returns this View as a Button or NULL if this is not a Button.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefButton> AsButton() = 0;
|
||||
|
||||
///
|
||||
// Returns this View as a Panel or NULL if this is not a Panel.
|
||||
/// Returns this View as a Panel or NULL if this is not a Panel.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefPanel> AsPanel() = 0;
|
||||
|
||||
///
|
||||
// Returns this View as a ScrollView or NULL if this is not a ScrollView.
|
||||
/// Returns this View as a ScrollView or NULL if this is not a ScrollView.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefScrollView> AsScrollView() = 0;
|
||||
|
||||
///
|
||||
// Returns this View as a Textfield or NULL if this is not a Textfield.
|
||||
/// Returns this View as a Textfield or NULL if this is not a Textfield.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefTextfield> AsTextfield() = 0;
|
||||
|
||||
///
|
||||
// Returns the type of this View as a string. Used primarily for testing
|
||||
// purposes.
|
||||
/// Returns the type of this View as a string. Used primarily for testing
|
||||
/// purposes.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefString GetTypeString() = 0;
|
||||
|
||||
///
|
||||
// Returns a string representation of this View which includes the type and
|
||||
// various type-specific identifying attributes. If |include_children| is true
|
||||
// any child Views will also be included. Used primarily for testing purposes.
|
||||
/// Returns a string representation of this View which includes the type and
|
||||
/// various type-specific identifying attributes. If |include_children| is
|
||||
/// true any child Views will also be included. Used primarily for testing
|
||||
/// purposes.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefString ToString(bool include_children) = 0;
|
||||
|
||||
///
|
||||
// Returns true if this View is valid.
|
||||
/// Returns true if this View is valid.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool IsValid() = 0;
|
||||
|
||||
///
|
||||
// Returns true if this View is currently attached to another View. A View can
|
||||
// only be attached to one View at a time.
|
||||
/// Returns true if this View is currently attached to another View. A View
|
||||
/// can only be attached to one View at a time.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool IsAttached() = 0;
|
||||
|
||||
///
|
||||
// Returns true if this View is the same as |that| View.
|
||||
/// Returns true if this View is the same as |that| View.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool IsSame(CefRefPtr<CefView> that) = 0;
|
||||
|
||||
///
|
||||
// Returns the delegate associated with this View, if any.
|
||||
/// Returns the delegate associated with this View, if any.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefViewDelegate> GetDelegate() = 0;
|
||||
|
||||
///
|
||||
// Returns the top-level Window hosting this View, if any.
|
||||
/// Returns the top-level Window hosting this View, if any.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefWindow> GetWindow() = 0;
|
||||
|
||||
///
|
||||
// Returns the ID for this View.
|
||||
/// Returns the ID for this View.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual int GetID() = 0;
|
||||
|
||||
///
|
||||
// Sets the ID for this View. ID should be unique within the subtree that you
|
||||
// intend to search for it. 0 is the default ID for views.
|
||||
/// Sets the ID for this View. ID should be unique within the subtree that you
|
||||
/// intend to search for it. 0 is the default ID for views.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetID(int id) = 0;
|
||||
|
||||
///
|
||||
// Returns the group id of this View, or -1 if not set.
|
||||
/// Returns the group id of this View, or -1 if not set.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual int GetGroupID() = 0;
|
||||
|
||||
///
|
||||
// A group id is used to tag Views which are part of the same logical group.
|
||||
// Focus can be moved between views with the same group using the arrow keys.
|
||||
// The group id is immutable once it's set.
|
||||
/// A group id is used to tag Views which are part of the same logical group.
|
||||
/// Focus can be moved between views with the same group using the arrow keys.
|
||||
/// The group id is immutable once it's set.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetGroupID(int group_id) = 0;
|
||||
|
||||
///
|
||||
// Returns the View that contains this View, if any.
|
||||
/// Returns the View that contains this View, if any.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefView> GetParentView() = 0;
|
||||
|
||||
///
|
||||
// Recursively descends the view tree starting at this View, and returns the
|
||||
// first child that it encounters with the given ID. Returns NULL if no
|
||||
// matching child view is found.
|
||||
/// Recursively descends the view tree starting at this View, and returns the
|
||||
/// first child that it encounters with the given ID. Returns NULL if no
|
||||
/// matching child view is found.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefView> GetViewForID(int id) = 0;
|
||||
|
||||
///
|
||||
// Sets the bounds (size and position) of this View. |bounds| is in parent
|
||||
// coordinates, or DIP screen coordinates if there is no parent.
|
||||
/// Sets the bounds (size and position) of this View. |bounds| is in parent
|
||||
/// coordinates, or DIP screen coordinates if there is no parent.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetBounds(const CefRect& bounds) = 0;
|
||||
|
||||
///
|
||||
// Returns the bounds (size and position) of this View in parent coordinates,
|
||||
// or DIP screen coordinates if there is no parent.
|
||||
/// Returns the bounds (size and position) of this View in parent coordinates,
|
||||
/// or DIP screen coordinates if there is no parent.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRect GetBounds() = 0;
|
||||
|
||||
///
|
||||
// Returns the bounds (size and position) of this View in DIP screen
|
||||
// coordinates.
|
||||
/// Returns the bounds (size and position) of this View in DIP screen
|
||||
/// coordinates.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRect GetBoundsInScreen() = 0;
|
||||
|
||||
///
|
||||
// Sets the size of this View without changing the position. |size| in
|
||||
// parent coordinates, or DIP screen coordinates if there is no parent.
|
||||
/// Sets the size of this View without changing the position. |size| in
|
||||
/// parent coordinates, or DIP screen coordinates if there is no parent.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetSize(const CefSize& size) = 0;
|
||||
|
||||
///
|
||||
// Returns the size of this View in parent coordinates, or DIP screen
|
||||
// coordinates if there is no parent.
|
||||
/// Returns the size of this View in parent coordinates, or DIP screen
|
||||
/// coordinates if there is no parent.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefSize GetSize() = 0;
|
||||
|
||||
///
|
||||
// Sets the position of this View without changing the size. |position| is in
|
||||
// parent coordinates, or DIP screen coordinates if there is no parent.
|
||||
/// Sets the position of this View without changing the size. |position| is in
|
||||
/// parent coordinates, or DIP screen coordinates if there is no parent.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetPosition(const CefPoint& position) = 0;
|
||||
|
||||
///
|
||||
// Returns the position of this View. Position is in parent coordinates, or
|
||||
// DIP screen coordinates if there is no parent.
|
||||
/// Returns the position of this View. Position is in parent coordinates, or
|
||||
/// DIP screen coordinates if there is no parent.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefPoint GetPosition() = 0;
|
||||
|
||||
///
|
||||
// Sets the insets for this View. |insets| is in parent coordinates, or DIP
|
||||
// screen coordinates if there is no parent.
|
||||
/// Sets the insets for this View. |insets| is in parent coordinates, or DIP
|
||||
/// screen coordinates if there is no parent.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetInsets(const CefInsets& insets) = 0;
|
||||
|
||||
///
|
||||
// Returns the insets for this View in parent coordinates, or DIP screen
|
||||
// coordinates if there is no parent.
|
||||
/// Returns the insets for this View in parent coordinates, or DIP screen
|
||||
/// coordinates if there is no parent.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefInsets GetInsets() = 0;
|
||||
|
||||
///
|
||||
// Returns the size this View would like to be if enough space is available.
|
||||
// Size is in parent coordinates, or DIP screen coordinates if there is no
|
||||
// parent.
|
||||
/// Returns the size this View would like to be if enough space is available.
|
||||
/// Size is in parent coordinates, or DIP screen coordinates if there is no
|
||||
/// parent.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefSize GetPreferredSize() = 0;
|
||||
|
||||
///
|
||||
// Size this View to its preferred size. Size is in parent coordinates, or
|
||||
// DIP screen coordinates if there is no parent.
|
||||
/// Size this View to its preferred size. Size is in parent coordinates, or
|
||||
/// DIP screen coordinates if there is no parent.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SizeToPreferredSize() = 0;
|
||||
|
||||
///
|
||||
// Returns the minimum size for this View. Size is in parent coordinates, or
|
||||
// DIP screen coordinates if there is no parent.
|
||||
/// Returns the minimum size for this View. Size is in parent coordinates, or
|
||||
/// DIP screen coordinates if there is no parent.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefSize GetMinimumSize() = 0;
|
||||
|
||||
///
|
||||
// Returns the maximum size for this View. Size is in parent coordinates, or
|
||||
// DIP screen coordinates if there is no parent.
|
||||
/// Returns the maximum size for this View. Size is in parent coordinates, or
|
||||
/// DIP screen coordinates if there is no parent.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefSize GetMaximumSize() = 0;
|
||||
|
||||
///
|
||||
// Returns the height necessary to display this View with the provided width.
|
||||
/// Returns the height necessary to display this View with the provided width.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual int GetHeightForWidth(int width) = 0;
|
||||
|
||||
///
|
||||
// Indicate that this View and all parent Views require a re-layout. This
|
||||
// ensures the next call to Layout() will propagate to this View even if the
|
||||
// bounds of parent Views do not change.
|
||||
/// Indicate that this View and all parent Views require a re-layout. This
|
||||
/// ensures the next call to Layout() will propagate to this View even if the
|
||||
/// bounds of parent Views do not change.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void InvalidateLayout() = 0;
|
||||
|
||||
///
|
||||
// Sets whether this View is visible. Windows are hidden by default and other
|
||||
// views are visible by default. This View and any parent views must be set as
|
||||
// visible for this View to be drawn in a Window. If this View is set as
|
||||
// hidden then it and any child views will not be drawn and, if any of those
|
||||
// views currently have focus, then focus will also be cleared. Painting is
|
||||
// scheduled as needed. If this View is a Window then calling this method is
|
||||
// equivalent to calling the Window Show() and Hide() methods.
|
||||
/// Sets whether this View is visible. Windows are hidden by default and other
|
||||
/// views are visible by default. This View and any parent views must be set
|
||||
/// as visible for this View to be drawn in a Window. If this View is set as
|
||||
/// hidden then it and any child views will not be drawn and, if any of those
|
||||
/// views currently have focus, then focus will also be cleared. Painting is
|
||||
/// scheduled as needed. If this View is a Window then calling this method is
|
||||
/// equivalent to calling the Window Show() and Hide() methods.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetVisible(bool visible) = 0;
|
||||
|
||||
///
|
||||
// Returns whether this View is visible. A view may be visible but still not
|
||||
// drawn in a Window if any parent views are hidden. If this View is a Window
|
||||
// then a return value of true indicates that this Window is currently visible
|
||||
// to the user on-screen. If this View is not a Window then call IsDrawn() to
|
||||
// determine whether this View and all parent views are visible and will be
|
||||
// drawn.
|
||||
/// Returns whether this View is visible. A view may be visible but still not
|
||||
/// drawn in a Window if any parent views are hidden. If this View is a Window
|
||||
/// then a return value of true indicates that this Window is currently
|
||||
/// visible to the user on-screen. If this View is not a Window then call
|
||||
/// IsDrawn() to determine whether this View and all parent views are visible
|
||||
/// and will be drawn.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool IsVisible() = 0;
|
||||
|
||||
///
|
||||
// Returns whether this View is visible and drawn in a Window. A view is drawn
|
||||
// if it and all parent views are visible. If this View is a Window then
|
||||
// calling this method is equivalent to calling IsVisible(). Otherwise, to
|
||||
// determine if the containing Window is visible to the user on-screen call
|
||||
// IsVisible() on the Window.
|
||||
/// Returns whether this View is visible and drawn in a Window. A view is
|
||||
/// drawn if it and all parent views are visible. If this View is a Window
|
||||
/// then calling this method is equivalent to calling IsVisible(). Otherwise,
|
||||
/// to determine if the containing Window is visible to the user on-screen
|
||||
/// call IsVisible() on the Window.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool IsDrawn() = 0;
|
||||
|
||||
///
|
||||
// Set whether this View is enabled. A disabled View does not receive keyboard
|
||||
// or mouse inputs. If |enabled| differs from the current value the View will
|
||||
// be repainted. Also, clears focus if the focused View is disabled.
|
||||
/// Set whether this View is enabled. A disabled View does not receive
|
||||
/// keyboard or mouse inputs. If |enabled| differs from the current value the
|
||||
/// View will be repainted. Also, clears focus if the focused View is
|
||||
/// disabled.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetEnabled(bool enabled) = 0;
|
||||
|
||||
///
|
||||
// Returns whether this View is enabled.
|
||||
/// Returns whether this View is enabled.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool IsEnabled() = 0;
|
||||
|
||||
///
|
||||
// Sets whether this View is capable of taking focus. It will clear focus if
|
||||
// the focused View is set to be non-focusable. This is false by default so
|
||||
// that a View used as a container does not get the focus.
|
||||
/// Sets whether this View is capable of taking focus. It will clear focus if
|
||||
/// the focused View is set to be non-focusable. This is false by default so
|
||||
/// that a View used as a container does not get the focus.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetFocusable(bool focusable) = 0;
|
||||
|
||||
///
|
||||
// Returns true if this View is focusable, enabled and drawn.
|
||||
/// Returns true if this View is focusable, enabled and drawn.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool IsFocusable() = 0;
|
||||
|
||||
///
|
||||
// Return whether this View is focusable when the user requires full keyboard
|
||||
// access, even though it may not be normally focusable.
|
||||
/// Return whether this View is focusable when the user requires full keyboard
|
||||
/// access, even though it may not be normally focusable.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool IsAccessibilityFocusable() = 0;
|
||||
|
||||
///
|
||||
// Request keyboard focus. If this View is focusable it will become the
|
||||
// focused View.
|
||||
/// Request keyboard focus. If this View is focusable it will become the
|
||||
/// focused View.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void RequestFocus() = 0;
|
||||
|
||||
///
|
||||
// Sets the background color for this View.
|
||||
/// Sets the background color for this View.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetBackgroundColor(cef_color_t color) = 0;
|
||||
|
||||
///
|
||||
// Returns the background color for this View.
|
||||
/// Returns the background color for this View.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual cef_color_t GetBackgroundColor() = 0;
|
||||
|
||||
///
|
||||
// Convert |point| from this View's coordinate system to DIP screen
|
||||
// coordinates. This View must belong to a Window when calling this method.
|
||||
// Returns true if the conversion is successful or false otherwise. Use
|
||||
// CefDisplay::ConvertPointToPixels() after calling this method if further
|
||||
// conversion to display-specific pixel coordinates is desired.
|
||||
/// Convert |point| from this View's coordinate system to DIP screen
|
||||
/// coordinates. This View must belong to a Window when calling this method.
|
||||
/// Returns true if the conversion is successful or false otherwise. Use
|
||||
/// CefDisplay::ConvertPointToPixels() after calling this method if further
|
||||
/// conversion to display-specific pixel coordinates is desired.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool ConvertPointToScreen(CefPoint& point) = 0;
|
||||
|
||||
///
|
||||
// Convert |point| to this View's coordinate system from DIP screen
|
||||
// coordinates. This View must belong to a Window when calling this method.
|
||||
// Returns true if the conversion is successful or false otherwise. Use
|
||||
// CefDisplay::ConvertPointFromPixels() before calling this method if
|
||||
// conversion from display-specific pixel coordinates is necessary.
|
||||
/// Convert |point| to this View's coordinate system from DIP screen
|
||||
/// coordinates. This View must belong to a Window when calling this method.
|
||||
/// Returns true if the conversion is successful or false otherwise. Use
|
||||
/// CefDisplay::ConvertPointFromPixels() before calling this method if
|
||||
/// conversion from display-specific pixel coordinates is necessary.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool ConvertPointFromScreen(CefPoint& point) = 0;
|
||||
|
||||
///
|
||||
// Convert |point| from this View's coordinate system to that of the Window.
|
||||
// This View must belong to a Window when calling this method. Returns true if
|
||||
// the conversion is successful or false otherwise.
|
||||
/// Convert |point| from this View's coordinate system to that of the Window.
|
||||
/// This View must belong to a Window when calling this method. Returns true
|
||||
/// if the conversion is successful or false otherwise.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool ConvertPointToWindow(CefPoint& point) = 0;
|
||||
|
||||
///
|
||||
// Convert |point| to this View's coordinate system from that of the Window.
|
||||
// This View must belong to a Window when calling this method. Returns true if
|
||||
// the conversion is successful or false otherwise.
|
||||
/// Convert |point| to this View's coordinate system from that of the Window.
|
||||
/// This View must belong to a Window when calling this method. Returns true
|
||||
/// if the conversion is successful or false otherwise.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool ConvertPointFromWindow(CefPoint& point) = 0;
|
||||
|
||||
///
|
||||
// Convert |point| from this View's coordinate system to that of |view|.
|
||||
// |view| needs to be in the same Window but not necessarily the same view
|
||||
// hierarchy. Returns true if the conversion is successful or false otherwise.
|
||||
/// Convert |point| from this View's coordinate system to that of |view|.
|
||||
/// |view| needs to be in the same Window but not necessarily the same view
|
||||
/// hierarchy. Returns true if the conversion is successful or false
|
||||
/// otherwise.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool ConvertPointToView(CefRefPtr<CefView> view, CefPoint& point) = 0;
|
||||
|
||||
///
|
||||
// Convert |point| to this View's coordinate system from that |view|. |view|
|
||||
// needs to be in the same Window but not necessarily the same view hierarchy.
|
||||
// Returns true if the conversion is successful or false otherwise.
|
||||
/// Convert |point| to this View's coordinate system from that |view|. |view|
|
||||
/// needs to be in the same Window but not necessarily the same view
|
||||
/// hierarchy. Returns true if the conversion is successful or false
|
||||
/// otherwise.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool ConvertPointFromView(CefRefPtr<CefView> view,
|
||||
|
@ -43,17 +43,17 @@
|
||||
class CefView;
|
||||
|
||||
///
|
||||
// Implement this interface to handle view events. All size and position values
|
||||
// are in density independent pixels (DIP) unless otherwise indicated. The
|
||||
// methods of this class will be called on the browser process UI thread unless
|
||||
// otherwise indicated.
|
||||
/// Implement this interface to handle view events. All size and position values
|
||||
/// are in density independent pixels (DIP) unless otherwise indicated. The
|
||||
/// methods of this class will be called on the browser process UI thread unless
|
||||
/// otherwise indicated.
|
||||
///
|
||||
/*--cef(source=client)--*/
|
||||
class CefViewDelegate : public virtual CefBaseRefCounted {
|
||||
public:
|
||||
///
|
||||
// Return the preferred size for |view|. The Layout will use this information
|
||||
// to determine the display size.
|
||||
/// Return the preferred size for |view|. The Layout will use this information
|
||||
/// to determine the display size.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefSize GetPreferredSize(CefRefPtr<CefView> view) {
|
||||
@ -61,22 +61,22 @@ class CefViewDelegate : public virtual CefBaseRefCounted {
|
||||
}
|
||||
|
||||
///
|
||||
// Return the minimum size for |view|.
|
||||
/// Return the minimum size for |view|.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefSize GetMinimumSize(CefRefPtr<CefView> view) { return CefSize(); }
|
||||
|
||||
///
|
||||
// Return the maximum size for |view|.
|
||||
/// Return the maximum size for |view|.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefSize GetMaximumSize(CefRefPtr<CefView> view) { return CefSize(); }
|
||||
|
||||
///
|
||||
// Return the height necessary to display |view| with the provided |width|.
|
||||
// If not specified the result of GetPreferredSize().height will be used by
|
||||
// default. Override if |view|'s preferred height depends upon the width
|
||||
// (for example, with Labels).
|
||||
/// Return the height necessary to display |view| with the provided |width|.
|
||||
/// If not specified the result of GetPreferredSize().height will be used by
|
||||
/// default. Override if |view|'s preferred height depends upon the width
|
||||
/// (for example, with Labels).
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual int GetHeightForWidth(CefRefPtr<CefView> view, int width) {
|
||||
@ -84,11 +84,11 @@ class CefViewDelegate : public virtual CefBaseRefCounted {
|
||||
}
|
||||
|
||||
///
|
||||
// Called when the parent of |view| has changed. If |view| is being added to
|
||||
// |parent| then |added| will be true. If |view| is being removed from
|
||||
// |parent| then |added| will be false. If |view| is being reparented the
|
||||
// remove notification will be sent before the add notification. Do not modify
|
||||
// the view hierarchy in this callback.
|
||||
/// Called when the parent of |view| has changed. If |view| is being added to
|
||||
/// |parent| then |added| will be true. If |view| is being removed from
|
||||
/// |parent| then |added| will be false. If |view| is being reparented the
|
||||
/// remove notification will be sent before the add notification. Do not
|
||||
/// modify the view hierarchy in this callback.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void OnParentViewChanged(CefRefPtr<CefView> view,
|
||||
@ -96,11 +96,11 @@ class CefViewDelegate : public virtual CefBaseRefCounted {
|
||||
CefRefPtr<CefView> parent) {}
|
||||
|
||||
///
|
||||
// Called when a child of |view| has changed. If |child| is being added to
|
||||
// |view| then |added| will be true. If |child| is being removed from |view|
|
||||
// then |added| will be false. If |child| is being reparented the remove
|
||||
// notification will be sent to the old parent before the add notification is
|
||||
// sent to the new parent. Do not modify the view hierarchy in this callback.
|
||||
/// Called when a child of |view| has changed. If |child| is being added to
|
||||
/// |view| then |added| will be true. If |child| is being removed from |view|
|
||||
/// then |added| will be false. If |child| is being reparented the remove
|
||||
/// notification will be sent to the old parent before the add notification is
|
||||
/// sent to the new parent. Do not modify the view hierarchy in this callback.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void OnChildViewChanged(CefRefPtr<CefView> view,
|
||||
@ -108,26 +108,26 @@ class CefViewDelegate : public virtual CefBaseRefCounted {
|
||||
CefRefPtr<CefView> child) {}
|
||||
|
||||
///
|
||||
// Called when |view| is added or removed from the CefWindow.
|
||||
/// Called when |view| is added or removed from the CefWindow.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void OnWindowChanged(CefRefPtr<CefView> view, bool added) {}
|
||||
|
||||
///
|
||||
// Called when the layout of |view| has changed.
|
||||
/// Called when the layout of |view| has changed.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void OnLayoutChanged(CefRefPtr<CefView> view,
|
||||
const CefRect& new_bounds) {}
|
||||
|
||||
///
|
||||
// Called when |view| gains focus.
|
||||
/// Called when |view| gains focus.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void OnFocus(CefRefPtr<CefView> view) {}
|
||||
|
||||
///
|
||||
// Called when |view| loses focus.
|
||||
/// Called when |view| loses focus.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void OnBlur(CefRefPtr<CefView> view) {}
|
||||
|
@ -46,200 +46,200 @@
|
||||
#include "include/views/cef_window_delegate.h"
|
||||
|
||||
///
|
||||
// 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.
|
||||
/// 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.
|
||||
///
|
||||
/*--cef(source=library)--*/
|
||||
class CefWindow : public CefPanel {
|
||||
public:
|
||||
///
|
||||
// Create a new Window.
|
||||
/// Create a new Window.
|
||||
///
|
||||
/*--cef(optional_param=delegate)--*/
|
||||
static CefRefPtr<CefWindow> CreateTopLevelWindow(
|
||||
CefRefPtr<CefWindowDelegate> delegate);
|
||||
|
||||
///
|
||||
// Show the Window.
|
||||
/// Show the Window.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void Show() = 0;
|
||||
|
||||
///
|
||||
// Hide the Window.
|
||||
/// Hide the Window.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void Hide() = 0;
|
||||
|
||||
///
|
||||
// Sizes the Window to |size| and centers it in the current display.
|
||||
/// Sizes the Window to |size| and centers it in the current display.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void CenterWindow(const CefSize& size) = 0;
|
||||
|
||||
///
|
||||
// Close the Window.
|
||||
/// Close the Window.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void Close() = 0;
|
||||
|
||||
///
|
||||
// Returns true if the Window has been closed.
|
||||
/// Returns true if the Window has been closed.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool IsClosed() = 0;
|
||||
|
||||
///
|
||||
// Activate the Window, assuming it already exists and is visible.
|
||||
/// Activate the Window, assuming it already exists and is visible.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void Activate() = 0;
|
||||
|
||||
///
|
||||
// Deactivate the Window, making the next Window in the Z order the active
|
||||
// Window.
|
||||
/// Deactivate the Window, making the next Window in the Z order the active
|
||||
/// Window.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void Deactivate() = 0;
|
||||
|
||||
///
|
||||
// Returns whether the Window is the currently active Window.
|
||||
/// Returns whether the Window is the currently active Window.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool IsActive() = 0;
|
||||
|
||||
///
|
||||
// Bring this Window to the top of other Windows in the Windowing system.
|
||||
/// Bring this Window to the top of other Windows in the Windowing system.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void BringToTop() = 0;
|
||||
|
||||
///
|
||||
// Set the Window to be on top of other Windows in the Windowing system.
|
||||
/// Set the Window to be on top of other Windows in the Windowing system.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetAlwaysOnTop(bool on_top) = 0;
|
||||
|
||||
///
|
||||
// Returns whether the Window has been set to be on top of other Windows in
|
||||
// the Windowing system.
|
||||
/// Returns whether the Window has been set to be on top of other Windows in
|
||||
/// the Windowing system.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool IsAlwaysOnTop() = 0;
|
||||
|
||||
///
|
||||
// Maximize the Window.
|
||||
/// Maximize the Window.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void Maximize() = 0;
|
||||
|
||||
///
|
||||
// Minimize the Window.
|
||||
/// Minimize the Window.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void Minimize() = 0;
|
||||
|
||||
///
|
||||
// Restore the Window.
|
||||
/// Restore the Window.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void Restore() = 0;
|
||||
|
||||
///
|
||||
// Set fullscreen Window state.
|
||||
/// Set fullscreen Window state.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetFullscreen(bool fullscreen) = 0;
|
||||
|
||||
///
|
||||
// Returns true if the Window is maximized.
|
||||
/// Returns true if the Window is maximized.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool IsMaximized() = 0;
|
||||
|
||||
///
|
||||
// Returns true if the Window is minimized.
|
||||
/// Returns true if the Window is minimized.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool IsMinimized() = 0;
|
||||
|
||||
///
|
||||
// Returns true if the Window is fullscreen.
|
||||
/// Returns true if the Window is fullscreen.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool IsFullscreen() = 0;
|
||||
|
||||
///
|
||||
// Set the Window title.
|
||||
/// Set the Window title.
|
||||
///
|
||||
/*--cef(optional_param=title)--*/
|
||||
virtual void SetTitle(const CefString& title) = 0;
|
||||
|
||||
///
|
||||
// Get the Window title.
|
||||
/// Get the Window title.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefString GetTitle() = 0;
|
||||
|
||||
///
|
||||
// Set the Window icon. This should be a 16x16 icon suitable for use in the
|
||||
// Windows's title bar.
|
||||
/// Set the Window icon. This should be a 16x16 icon suitable for use in the
|
||||
/// Windows's title bar.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetWindowIcon(CefRefPtr<CefImage> image) = 0;
|
||||
|
||||
///
|
||||
// Get the Window icon.
|
||||
/// Get the Window icon.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefImage> GetWindowIcon() = 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.
|
||||
/// 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.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetWindowAppIcon(CefRefPtr<CefImage> image) = 0;
|
||||
|
||||
///
|
||||
// Get the Window App icon.
|
||||
/// Get the Window App icon.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefImage> GetWindowAppIcon() = 0;
|
||||
|
||||
///
|
||||
// Add a View that will be overlayed on the Window contents with absolute
|
||||
// positioning and high z-order. Positioning is controlled by |docking_mode|
|
||||
// as described below. The returned CefOverlayController object is used to
|
||||
// control the overlay. Overlays are hidden by default.
|
||||
//
|
||||
// With CEF_DOCKING_MODE_CUSTOM:
|
||||
// 1. The overlay is initially hidden, sized to |view|'s preferred size, and
|
||||
// positioned in the top-left corner.
|
||||
// 2. Optionally change the overlay position and/or size by calling
|
||||
// CefOverlayController methods.
|
||||
// 3. Call CefOverlayController::SetVisible(true) to show the overlay.
|
||||
// 4. The overlay will be automatically re-sized if |view|'s layout changes.
|
||||
// Optionally change the overlay position and/or size when
|
||||
// OnLayoutChanged is called on the Window's delegate to indicate a
|
||||
// change in Window bounds.
|
||||
//
|
||||
// With other docking modes:
|
||||
// 1. The overlay is initially hidden, sized to |view|'s preferred size, and
|
||||
// positioned based on |docking_mode|.
|
||||
// 2. Call CefOverlayController::SetVisible(true) to show the overlay.
|
||||
// 3. The overlay will be automatically re-sized if |view|'s layout changes
|
||||
// and re-positioned as appropriate when the Window resizes.
|
||||
//
|
||||
// Overlays created by this method will receive a higher z-order then any
|
||||
// child Views added previously. It is therefore recommended to call this
|
||||
// method last after all other child Views have been added so that the overlay
|
||||
// displays as the top-most child of the Window.
|
||||
/// Add a View that will be overlayed on the Window contents with absolute
|
||||
/// positioning and high z-order. Positioning is controlled by |docking_mode|
|
||||
/// as described below. The returned CefOverlayController object is used to
|
||||
/// control the overlay. Overlays are hidden by default.
|
||||
///
|
||||
/// With CEF_DOCKING_MODE_CUSTOM:
|
||||
/// 1. The overlay is initially hidden, sized to |view|'s preferred size,
|
||||
/// and positioned in the top-left corner.
|
||||
/// 2. Optionally change the overlay position and/or size by calling
|
||||
/// CefOverlayController methods.
|
||||
/// 3. Call CefOverlayController::SetVisible(true) to show the overlay.
|
||||
/// 4. The overlay will be automatically re-sized if |view|'s layout
|
||||
/// changes. Optionally change the overlay position and/or size when
|
||||
/// OnLayoutChanged is called on the Window's delegate to indicate a
|
||||
/// change in Window bounds.
|
||||
///
|
||||
/// With other docking modes:
|
||||
/// 1. The overlay is initially hidden, sized to |view|'s preferred size,
|
||||
/// and positioned based on |docking_mode|.
|
||||
/// 2. Call CefOverlayController::SetVisible(true) to show the overlay.
|
||||
/// 3. The overlay will be automatically re-sized if |view|'s layout changes
|
||||
/// and re-positioned as appropriate when the Window resizes.
|
||||
///
|
||||
/// Overlays created by this method will receive a higher z-order then any
|
||||
/// child Views added previously. It is therefore recommended to call this
|
||||
/// method last after all other child Views have been added so that the
|
||||
/// overlay displays as the top-most child of the Window.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefOverlayController> AddOverlayView(
|
||||
@ -247,9 +247,9 @@ class CefWindow : public CefPanel {
|
||||
cef_docking_mode_t docking_mode) = 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|.
|
||||
/// 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|.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void ShowMenu(CefRefPtr<CefMenuModel> menu_model,
|
||||
@ -257,77 +257,78 @@ class CefWindow : public CefPanel {
|
||||
cef_menu_anchor_position_t anchor_position) = 0;
|
||||
|
||||
///
|
||||
// Cancel the menu that is currently showing, if any.
|
||||
/// Cancel the menu that is currently showing, if any.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void CancelMenu() = 0;
|
||||
|
||||
///
|
||||
// Returns the Display that most closely intersects the bounds of this Window.
|
||||
// May return NULL if this Window is not currently displayed.
|
||||
/// Returns the Display that most closely intersects the bounds of this
|
||||
/// Window. May return NULL if this Window is not currently displayed.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefDisplay> GetDisplay() = 0;
|
||||
|
||||
///
|
||||
// Returns the bounds (size and position) of this Window's client area.
|
||||
// Position is in screen coordinates.
|
||||
/// Returns the bounds (size and position) of this Window's client area.
|
||||
/// Position is in screen coordinates.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRect GetClientAreaBoundsInScreen() = 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.
|
||||
/// 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.
|
||||
///
|
||||
/*--cef(optional_param=regions)--*/
|
||||
virtual void SetDraggableRegions(
|
||||
const std::vector<CefDraggableRegion>& regions) = 0;
|
||||
|
||||
///
|
||||
// Retrieve the platform window handle for this Window.
|
||||
/// Retrieve the platform window handle for this Window.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefWindowHandle GetWindowHandle() = 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.
|
||||
/// 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.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SendKeyPress(int key_code, uint32 event_flags) = 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.
|
||||
/// 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.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SendMouseMove(int screen_x, int screen_y) = 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.
|
||||
/// 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.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SendMouseEvents(cef_mouse_button_type_t button,
|
||||
bool mouse_down,
|
||||
bool mouse_up) = 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.
|
||||
/// 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.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetAccelerator(int command_id,
|
||||
@ -337,13 +338,13 @@ class CefWindow : public CefPanel {
|
||||
bool alt_pressed) = 0;
|
||||
|
||||
///
|
||||
// Remove the keyboard accelerator for the specified |command_id|.
|
||||
/// Remove the keyboard accelerator for the specified |command_id|.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void RemoveAccelerator(int command_id) = 0;
|
||||
|
||||
///
|
||||
// Remove all keyboard accelerators.
|
||||
/// Remove all keyboard accelerators.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void RemoveAllAccelerators() = 0;
|
||||
|
@ -43,40 +43,40 @@
|
||||
class CefWindow;
|
||||
|
||||
///
|
||||
// Implement this interface to handle window events. The methods of this class
|
||||
// will be called on the browser process UI thread unless otherwise indicated.
|
||||
/// Implement this interface to handle window events. The methods of this class
|
||||
/// will be called on the browser process UI thread unless otherwise indicated.
|
||||
///
|
||||
/*--cef(source=client)--*/
|
||||
class CefWindowDelegate : public CefPanelDelegate {
|
||||
public:
|
||||
///
|
||||
// Called when |window| is created.
|
||||
/// Called when |window| is created.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void OnWindowCreated(CefRefPtr<CefWindow> window) {}
|
||||
|
||||
///
|
||||
// Called when |window| is destroyed. Release all references to |window| and
|
||||
// do not attempt to execute any methods on |window| after this callback
|
||||
// returns.
|
||||
/// Called when |window| is destroyed. Release all references to |window| and
|
||||
/// do not attempt to execute any methods on |window| after this callback
|
||||
/// returns.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void OnWindowDestroyed(CefRefPtr<CefWindow> window) {}
|
||||
|
||||
///
|
||||
// Called when |window| is activated or deactivated.
|
||||
/// Called when |window| is activated or deactivated.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void OnWindowActivationChanged(CefRefPtr<CefWindow> window,
|
||||
bool active) {}
|
||||
|
||||
///
|
||||
// Return the parent for |window| or NULL if the |window| does not have a
|
||||
// parent. Windows with parents will not get a taskbar button. Set |is_menu|
|
||||
// to true if |window| will be displayed as a menu, in which case it will not
|
||||
// be clipped to the parent window bounds. Set |can_activate_menu| to false
|
||||
// if |is_menu| is true and |window| should not be activated (given keyboard
|
||||
// focus) when displayed.
|
||||
/// Return the parent for |window| or NULL if the |window| does not have a
|
||||
/// parent. Windows with parents will not get a taskbar button. Set |is_menu|
|
||||
/// to true if |window| will be displayed as a menu, in which case it will not
|
||||
/// be clipped to the parent window bounds. Set |can_activate_menu| to false
|
||||
/// if |is_menu| is true and |window| should not be activated (given keyboard
|
||||
/// focus) when displayed.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefWindow> GetParentWindow(CefRefPtr<CefWindow> window,
|
||||
@ -86,12 +86,12 @@ class CefWindowDelegate : public CefPanelDelegate {
|
||||
}
|
||||
|
||||
///
|
||||
// Return the initial bounds for |window| in density independent pixel (DIP)
|
||||
// coordinates. If this method returns an empty CefRect then
|
||||
// GetPreferredSize() will be called to retrieve the size, and the window will
|
||||
// be placed on the screen with origin (0,0). This method can be used in
|
||||
// combination with CefView::GetBoundsInScreen() to restore the previous
|
||||
// window bounds.
|
||||
/// Return the initial bounds for |window| in density independent pixel (DIP)
|
||||
/// coordinates. If this method returns an empty CefRect then
|
||||
/// GetPreferredSize() will be called to retrieve the size, and the window
|
||||
/// will be placed on the screen with origin (0,0). This method can be used in
|
||||
/// combination with CefView::GetBoundsInScreen() to restore the previous
|
||||
/// window bounds.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRect GetInitialBounds(CefRefPtr<CefWindow> window) {
|
||||
@ -99,7 +99,7 @@ class CefWindowDelegate : public CefPanelDelegate {
|
||||
}
|
||||
|
||||
///
|
||||
// Return the initial show state for |window|.
|
||||
/// Return the initial show state for |window|.
|
||||
///
|
||||
/*--cef(default_retval=CEF_SHOW_STATE_NORMAL)--*/
|
||||
virtual cef_show_state_t GetInitialShowState(CefRefPtr<CefWindow> window) {
|
||||
@ -107,42 +107,42 @@ class CefWindowDelegate : public CefPanelDelegate {
|
||||
}
|
||||
|
||||
///
|
||||
// Return true if |window| should be created without a frame or title bar. The
|
||||
// window will be resizable if CanResize() returns true. Use
|
||||
// CefWindow::SetDraggableRegions() to specify draggable regions.
|
||||
/// Return true if |window| should be created without a frame or title bar.
|
||||
/// The window will be resizable if CanResize() returns true. Use
|
||||
/// CefWindow::SetDraggableRegions() to specify draggable regions.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool IsFrameless(CefRefPtr<CefWindow> window) { return false; }
|
||||
|
||||
///
|
||||
// Return true if |window| can be resized.
|
||||
/// Return true if |window| can be resized.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool CanResize(CefRefPtr<CefWindow> window) { return true; }
|
||||
|
||||
///
|
||||
// Return true if |window| can be maximized.
|
||||
/// Return true if |window| can be maximized.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool CanMaximize(CefRefPtr<CefWindow> window) { return true; }
|
||||
|
||||
///
|
||||
// Return true if |window| can be minimized.
|
||||
/// Return true if |window| can be minimized.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool CanMinimize(CefRefPtr<CefWindow> window) { return true; }
|
||||
|
||||
///
|
||||
// Return true if |window| can be closed. This will be called for user-
|
||||
// initiated window close actions and when CefWindow::Close() is called.
|
||||
/// Return true if |window| can be closed. This will be called for user-
|
||||
/// initiated window close actions and when CefWindow::Close() is called.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool CanClose(CefRefPtr<CefWindow> window) { return true; }
|
||||
|
||||
///
|
||||
// Called when a keyboard accelerator registered with
|
||||
// CefWindow::SetAccelerator is triggered. Return true if the accelerator was
|
||||
// handled or false otherwise.
|
||||
/// Called when a keyboard accelerator registered with
|
||||
/// CefWindow::SetAccelerator is triggered. Return true if the accelerator was
|
||||
/// handled or false otherwise.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool OnAccelerator(CefRefPtr<CefWindow> window, int command_id) {
|
||||
@ -150,9 +150,9 @@ class CefWindowDelegate : public CefPanelDelegate {
|
||||
}
|
||||
|
||||
///
|
||||
// Called after all other controls in the window have had a chance to
|
||||
// handle the event. |event| contains information about the keyboard event.
|
||||
// Return true if the keyboard event was handled or false otherwise.
|
||||
/// Called after all other controls in the window have had a chance to
|
||||
/// handle the event. |event| contains information about the keyboard event.
|
||||
/// Return true if the keyboard event was handled or false otherwise.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool OnKeyEvent(CefRefPtr<CefWindow> window,
|
||||
|
Reference in New Issue
Block a user