Open3D (C++ API)
0.12.0
|
#include <FileDialog.h>
Data Structures | |
struct | Impl |
Public Types | |
enum | Mode { Mode::OPEN, Mode::SAVE } |
Public Types inherited from open3d::visualization::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::visualization::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::visualization::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::visualization::gui::Widget | |
void | DrawImGuiPushEnabledState () |
void | DrawImGuiPopEnabledState () |
Additional Inherited Members | |
Static Public Attributes inherited from open3d::visualization::gui::Widget | |
static constexpr int | DIM_GROW = 10000 |
|
strong |
open3d::visualization::gui::FileDialog::FileDialog | ( | Mode | type, |
const char * | title, | ||
const Theme & | theme | ||
) |
|
virtual |
void open3d::visualization::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")
|
overridevirtual |
Reimplemented from open3d::visualization::gui::Dialog.
|
protected |
|
overridevirtual |
Reimplemented from open3d::visualization::gui::Dialog.
void open3d::visualization::gui::FileDialog::SetOnCancel | ( | std::function< void()> | on_cancel | ) |
The OnCancel and OnDone callbacks must be specified.
void open3d::visualization::gui::FileDialog::SetOnDone | ( | std::function< void(const char *)> | on_done | ) |
The OnCancel and OnDone callbacks must be specified.
void open3d::visualization::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.