|
Open3D (C++ API)
|
#include <FileDialog.h>
Data Structures | |
| struct | Impl |
Public Types | |
| enum | Mode { Mode::OPEN, Mode::SAVE } |
Public Types inherited from open3d::gui::Widget | |
| enum | DrawResult { DrawResult::NONE, DrawResult::REDRAW, DrawResult::RELAYOUT } |
| enum | EventResult { EventResult::IGNORED, EventResult::CONSUMED, EventResult::DISCARD } |
Public Member Functions | |
| FileDialog (Mode type, const char *title, const Theme &theme) | |
| virtual | ~FileDialog () |
| void | SetPath (const char *path) |
| void | AddFilter (const char *filter, const char *description) |
| void | SetOnCancel (std::function< void()> on_cancel) |
| The OnCancel and OnDone callbacks must be specified. More... | |
| void | SetOnDone (std::function< void(const char *)> on_done) |
| The OnCancel and OnDone callbacks must be specified. More... | |
| Size | CalcPreferredSize (const Theme &theme) const override |
| void | OnWillShow () override |
Public Member Functions inherited from open3d::gui::Dialog | |
| Dialog (const char *title) | |
| virtual | ~Dialog () |
| void | Layout (const Theme &theme) override |
| DrawResult | Draw (const DrawContext &context) override |
Public Member Functions inherited from open3d::gui::Widget | |
| Widget () | |
| Widget (const std::vector< std::shared_ptr< Widget >> &children) | |
| virtual | ~Widget () |
| void | AddChild (std::shared_ptr< Widget > child) |
| const std::vector< std::shared_ptr< Widget > > | GetChildren () const |
| const Rect & | GetFrame () const |
| Returns the frame size in pixels. More... | |
| virtual void | SetFrame (const Rect &f) |
| const Color & | GetBackgroundColor () const |
| bool | IsDefaultBackgroundColor () const |
| void | SetBackgroundColor (const Color &color) |
| bool | IsVisible () const |
| virtual void | SetVisible (bool vis) |
| bool | IsEnabled () const |
| virtual void | SetEnabled (bool enabled) |
| virtual EventResult | Mouse (const MouseEvent &e) |
| virtual EventResult | Key (const KeyEvent &e) |
| virtual DrawResult | Tick (const TickEvent &e) |
Protected Member Functions | |
| void | OnDone () |
Protected Member Functions inherited from open3d::gui::Widget | |
| void | DrawImGuiPushEnabledState () |
| void | DrawImGuiPopEnabledState () |
Additional Inherited Members | |
Static Public Attributes inherited from open3d::gui::Widget | |
| static constexpr int | DIM_GROW = 10000 |
|
strong |
|
virtual |
| void open3d::gui::FileDialog::AddFilter | ( | const char * | filter, |
| const char * | description | ||
| ) |
'filter' is a string of extensions separated by a space or comma. An empty filter string matches all extensions. AddFilter(".jpg .png .gif", "Image file (.jpg, .png, .gif)") AddFilter(".jpg", "JPEG image (.jpg)") AddFilter("", "All files")
Reimplemented from open3d::gui::Dialog.
|
protected |
|
overridevirtual |
Reimplemented from open3d::gui::Dialog.
| void open3d::gui::FileDialog::SetOnCancel | ( | std::function< void()> | on_cancel | ) |
The OnCancel and OnDone callbacks must be specified.
| void open3d::gui::FileDialog::SetOnDone | ( | std::function< void(const char *)> | on_done | ) |
The OnCancel and OnDone callbacks must be specified.
| void open3d::gui::FileDialog::SetPath | ( | const char * | path | ) |
May either be a directory or a file. If path is a file, it will be selected if it exists. Defaults to current working directory if no path is specified.
1.8.13