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

#include <FileDialog.h>

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

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

Member Enumeration Documentation

◆ Mode

Enumerator
OPEN 
SAVE 

Constructor & Destructor Documentation

◆ FileDialog()

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

◆ ~FileDialog()

open3d::gui::FileDialog::~FileDialog ( )
virtual

Member Function Documentation

◆ AddFilter()

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

◆ CalcPreferredSize()

Size open3d::gui::FileDialog::CalcPreferredSize ( const Theme theme) const
overridevirtual

Reimplemented from open3d::gui::Dialog.

◆ OnDone()

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

◆ OnWillShow()

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

Reimplemented from open3d::gui::Dialog.

◆ SetOnCancel()

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

The OnCancel and OnDone callbacks must be specified.

◆ SetOnDone()

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

The OnCancel and OnDone callbacks must be specified.

◆ SetPath()

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.


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