Exemplo n.º 1
0
        /// <summary>
        /// Add a sub-menu to the menu. The new sub-menu is returned.
        /// </summary>
        /// <remarks>
        /// See also the original CEF documentation in
        /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_menu_model_capi.h">cef/include/capi/cef_menu_model_capi.h</see>.
        /// </remarks>
        public CfxMenuModel AddSubmenu(int commandId, string label)
        {
            var label_pinned = new PinnedString(label);
            var __retval     = CfxApi.cfx_menu_model_add_sub_menu(NativePtr, commandId, label_pinned.Obj.PinnedPtr, label_pinned.Length);

            label_pinned.Obj.Free();
            return(CfxMenuModel.Wrap(__retval));
        }
Exemplo n.º 2
0
        /// <summary>
        /// Insert a sub-menu in the menu at the specified |index|. The new sub-menu is
        /// returned.
        /// </summary>
        /// <remarks>
        /// See also the original CEF documentation in
        /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_menu_model_capi.h">cef/include/capi/cef_menu_model_capi.h</see>.
        /// </remarks>
        public CfxMenuModel InsertSubmenuAt(int index, int commandId, string label)
        {
            var label_pinned = new PinnedString(label);
            var __retval     = CfxApi.cfx_menu_model_insert_sub_menu_at(NativePtr, index, commandId, label_pinned.Obj.PinnedPtr, label_pinned.Length);

            label_pinned.Obj.Free();
            return(CfxMenuModel.Wrap(__retval));
        }
Exemplo n.º 3
0
 /// <summary>
 /// Returns the submenu at the specified |index| or NULL if invalid.
 /// </summary>
 /// <remarks>
 /// See also the original CEF documentation in
 /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_menu_model_capi.h">cef/include/capi/cef_menu_model_capi.h</see>.
 /// </remarks>
 public CfxMenuModel GetSubmenuAt(int index)
 {
     return(CfxMenuModel.Wrap(CfxApi.cfx_menu_model_get_sub_menu_at(NativePtr, index)));
 }
Exemplo n.º 4
0
 /// <summary>
 /// Returns the submenu for the specified |commandId| or NULL if invalid.
 /// </summary>
 /// <remarks>
 /// See also the original CEF documentation in
 /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_menu_model_capi.h">cef/include/capi/cef_menu_model_capi.h</see>.
 /// </remarks>
 public CfxMenuModel GetSubmenu(int commandId)
 {
     return(CfxMenuModel.Wrap(CfxApi.cfx_menu_model_get_sub_menu(NativePtr, commandId)));
 }
Exemplo n.º 5
0
 /// <summary>
 /// Create a new MenuModel with the specified |delegate|.
 /// </summary>
 /// <remarks>
 /// See also the original CEF documentation in
 /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_menu_model_capi.h">cef/include/capi/cef_menu_model_capi.h</see>.
 /// </remarks>
 public static CfxMenuModel Create(CfxMenuModelDelegate @delegate)
 {
     return(CfxMenuModel.Wrap(CfxApi.MenuModel.cfx_menu_model_create(CfxMenuModelDelegate.Unwrap(@delegate))));
 }