Open3D (C++ API)
0.18.0+252c867
|
#include <FileDialog.h>
Data Structures | |
struct | Impl |
Public Types | |
enum class | Mode { OPEN , SAVE , OPEN_DIR } |
Public Types inherited from open3d::visualization::gui::Widget | |
enum class | DrawResult { NONE , REDRAW , RELAYOUT } |
enum class | EventResult { IGNORED , CONSUMED , 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 LayoutContext &context, const Constraints &constraints) const override |
void | OnWillShow () override |
Public Member Functions inherited from open3d::visualization::gui::Dialog | |
Dialog (const char *title) | |
virtual | ~Dialog () |
void | Layout (const LayoutContext &context) 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 () |
virtual void | AddChild (std::shared_ptr< Widget > child) |
virtual const std::vector< std::shared_ptr< Widget > > | GetChildren () const |
virtual const Rect & | GetFrame () const |
Returns the frame size in pixels. More... | |
virtual void | SetFrame (const Rect &f) |
virtual const Color & | GetBackgroundColor () const |
virtual bool | IsDefaultBackgroundColor () const |
virtual void | SetBackgroundColor (const Color &color) |
virtual bool | IsVisible () const |
virtual void | SetVisible (bool vis) |
virtual bool | IsEnabled () const |
virtual void | SetEnabled (bool enabled) |
virtual void | SetTooltip (const char *text) |
virtual const char * | GetTooltip () const |
virtual Size | CalcMinimumSize (const LayoutContext &context) const |
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 () |
void | DrawImGuiTooltip () |
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.