Skip to content
Lukas Sägesser edited this page Jun 22, 2015 · 10 revisions

FileDialog

####Inherits: ConfirmationDialog ####Category: Core

Brief Description

Dialog for selecting files or directories in the filesystem.

Member Functions

Signals

Numeric Constants

  • MODE_OPEN_FILE = 0 - Editor will not allow to select nonexistent files.
  • MODE_OPEN_FILES = 1
  • MODE_OPEN_DIR = 2
  • MODE_SAVE_FILE = 3 - Editor will warn when a file exists.
  • ACCESS_RESOURCES = 0
  • ACCESS_USERDATA = 1
  • ACCESS_FILESYSTEM = 2

Description

FileDialog is a preset dialog used to choose files and directories in the filesystem. It supports filter masks.

Member Function Description

  • void clear_filters ( )

Clear all the added filters in the dialog.

  • void add_filter ( String filter )

Add a custom filter. Filter format is: "mask ; description", example (C++): dialog-"lt;add_filter("*.png ; PNG Images");

  • String get_current_dir ( ) const

Get the current working directory of the file dialog.

  • String get_current_file ( ) const

Get the current selected file of the file dialog (empty if none).

  • String get_current_path ( ) const

Get the current selected path (directory and file) of the file dialog (empty if none).

  • void set_mode ( int mode )

Set the file dialog mode from the MODE_* enum.

  • int get_mode ( ) const

Get the file dialog mode from the MODE_* enum.

Clone this wiki locally