5#ifndef MOLYBDEN_MENU_HPP
6#define MOLYBDEN_MENU_HPP
17enum class MenuItemType {
27 MenuItemType type()
const;
30 explicit MenuItem(MenuItemType type);
38 static std::shared_ptr<SeparatorMenuItem> create();
39 static std::shared_ptr<SeparatorMenuItem> cast(
40 std::shared_ptr<MenuItem> item);
45using MenuItems = std::vector<std::shared_ptr<MenuItem>>;
49 MenuItems items()
const;
52 Menu(MenuItemType type, MenuItems items);
60 static std::shared_ptr<CustomMenu> create(MenuItems items);
61 static std::shared_ptr<CustomMenu> create(std::string title, MenuItems items);
62 static std::shared_ptr<CustomMenu> cast(std::shared_ptr<MenuItem> item);
64 CustomMenu(std::string title, MenuItems items);
65 std::string title()
const;
71enum class StandardMenuRole {
82 static std::shared_ptr<StandardMenu> create(StandardMenuRole role);
83 static std::shared_ptr<StandardMenu> create(StandardMenuRole role,
85 static std::shared_ptr<StandardMenu> cast(std::shared_ptr<MenuItem> item);
89 StandardMenuRole role()
const;
92 StandardMenuRole role_;
97using CustomMenuItemAction = std::function<
98 void(std::shared_ptr<Browser>, std::shared_ptr<CustomMenuItem>)>;
102 static std::shared_ptr<CustomMenuItem> create(
104 CustomMenuItemAction action,
105 bool enabled =
true);
106 static std::shared_ptr<CustomMenuItem> cast(std::shared_ptr<MenuItem> item);
107 static std::shared_ptr<CustomMenuItem> fromId(int32_t
id);
110 CustomMenuItemAction action,
111 bool enabled =
true);
114 std::string title()
const;
115 bool isEnabled()
const;
116 CustomMenuItemAction action()
const;
121 CustomMenuItemAction action,
122 bool enabled =
true);
127 bool enabled_ =
true;
128 CustomMenuItemAction action_ =
nullptr;
131enum class StandardMenuItemCommandId {
143 kPrintUsingSystemDialog,
165 kReloadBypassingCache,
180 static std::shared_ptr<StandardMenuItem> create(StandardMenuItemCommandId
id);
181 static std::shared_ptr<StandardMenuItem> cast(std::shared_ptr<MenuItem> item);
185 StandardMenuItemCommandId commandId()
const;
188 StandardMenuItemCommandId command_id_;
192std::shared_ptr<SeparatorMenuItem> Separator();
193std::shared_ptr<CustomMenu>
Menu(MenuItems items);
194std::shared_ptr<CustomMenu>
Menu(std::string title, MenuItems items);
195std::shared_ptr<CustomMenuItem> Item(std::string title,
196 CustomMenuItemAction action,
197 bool enabled =
true);
199std::shared_ptr<StandardMenu> MacApp(MenuItems items);
200std::shared_ptr<StandardMenu>
File(MenuItems items);
201std::shared_ptr<StandardMenu> Edit(MenuItems items);
202std::shared_ptr<StandardMenu> View(MenuItems items);
203std::shared_ptr<StandardMenu> Window(MenuItems items);
204std::shared_ptr<StandardMenu> Help(MenuItems items);
206std::shared_ptr<StandardMenuItem> MacHideApp();
207std::shared_ptr<StandardMenuItem> MacHideOthers();
208std::shared_ptr<StandardMenuItem> MacShowAll();
209std::shared_ptr<StandardMenuItem> MacQuitApp();
211std::shared_ptr<StandardMenuItem> SavePageAs();
212std::shared_ptr<StandardMenuItem> Print();
213std::shared_ptr<StandardMenuItem> PrintUsingSystemDialog();
214std::shared_ptr<StandardMenuItem> CloseWindow();
215std::shared_ptr<StandardMenuItem> Exit();
217std::shared_ptr<StandardMenuItem> Undo();
218std::shared_ptr<StandardMenuItem> Redo();
219std::shared_ptr<StandardMenuItem> Cut();
220std::shared_ptr<StandardMenuItem> Copy();
221std::shared_ptr<StandardMenuItem> Paste();
222std::shared_ptr<StandardMenuItem> PasteAndMatchStyle();
223std::shared_ptr<StandardMenuItem> Delete();
224std::shared_ptr<StandardMenuItem> SelectAll();
225std::shared_ptr<StandardMenuItem> Find();
226std::shared_ptr<StandardMenuItem> FindNext();
227std::shared_ptr<StandardMenuItem> FindPrevious();
229std::shared_ptr<StandardMenuItem> GoBack();
230std::shared_ptr<StandardMenuItem> GoForward();
231std::shared_ptr<StandardMenuItem> Stop();
232std::shared_ptr<StandardMenuItem> Reload();
233std::shared_ptr<StandardMenuItem> ReloadBypassingCache();
234std::shared_ptr<StandardMenuItem> ZoomNormal();
235std::shared_ptr<StandardMenuItem> ZoomIn();
236std::shared_ptr<StandardMenuItem> ZoomOut();
237std::shared_ptr<StandardMenuItem>
FullScreen();
238std::shared_ptr<StandardMenuItem>
DevTools();
239std::shared_ptr<StandardMenuItem> ViewSource();
241std::shared_ptr<StandardMenuItem> MinimizeWindow();
242std::shared_ptr<StandardMenuItem> MaximizeWindow();
The fullscreen controller of the fullscreen mode for HTML elements on the web page.
Definition full_screen.hpp:18
The file data.
Definition upload_data.hpp:255