Open3D (C++ API)  0.18.0+fcf98ee
MenuMacOS.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - Open3D: www.open3d.org -
3 // ----------------------------------------------------------------------------
4 // Copyright (c) 2018-2023 www.open3d.org
5 // SPDX-License-Identifier: MIT
6 // ----------------------------------------------------------------------------
7 
8 #pragma once
9 
11 
12 namespace open3d {
13 namespace visualization {
14 namespace gui {
15 
16 class MenuMacOS : public MenuBase {
17 public:
19  virtual ~MenuMacOS();
20 
21  void AddItem(const char* name,
22  ItemId item_id = NO_ITEM,
23  KeyName key = KEY_NONE) override;
24  void AddMenu(const char* name, std::shared_ptr<MenuBase> submenu) override;
25  void AddSeparator() override;
26 
27  void InsertItem(int index,
28  const char* name,
29  ItemId item_id = NO_ITEM,
30  KeyName key = KEY_NONE) override;
31  void InsertMenu(int index,
32  const char* name,
33  std::shared_ptr<MenuBase> submenu) override;
34  void InsertSeparator(int index) override;
35 
36  int GetNumberOfItems() const override;
37 
38  bool IsEnabled(ItemId item_id) const override;
39  void SetEnabled(ItemId item_id, bool enabled) override;
40 
41  bool IsChecked(ItemId item_id) const override;
42  void SetChecked(ItemId item_id, bool checked) override;
43 
44  int CalcHeight(const Theme& theme) const override;
45 
46  bool CheckVisibilityChange() const override;
47 
48  ItemId DrawMenuBar(const DrawContext& context, bool is_enabled) override;
50  const char* name,
51  bool is_enabled) override;
52 
53  void* GetNativePointer() override;
54 
55 private:
56  struct Impl;
57  std::unique_ptr<Impl> impl_;
58 };
59 
60 } // namespace gui
61 } // namespace visualization
62 } // namespace open3d
ImGuiContext * context
Definition: Window.cpp:76
const Theme * theme
Definition: Window.cpp:74
Definition: MenuBase.h:26
static constexpr ItemId NO_ITEM
Definition: MenuBase.h:29
int ItemId
Definition: MenuBase.h:28
Definition: MenuMacOS.h:16
int CalcHeight(const Theme &theme) const override
ItemId DrawMenuBar(const DrawContext &context, bool is_enabled) override
int GetNumberOfItems() const override
ItemId Draw(const DrawContext &context, const char *name, bool is_enabled) override
void SetChecked(ItemId item_id, bool checked) override
void AddItem(const char *name, ItemId item_id=NO_ITEM, KeyName key=KEY_NONE) override
void InsertSeparator(int index) override
void SetEnabled(ItemId item_id, bool enabled) override
bool IsChecked(ItemId item_id) const override
bool CheckVisibilityChange() const override
Returns true if submenu visibility changed on last call to DrawMenuBar.
void InsertMenu(int index, const char *name, std::shared_ptr< MenuBase > submenu) override
bool IsEnabled(ItemId item_id) const override
void AddMenu(const char *name, std::shared_ptr< MenuBase > submenu) override
void InsertItem(int index, const char *name, ItemId item_id=NO_ITEM, KeyName key=KEY_NONE) override
std::string name
Definition: FilePCD.cpp:39
KeyName
Definition: Events.h:96
@ KEY_NONE
Definition: Events.h:97
Definition: PinholeCameraIntrinsic.cpp:16
Definition: Theme.h:20