Open3D (C++ API)  0.17.0+f1a0f3e
Data Structures | Public Types | Public Member Functions | Protected Member Functions
open3d::visualization::gui::FileDialog Class Reference

#include <FileDialog.h>

Inheritance diagram for open3d::visualization::gui::FileDialog:
open3d::visualization::gui::Dialog open3d::visualization::gui::Widget

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 RectGetFrame () const
 Returns the frame size in pixels. More...
virtual void SetFrame (const Rect &f)
virtual const ColorGetBackgroundColor () 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

Member Enumeration Documentation

◆ Mode


Constructor & Destructor Documentation

◆ FileDialog()

open3d::visualization::gui::FileDialog::FileDialog ( Mode  type,
const char *  title,
const Theme theme 

◆ ~FileDialog()

open3d::visualization::gui::FileDialog::~FileDialog ( )

Member Function Documentation

◆ AddFilter()

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")

◆ CalcPreferredSize()

Size open3d::visualization::gui::FileDialog::CalcPreferredSize ( const LayoutContext context,
const Constraints constraints 
) const

◆ OnDone()

void open3d::visualization::gui::FileDialog::OnDone ( )

◆ OnWillShow()

void open3d::visualization::gui::FileDialog::OnWillShow ( )

◆ SetOnCancel()

void open3d::visualization::gui::FileDialog::SetOnCancel ( std::function< void()>  on_cancel)

The OnCancel and OnDone callbacks must be specified.

◆ SetOnDone()

void open3d::visualization::gui::FileDialog::SetOnDone ( std::function< void(const char *)>  on_done)

The OnCancel and OnDone callbacks must be specified.

◆ SetPath()

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.

The documentation for this class was generated from the following files: